AntiPattern

Schema vs Runtime Mismatch

schema-runtime-mismatch-serialization

Field-level serialization tweaks in FastAPI/Pydantic (e.g., dumping with exclude_none, reusing SQLModel types, or excluding at body/annotation level) desync the generated OpenAPI schema from runtime validation/JSON output, so optional fields and nested models appear inconsistently and clients break.