Describe the bug
We have POSTPROCESSING hook, that changes the schema, based on the serializer. We're using our own @extend_schema_serializer decorator to add title to the generated schema. This implementation is copied from the original hook, as sadly title support is not available in the original.
In the hook we're
- iterating over
components.schemas
- Retrieving the actual component from
SchemaGenerator.registry
- Accessing the "serializer" via
component.object
After upgrading from 0.27.2 to 0.28.0, it seems that this does not work for DataclassSerializers anymore, as the component.object now refers to the actual Dataclass, while it used to refer to the DataclassSerializer, which we had decorated and customized
I can make a repro case if the problem is not obvious, but that takes some time.
Describe the bug
We have POSTPROCESSING hook, that changes the schema, based on the serializer. We're using our own
@extend_schema_serializerdecorator to addtitleto the generated schema. This implementation is copied from the original hook, as sadlytitlesupport is not available in the original.In the hook we're
components.schemasSchemaGenerator.registrycomponent.objectAfter upgrading from 0.27.2 to 0.28.0, it seems that this does not work for DataclassSerializers anymore, as the
component.objectnow refers to the actual Dataclass, while it used to refer to theDataclassSerializer, which we had decorated and customizedI can make a repro case if the problem is not obvious, but that takes some time.