Validate and normalize request parameters (date, system, calendar, language) #7

Closed
opened 2026-07-01 00:57:35 +00:00 by manlycucumber · 1 comment
manlycucumber commented 2026-07-01 00:57:35 +00:00 (Migrated from github.com)

Problem

Responses are a pure function of (date, system, calendar, office, hour, language). To make caching by key reliable, inputs must be validated and normalized to a canonical form before they reach Core or the cache layer.

Acceptance criteria

  • Date, system, calendar, and language parameters are validated against allowed sets and ranges.
  • Inputs are normalized to a canonical representation (e.g. case, date format, default language).
  • Invalid inputs return the canonical error shape with a specific code per parameter.
  • Normalization is covered by tests including equivalent inputs that must map to the same canonical key.

Notes

Canonicalization is load-bearing for cache-key stability; equivalent requests must produce identical keys.

## Problem Responses are a pure function of (date, system, calendar, office, hour, language). To make caching by key reliable, inputs must be validated and normalized to a canonical form before they reach Core or the cache layer. ## Acceptance criteria - [ ] Date, system, calendar, and language parameters are validated against allowed sets and ranges. - [ ] Inputs are normalized to a canonical representation (e.g. case, date format, default language). - [ ] Invalid inputs return the canonical error shape with a specific code per parameter. - [ ] Normalization is covered by tests including equivalent inputs that must map to the same canonical key. ## Notes Canonicalization is load-bearing for cache-key stability; equivalent requests must produce identical keys.
manlycucumber commented 2026-07-03 05:31:33 +00:00 (Migrated from github.com)

Delivered in #133 (squash-merged to develop).

Delivered in #133 (squash-merged to `develop`).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Directorium/Api#7
No description provided.