Add swaggo/swag OpenAPI spec generation with /openapi.yaml endpoint#7
Merged
Conversation
Copilot
AI
changed the title
[WIP] Add swaggo/swag and gin-swagger for OpenAPI schemas
Add swaggo/swag OpenAPI spec generation with /openapi.yaml endpoint
Apr 5, 2026
Owner
|
@copilot you make sure the check openapi spec is in sync. |
Contributor
Author
Fixed in a946c47. The docs were generated locally with a slightly different swag binary that included |
cfaa22f to
ec8cb45
Compare
Co-authored-by: kamaal111 <37084924+kamaal111@users.noreply.github.com>
ec8cb45 to
e22a7da
Compare
kamaal111
approved these changes
Apr 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
main.goand all handlersswag initto generatedocs/(docs.go,swagger.json,swagger.yaml)docs/embed.goto embedswagger.yamlat compile timehandlers/openapi.gowithGetOpenAPISpechandler servingGET /openapi.yamlOpenAPISpecPathconstant tohandlers/routes.gorouters/openapi.goto register the/openapi.yamlrouterouters/routers.goto call the new openapi route groupgenerate-docsrecipe tojustfileAGENTS.mdwith docs generation workflow documentationhandlers/openapi_test.gounit test for the new handlerformat: float64fromratesadditionalProperties)