📝 docs: comprehensive Swagger documentation skill with hierarchical tagging
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user