diff --git a/src/drf_yasg/inspectors/view.py b/src/drf_yasg/inspectors/view.py index 334c274a..3aaab06b 100644 --- a/src/drf_yasg/inspectors/view.py +++ b/src/drf_yasg/inspectors/view.py @@ -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