A static analysis tool that generates OpenAPI 3.1 specs from Go source code with zero annotations, auto-detecting frameworks including Chi, Gin, Echo, Fiber, Gorilla Mux, and net/http.
- v0.4.25
- Published at
- Jun 17, 2026
- 39
- Stars
- 12
- Download
- Synced at
- Sep 19, 2026
Latest release
v0.4.25Jun 17, 2026, 06:26 PMDownloads slow? Switch the source anytime above
README
Project Overview
go-apispec analyzes Go source code and generates an OpenAPI 3.1 spec (YAML or JSON) with zero annotations, auto-detecting frameworks and following the call graph.
Key Features
- Framework support: Chi, Gin, Echo, Fiber, Gorilla Mux, net/http
- Response detection: Infers Content-Type, status codes, and schemas from code
- Multiple frameworks simultaneously: All routes appear in the spec
- Path parameter normalization: Handles syntax differences across frameworks
- Error helper tracking: Traces error helper calls via parameter mapping
Target Audience
- Go API developers
- Teams who need automated OpenAPI documentation
Quick Start
- Install:
go install github.com/antst/go-apispec/cmd/apispec@latest - Generate:
apispec --dir ./your-project --output openapi.yaml
Core Advantages
- Zero annotations, generated from real code
- Auto-detects frameworks and routes
- Multiple framework support simultaneously
- Type-aware response inference
Release history
Sort