django-rest-framework-docs icon indicating copy to clipboard operation
django-rest-framework-docs copied to clipboard

Support for dynamic fields?

Open ezheidtmann opened this issue 9 years ago • 0 comments

Hey there, DRF docs looks really cool. But it looks like the project doesn't currently have support for viewsets that implement a get_serializer method. In my case, I use information from the request (specifically the token scopes) to determine the fields available to the client. This means that it's an error to instantiate a serializer without providing a request variable in a context kwarg. And DRF-docs does exactly this in api_endpoint.py:50

Is there any way I can override the methods that determine fields to show? Thanks!

ezheidtmann avatar May 13 '16 16:05 ezheidtmann