AntiPattern

Pydantic Field Mismatch Serialization

pydantic-field-shape-mismatch

Pydantic/SQLModel derives JSON schema and response serialization from the declared model types, so using the wrong field shape (nested objects vs strings/lists, or nested annotated models) causes schema drift and incorrect runtime payloads. Null-handling and validation flow further amplify mismatches.