feat: integrate swag fmt and improve CI/CD workflows
Some checks failed
Go CI/CD Pipeline / Lint and Format (push) Successful in 4m51s
Docker Build and Publish / Version Bump (push) Successful in 4m54s
Docker Build and Publish / Build and Push Docker Image (push) Failing after 2m51s
Go CI/CD Pipeline / Build and Test (push) Successful in 9m47s
Go CI/CD Pipeline / Version Management (push) Successful in 12s
Some checks failed
Go CI/CD Pipeline / Lint and Format (push) Successful in 4m51s
Docker Build and Publish / Version Bump (push) Successful in 4m54s
Docker Build and Publish / Build and Push Docker Image (push) Failing after 2m51s
Go CI/CD Pipeline / Build and Test (push) Successful in 9m47s
Go CI/CD Pipeline / Version Management (push) Successful in 12s
- Add swag fmt to git pre-commit hook and CI/CD pipeline - Create comprehensive CONTRIBUTING.md guide with AI section - Update ADR-0013 with swag fmt documentation - Fix swagger generation to include all endpoints - Improve local testing scripts and workflows - Update Dockerfile for better swagger handling - Fix CI/CD workflow file references
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"strconv"
|
||||
|
||||
"DanceLessonsCoach/pkg/validation"
|
||||
|
||||
"github.com/go-chi/chi/v5"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
@@ -45,15 +46,16 @@ type greetResponse struct {
|
||||
}
|
||||
|
||||
// handleGreetPost godoc
|
||||
// @Summary Get greeting (v2)
|
||||
// @Description Returns a greeting message with validation (v2)
|
||||
// @Tags API/v2/Greeting
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param request body GreetRequest true "Greeting request"
|
||||
// @Success 200 {object} GreetResponseV2 "Successful response"
|
||||
// @Failure 400 {object} ValidationError "Validation error"
|
||||
// @Router /v2/greet [post]
|
||||
//
|
||||
// @Summary Get greeting (v2)
|
||||
// @Description Returns a greeting message with validation (v2)
|
||||
// @Tags API/v2/Greeting
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param request body GreetRequest true "Greeting request"
|
||||
// @Success 200 {object} GreetResponseV2 "Successful response"
|
||||
// @Failure 400 {object} ValidationError "Validation error"
|
||||
// @Router /v2/greet [post]
|
||||
func (h *apiV2GreetHandler) handleGreetPost(w http.ResponseWriter, r *http.Request) {
|
||||
// Read request body
|
||||
body, err := io.ReadAll(r.Body)
|
||||
|
||||
Reference in New Issue
Block a user