antst

antst / go-apispec

Public

Generate OpenAPI 3.1 specs from Go source code via static analysis — zero annotations, automatic framework detection

23
0
100% credibility
Found Apr 04, 2026 at 15 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Go
AI Summary

go-apispec automatically generates OpenAPI 3.1 specifications by statically analyzing Go web framework source code.

How It Works

1
🔍 Discover go-apispec

You hear about a helpful tool that reads your Go web project and creates clear API blueprints automatically.

2
📥 Install easily

Run one simple command to add the tool to your computer, no complicated setup needed.

3
📁 Point to your project

Tell the tool where your Go code lives by naming your project folder.

4
Watch it analyze your code

It scans your routes, handlers, and data shapes to understand your API perfectly.

5
📄 Get your API blueprint

Receive a neat file describing your API that works with any docs tool or playground.

🎉 Share and use your docs

Your API is now documented and ready for teams, clients, or automatic testing!

Sign up to see the full architecture

4 more

Sign Up Free

Star Growth

See how this repo grew from 15 to 23 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is go-apispec?

go-apispec scans your Go source code to generate OpenAPI 3.1 specs in YAML or JSON, pulling out routes, params, request bodies, and responses via static analysis. No annotations needed—it auto-detects frameworks like Chi, Gin, Echo, Fiber, Gorilla Mux, or plain net/http, even in mixed setups. Run `apispec --dir ./your-project --output openapi.yaml` and get a spec ready for docs or client generation.

Why is it gaining traction?

Unlike annotation-heavy tools, it infers schemas from real code patterns—like json.Decode for bodies or conditional HTTP methods via control-flow graphs—handling generics, multiple responses, and status code resolution without config tweaks. Output is deterministic for CI diffs, plus interactive call graph diagrams help debug inference. Developers love the zero-setup start for generate openapi spec from code workflows.

Who should use this?

Go backend teams building REST APIs with common routers, needing quick OpenAPI specs for frontend SDKs or API gateways without manual YAML editing. Ideal for generate openapi from code in microservices or monorepos where frameworks mix.

Verdict

Worth trying for small-to-medium Go projects—solid 84.5% test coverage and clear docs make it reliable despite 11 stars and 1.0% credibility score signaling early maturity. Pair with manual tweaks for production until it matures.

(187 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.