def map_serializer(self, auto_schema, direction):
        """custom handling for @extend_schema's injection of PolymorphicProxySerializer"""
        result = super().map_serializer(auto_schema=auto_schema, direction=direction)

        if isinstance(self.target.serializers, dict):
            required = OpenApiTypes.NONE not in self.target.serializers.values()
        else:
            required = OpenApiTypes.NONE not in self.target.serializers

        if not required:
            result["nullable"] = True

        return result
custom handling for @extend_schema's injection of PolymorphicProxySerializer
cvat/apps/engine/schema.py