ClusterConcept
Schema Mismatch Serialization
cluster-25
FastAPI/Pydantic serialization and validation can diverge from the intended response schema when nested models or field types are reused, so dumped JSON either exposes nested objects, drops conditionally required fields, or fails to coerce nested attributes into simpler types.