Types
Re-exports of core openapi_pydantic types and project-level JSON type alias.
Classes:
| Name | Description |
|---|---|
Schema |
|
Reference |
|
Schema
¶
Bases: Schema
openapi_pydantic.Schema with None fields dropped on serialization.
openapi_pydantic.Schema has 50+ optional fields all defaulting to None.
Serializing it naively bloats API responses and JSONB storage with null
leaves. The wrap serializer below strips them recursively at dump time.
openapi_pydantic.Schema's recursive fields (properties, items, allOf,
...) are declared against itself and openapi_pydantic.Reference.
_rebind_nested_schema below rewrites those annotations to point at our
subclasses, so nested values deserialize as Schema / Reference (not
parents) and None-strip / equality behavior works everywhere.
__model_serializer_wrap
¶
Drop None leaves (recursively) inherited from parent fields.