📝 docs: comprehensive Swagger documentation skill with hierarchical tagging

This commit is contained in:
2026-04-05 10:37:48 +02:00
parent 737e95f65f
commit 3e8c50d80a
8 changed files with 553 additions and 16 deletions

View File

@@ -77,7 +77,7 @@ func (h *apiV1GreetHandler) RegisterRoutes(router chi.Router) {
// handleGreetQuery godoc
// @Summary Get default greeting
// @Description Returns a default greeting message
// @Tags greet
// @Tags API/v1/Greeting
// @Accept json
// @Produce json
// @Success 200 {object} GreetResponse "Successful response"
@@ -90,7 +90,7 @@ func (h *apiV1GreetHandler) handleGreetQuery(w http.ResponseWriter, r *http.Requ
// handleGreetPath godoc
// @Summary Get personalized greeting
// @Description Returns a greeting with the specified name
// @Tags greet
// @Tags API/v1/Greeting
// @Accept json
// @Produce json
// @Param name path string true "Name to greet"

View File

@@ -47,7 +47,7 @@ type greetResponse struct {
// handleGreetPost godoc
// @Summary Get greeting (v2)
// @Description Returns a greeting message with validation (v2)
// @Tags greet
// @Tags API/v2/Greeting
// @Accept json
// @Produce json
// @Param request body GreetRequest true "Greeting request"

View File

@@ -1,4 +1,4 @@
//go:generate swag init -g ../../cmd/server/main.go
//go:generate swag init -g ../../cmd/server/main.go --parseDependency --parseInternal
package server
@@ -136,7 +136,7 @@ func (s *Server) getAllMiddlewares() []func(http.Handler) http.Handler {
// handleHealth godoc
// @Summary Health check
// @Description Check if the service is healthy
// @Tags health
// @Tags System/Health
// @Accept json
// @Produce json
// @Success 200 {object} map[string]string "Service is healthy"
@@ -149,7 +149,7 @@ func (s *Server) handleHealth(w http.ResponseWriter, r *http.Request) {
// handleReadiness godoc
// @Summary Readiness check
// @Description Check if the service is ready to accept traffic
// @Tags health
// @Tags System/Health
// @Accept json
// @Produce json
// @Success 200 {object} map[string]bool "Service is ready"