What problem does it solve?
It prevents Swagger/OpenAPI specs from becoming incomplete or misleading when you add or change Go API endpoints, so consumers can integrate confidently.
Core Features & Use Cases
- Annotate handlers as contract-first docs: Add precise @Summary, @Param, @Success/@Failure, @Router, and @Security blocks so the UI reflects real behavior.
- Generate and wire Swagger UI: Run swag init/swag fmt to produce the docs/ artifacts and expose them at a framework route like /swagger/index.html.
- Model schemas accurately: Use struct tags like enums, examples, swaggerignore, and swaggertype to correct edge cases (time.Time, []byte, ignored fields).
- Apply security and filtering: Define security schemes once and apply per route, and use swag init tag selection to exclude internal/admin endpoints.
Quick Start
Use swag init to generate the docs, then wire the Swagger UI route in your server and ensure your handlers include standard swaggo annotations for parameters, responses, routing, and security.