Commit 7d64cf56 by Tom Christie Committed by GitHub

Merge pull request #4998 from COCOLMAN/master

Ensure that pagination is not included in API schema when `page_size=None`. 
parents 9a8d29e7 16aad894
...@@ -600,7 +600,8 @@ class SchemaGenerator(object): ...@@ -600,7 +600,8 @@ class SchemaGenerator(object):
if not is_list_view(path, method, view): if not is_list_view(path, method, view):
return [] return []
if not getattr(view, 'pagination_class', None): pagination = getattr(view, 'pagination_class', None)
if not pagination or not pagination.page_size:
return [] return []
paginator = view.pagination_class() paginator = view.pagination_class()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment