Expand description
Validation: the Validate trait, the Valid<T> extractor (422 with
structured details on violation), and the OpenApi extension serving the
platform-generated document. derive(Validate) with rule attributes is a
contract-v1 candidate (the design schema has no field constraints yet).
Structs§
- OpenApi
- Serves a pre-generated OpenAPI document at
GET /openapi.json. The platform generates the document from design.json (tool-owned). - Valid
- Extract-then-validate:
Valid(Json(todo)): Valid<Json<NewTodo>>. Violations become422 JC0422with a structureddetailsarray. - Violation
- One field-level problem, rendered into the 422
detailsarray.
Traits§
- Validate
- Types that can check their own invariants after extraction.