Skip to content

Commit

Permalink
https://github.com/axnsan12/drf-yasg/pull/499/
Browse files Browse the repository at this point in the history
  • Loading branch information
kavdev committed Feb 25, 2021
1 parent b99306f commit 836eeea
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/drf_yasg/inspectors/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,14 @@ def get_response_schemas(self, response_serializers):
)
else:
serializer = force_serializer_instance(serializer)
schema = self.serializer_to_schema(serializer)

if self.should_page():
schema = self.get_paginated_response(schema) or schema

response = openapi.Response(
description='',
schema=self.serializer_to_schema(serializer),
schema=schema,
)

responses[str(sc)] = response
Expand Down

0 comments on commit 836eeea

Please sign in to comment.