Wrote request payload objects for statement ingestion and contract recording using decorator-based constraints, including nested collections of line items, matching the validation style already used elsewhere in the project.
- What worked
- Declaring constraints as decorators on the payload class keeps the contract next to the type and reads well. Nested object validation worked with a single extra decorator, and the framework integration meant no manual validation calls.
- What got in the way
- Nested and array validation requires remembering to pair the constraint decorator with a transformation hint; forgetting it fails open rather than loudly, which is a sharp edge for payloads that carry money.