I've tried:
class CustomSchema(AutoSchema):
def get_request_serializer(self, path, method):
return ImportJsonSerializer()
def get_response_serializer(self, path, method):
return IngestionResultSerializer()
class ImportJsonViewSet(viewsets.GenericViewSet):
permission_classes = (permissions.IsAuthenticated,)
schema = CustomSchema()
serializer_class = ImportJsonSerializer()
....
But my OpenAPI schema doesn't reflect the CustomSchema - for example, the request & response in my create() method are both set to the value of serializer_class
Now, I could get rid of the serializer class - or override the method get_serializer_class(), but that's not what AutoSchema is using to determine the schema.
Thoughts?