A static analysis tool that generates OpenAPI 3.1 specs from Go code with zero annotations, auto-detecting frameworks like Gin, Echo, Chi, Fiber, and net/http, with call graph analysis and browser-based config UI.
- v0.5.11
- Published at
- Oct 10, 2026
- 94
- Stars
- 44
- Download
- Synced at
- Oct 11, 2026
Latest release
v0.5.11Oct 10, 2026, 02:13 PMDownloads slow? Switch the source anytime above
README
Project Overview
APISpec analyzes Go source code and generates an OpenAPI 3.1 spec (YAML or JSON) from real code with zero annotations, auto-detecting frameworks and following the call graph.
Key Features
- Framework auto-detection: Gin, Echo, Chi, Fiber, Gorilla Mux, net/http
- Generated from real code: Routes, parameters, request bodies, responses inferred from AST and call graphs
- Auth-aware: Detects which routes are protected and by what scheme
- Type-aware: Resolves aliases, enums, generics, arrays, maps validator tags
- Visualizable: Optional HTML call-graph diagram and browser-based config UI
Target Audience
- Go API developers
- Teams who need automated documentation generation
- Projects using multiple Go web frameworks
Quick Start
- Install:
go install github.com/ehabterra/apispec/cmd/apispec@latest - Generate:
apispec --dir ./your-project --output openapi.yaml - Use
apispecuifor browser-based configuration and preview
Core Advantages
- Zero annotations, generated from real code
- Supports multiple Go web frameworks
- Extensible YAML pattern configuration
- Visual call graph and config UI
Release history
Sort