Closed anky808 closed 1 year ago
plz provide the correct code
I'm pretty sure the error comes from DRF and not spectacular, so this is not our issue I suppose.
I think you a are using ListSerializer wrong. serializers.ListSerializer(child=XXXSerializer())
is how it is supposed to be used. I guess ModelViewSet
cannot handle the ListSerializer class by default. You may need to write a custom create
method. and then use @extend_schema
appropriately.
thankyou
models.py