🔐 feat: add JWT authentication support to Swagger UI
- Added ApiKeyAuth security definition for JWT Bearer token authentication - Configured security scheme with Authorization header and Bearer token format - Added @Security annotations to greet endpoints (v1 GET, v2 POST) for optional authentication - Updated Swagger documentation to show authentication requirements - Maintained backward compatibility - authentication remains optional for greet endpoints Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
@@ -55,6 +55,7 @@ type greetResponse struct {
|
||||
// @Param request body GreetRequest true "Greeting request"
|
||||
// @Success 200 {object} GreetResponseV2 "Successful response"
|
||||
// @Failure 400 {object} ValidationError "Validation error"
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /v2/greet [post]
|
||||
func (h *apiV2GreetHandler) handleGreetPost(w http.ResponseWriter, r *http.Request) {
|
||||
// Read request body
|
||||
|
||||
Reference in New Issue
Block a user