Schemas and Contracts Guide

Overview

Where request/response schemas live and how to change them without breaking callers.

Where schemas live

Contract rules

Idempotency contract for writes

Error contract

Business error shape:

Validation error shape:

Validation rules source:

How to evolve schemas

  1. Update schema classes in app/schemas/.
  2. Update endpoint declaration in app/api/v1/....
  3. For write routes, update header contract and idempotency behavior docs.
  4. Update examples in app/openapi/examples/....
  5. Update validation mapping in app/validation/... if needed.
  6. Add or update tests.
  7. Run make verify and make docs-fix.

Anti-patterns

Page history

Date Change Author
Added Page history section (repository baseline). Ivan Boyarkin