AntiPattern

Schema Field Shape Mismatch

json-schema-shape-mismatch

Response serialization and validation drift because declared Pydantic/SQLModel types don’t match the intended JSON shape (nested models emitted as objects, nested attributes not flattened), leading to incorrect OpenAPI schemas and missing/extra fields.