Skip to content

Feat: Adding swagger advanced feature#440

Open
gustavodetoni wants to merge 1 commit into
Melkeydev:mainfrom
gustavodetoni:feat/swagger-advanced-feature
Open

Feat: Adding swagger advanced feature#440
gustavodetoni wants to merge 1 commit into
Melkeydev:mainfrom
gustavodetoni:feat/swagger-advanced-feature

Conversation

@gustavodetoni

Copy link
Copy Markdown

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

Problem/Feature

This PR adds Swagger support as a new advanced feature for generated Go Blueprint projects. Users can now enable Swagger documentation during project creation with --advanced --feature swagger

Related to #219.

Description of Changes:

  • Added swagger to the advanced feature flags, CLI completions, and interactive advanced feature prompt
  • Added Swaggo integration for all supported frameworks, including Gin, Echo, Fiber, Chi, Gorilla/Mux, HttpRouter, and the standard library
  • Added Swagger route generation at /swagger/index.html for generated projects
  • Added Swaggo annotations for the default / endpoint and database /health endpoint when a database driver is selected
  • Added automatic Swagger docs generation during project creation
  • Added a make swagger target to regenerate Swagger documentation
  • Updated README and documentation pages to include the new Swagger advanced feature

CLI example

go-blueprint create \
  --name myapp \
  --framework chi \
  --driver postgres \
  --advanced \
  --feature swagger \
  --feature docker \
  --git commit

Local verification

  • go test ./... and git diff --check pass
  • Non-interactive scaffold verified with standard-library and gin using --advanced --feature swagger
  • Generated projects contain docs/docs.go, docs/swagger.json, and docs/swagger.yaml
  • Generated Swagger route is available at /swagger/index.html.
  • Generated projects build successfully with go build ./cmd/api and tests pass with go test ./....
image

Checklist

@gustavodetoni gustavodetoni changed the title Adding swagger advanced feature Feat: Adding swagger advanced feature May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant