drf-yasg
drf-yasg copied to clipboard
Swagger Auto Schema Decorator doesn't work
I have the Swagger Auto Schema Decorator over create method in a RegisterViewEx. I described the responses with help of custom serializer. However the schema generated uses the serializer specified in APIView class. It doesn't use the one described in the decorator. Its does not update.
The view class
The super view class
Response serializer, two new fields and password1 and password2 fields removed
Response fields are incorrect
Maintainers and contributors, can you please help me with this issue? @axnsan12 @JoelLefkowitz
I suspect this is a problem in the way you're using Django REST Framework, not drf-yasg
. Can you make sure that the schema you're showing there is generated by introspecting the restricted permissions view class, and not the original superclass? Also, I'm not sure you can remove attributes from a class just by setting them to None
.
It does not work with create() i am guessing . make it a post() . then it will work .