feat: implement input validation for API v2

- Added go-playground/validator dependency

- Created pkg/validation/ package with custom validator wrapper

- Implemented request validation for v2 greet endpoint

- Added structured validation error responses

- Extended BDD tests to cover validation scenarios

- Updated AGENTS.md with v2 API documentation

- Created ADR 0011-validation-library-selection.md

- Simplified server handler creation code

- Updated CHANGELOG with implementation details
This commit is contained in:
2026-04-04 21:08:13 +02:00
parent 875eb09fb7
commit d3b6d190d1
11 changed files with 489 additions and 14 deletions

View File

@@ -62,6 +62,17 @@ vibe start --agent dancelessonscoachprogrammer
- ✅ Updated configuration system to support API versioning
- ✅ Added comprehensive test coverage for both enabled and disabled states
### 2026-04-04 - Input Validation Implementation
- ✅ Selected go-playground/validator for input validation
- ✅ Created ADR [0011-validation-library-selection.md](adr/0011-validation-library-selection.md)
- ✅ Added `pkg/validation/` package with custom validator wrapper
- ✅ Implemented request validation for v2 API endpoints
- ✅ Added structured validation error responses
- ✅ Extended BDD tests to cover validation scenarios
- ✅ Added validation for name field (max length: 100 characters)
- ✅ Maintained graceful degradation when validator fails to initialize
- ⚠️ **REMINDER**: Use `./scripts/build.sh` instead of `go build` directly for consistent builds
## Compact History (Last 5 Entries)
### 2026-04-04