📝 docs: add two missing ADR files (0011 validation, 0014 gRPC)
ADR 0011 and 0014 were referenced in the README list but their files were absent from the repository. Reconstruct them from available context: - 0011: go-playground/validator selection (already implemented in go.mod) - 0014: gRPC adoption strategy (evaluated and deferred/rejected) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
36
adr/0011-validation-library-selection.md
Normal file
36
adr/0011-validation-library-selection.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# 11. Validation Library Selection
|
||||
|
||||
* Status: Accepted
|
||||
* Deciders: Gabriel Radureau, AI Agent
|
||||
* Date: 2026-04-05
|
||||
* Implementation Date: 2026-04-05
|
||||
|
||||
## Context and Problem Statement
|
||||
|
||||
The dance-lessons-coach application needs input validation for API request bodies and configuration values. We need a library that integrates well with Go structs and provides clear error messages.
|
||||
|
||||
## Decision Drivers
|
||||
|
||||
* Struct-tag-based validation to avoid boilerplate
|
||||
* Good error messages with field-level detail
|
||||
* Active maintenance and wide adoption
|
||||
* Compatibility with existing interface-based design
|
||||
|
||||
## Considered Options
|
||||
|
||||
* `github.com/go-playground/validator/v10` — struct-tag driven, widely adopted
|
||||
* `github.com/asaskevich/govalidator` — tag-based but less expressive
|
||||
* Manual validation — full control, no dependency, high boilerplate
|
||||
|
||||
## Decision Outcome
|
||||
|
||||
Chosen option: **`go-playground/validator/v10`** because it is the de-facto standard in the Go ecosystem, supports struct-tag annotations, provides field-level error detail, and integrates cleanly with our interface-based design.
|
||||
|
||||
## Implementation
|
||||
|
||||
`github.com/go-playground/validator/v10 v10.30.2` is present in `go.mod`.
|
||||
The `pkg/validation/` package wraps the validator for reuse across handlers.
|
||||
|
||||
## Links
|
||||
|
||||
* [go-playground/validator GitHub](https://github.com/go-playground/validator)
|
||||
Reference in New Issue
Block a user