Api doc style
API documentation annotation style for Go Swagger. Use when adding or modifying API endpoints, handler structs, or swagger comments.From its SKILL.md
npx -y skills add koazy0/coding-skills --skill api-doc-styleAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
0.9 KB, as published. Nobody here has run it
Swagger Auto Generator
Principles
- Documentation is code. If the endpoint changes, the comment changes.
- Examples must be realistic, not placeholder empty strings.
- Host / Base URL is injected at runtime (env/config), never hardcoded in annotations.
Annotation Rules
- Every public handler needs
@Summary,@Tags,@Router - Request/response structs need
exampletags - Arrays return
[]T{}ormake([]T, 0), never nil - Recursive structs show 2-3 levels max, use
[...]for deeper
Workflow
which swag || go install github.com/swaggo/swag/cmd/swag@latestswag init --parseDependency --parseInternal --parseDepth 3- Verify
docs/swagger.jsonexists and is valid