Summary
routing inputs are validated inconsistently and some bounds are missing, allowing oversized or malformed payloads through. Add declarative schema validation with explicit bounds at the boundary.
Why this matters
Unvalidated input is a correctness and security risk. Declarative schemas make the contract explicit, consistent, and testable.
Requirements
- Define request schemas for the routing endpoints with explicit min/max bounds.
- Reject invalid input at the boundary with a structured
validation_error (field-level details).
- Strip unknown fields; never pass unvalidated data to the service layer.
- Behavior is otherwise unchanged for valid input.
Technical guidance
- Validate at the edge (middleware), not deep in handlers.
- Return all field errors at once, not just the first.
Edge cases — each must have a test
Acceptance criteria
Out of scope
- Cross-field business rules (service layer)
- Response validation
Rewards
Part of the GrantFox OSS / Official Campaign (FWC26) — this task may be rewarded. PR quality is assessed by AI: depth, correctness under edge cases, meaningful tests, and clean design are what earn the reward. Shallow changes (typos, formatting, trivial docs) do not qualify.
Summary
routing inputs are validated inconsistently and some bounds are missing, allowing oversized or malformed payloads through. Add declarative schema validation with explicit bounds at the boundary.
Why this matters
Unvalidated input is a correctness and security risk. Declarative schemas make the contract explicit, consistent, and testable.
Requirements
validation_error(field-level details).Technical guidance
Edge cases — each must have a test
Acceptance criteria
npm run lint,npm test, andnpm run buildall pass locallyCloses #<issue>Out of scope
Rewards
Part of the GrantFox OSS / Official Campaign (FWC26) — this task may be rewarded. PR quality is assessed by AI: depth, correctness under edge cases, meaningful tests, and clean design are what earn the reward. Shallow changes (typos, formatting, trivial docs) do not qualify.