django-pydantic-field
django-pydantic-field copied to clipboard
Combine duplicate pydantic model definitions into a single one, using OpenAPI references to point out on them
This is more likely relevant to serializer fields, though may still apply to parsers/renderers, that needs to be figured out.
While rendering serializer schema, we can come up in the situation when multiple fields may refer to the same pydantic model. Currently, each field independently renders its schema into a nested definition. Probably we can extract all common definitions into an upper level and point to them with references.