drf-yasg
drf-yasg copied to clipboard
Response schemas from serializers will optionally be paginated
At the moment, if a non-default response serializer is set via responses
in swagger_auto_schema
, it will not pick up any pagination schema that might apply from any paginator inspectors.
This patch will take any serializers provided in the responses
section and apply a pagination schema to them if the view should be paged. This does not apply to the default serializer from get_default_responses
because that is already converted into a schema.
Signed-off-by: Paul Wayper [email protected]
@axnsan12 wondering if it is possible to merge this PR?
@PaulWay do you have a workaround for this?
Yeah, unfortunately the workaround is to subclass the view inspector and copy the get_response_schemas
method, using my version of the code.
@axnsan12 What's your take on this?
Yeah, unfortunately the workaround is to subclass the view inspector and copy the
get_response_schemas
method, using my version of the code.@axnsan12 What's your take on this?
Could you please provide an example with code (the workaround) that works for this use-case? Thanks.
@axnsan12 this would be very helpful to have (assuming it's fixed)
Any chance there is an update on this? Such a useful feature.
Sorry, have had this on the back burner - will update this soon!
Some update about this issue? What's missing to finish and release it?