Commit Graph

8 Commits

Author SHA1 Message Date
7154faa7f4 🔒 fix: correct Swagger auth scheme from ApiKeyAuth to BearerAuth
Some checks failed
CI/CD Pipeline / CI Pipeline (push) Failing after 54s
CI/CD Pipeline / CI Pipeline (pull_request) Successful in 7m15s
2026-04-07 01:27:50 +02:00
fec3b46e50 🔐 feat: add JWT authentication support to Swagger UI
Some checks failed
CI/CD Pipeline / CI Pipeline (push) Has been cancelled
CI/CD Pipeline / CI Pipeline (pull_request) Successful in 22m8s
- 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>
2026-04-07 00:46:04 +02:00
183933b43e 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
- 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
2026-04-06 15:36:55 +02:00
3e8c50d80a 📝 docs: comprehensive Swagger documentation skill with hierarchical tagging 2026-04-05 10:37:48 +02:00
b279a31f88 feat: implement OpenAPI/Swagger documentation with swaggo/swag
📝 docs: add comprehensive API documentation
📦 dependencies: add swaggo/swag to go.mod
🔧 chore: add go:generate directive for documentation

- Add comprehensive API documentation using swaggo/swag
- Embed OpenAPI spec in binary using go:embed
- Add Swagger UI at /swagger/
- Document all endpoints, models, and validation rules
- Add go:generate directive for easy regeneration
- Update README, AGENTS, CHANGELOG with documentation
- Finalize ADR 0013 with implementation details
- Gitignore generated docs directory

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-04-05 00:45:40 +02:00
Mistral Vibe
36f0b79b90 Add OpenTelemetry instrumentation with middleware-only approach 2026-04-04 12:19:48 +02:00
Gabriel Radureau
e52870480d Enhance server with context initialization and graceful shutdown
- Added context-aware server initialization in cmd/server/main.go
- Implemented graceful shutdown handling with SIGINT/SIGTERM signals
- Added 30-second shutdown timeout for active connections
- Updated Greet service to use context.Context as first parameter
- Enhanced Zerolog integration with Trace level logging
- Added context-aware logging in Greet function calls
- Fixed route structure to use /api/v1/greet/* prefix
- Updated all handlers and tests to use context
- Comprehensive AGENTS.md documentation with verified commands
- Added server context management architecture section
- Updated API endpoint documentation with working examples

Changes:
- cmd/server/main.go: Complete rewrite with context and graceful shutdown
- pkg/greet/greet.go: Added context parameter and trace logging
- pkg/greet/api_v1.go: Updated interface and handlers for context
- pkg/greet/greet_test.go: Updated tests to use context
- cmd/greet/main.go: Updated CLI to use context
- pkg/server/server.go: Trace level config and context logging
- AGENTS.md: Comprehensive documentation update
- go.mod/go.sum: Added Zerolog dependency

All tests passing, server working with graceful shutdown verified.
2026-04-03 13:39:50 +02:00
Gabriel Radureau
6365f92359 Refactor to JSON API with Chi router and interface-based design
- Add pkg/greet/api_v1.go with ApiV1Greet interface and handler
- Implement Greeter interface for dependency injection
- Return JSON responses with proper Content-Type headers
- Move greet service instantiation to server package
- Separate v1 route registration into registerApiV1Routes function
- Health endpoint at /api level, greet endpoints at /api/v1/greet
- Simplify server entrypoint by removing external dependencies
2026-04-03 13:04:33 +02:00