diff --git a/rest_framework/schemas.py b/rest_framework/schemas.py index ecfe835a9..98dd37207 100644 --- a/rest_framework/schemas.py +++ b/rest_framework/schemas.py @@ -600,7 +600,8 @@ class SchemaGenerator(object): if not is_list_view(path, method, view): return [] - if not getattr(view, 'pagination_class', None): + pagination = getattr(view, 'pagination_class', None) + if not pagination or not pagination.page_size: return [] paginator = view.pagination_class() diff --git a/rest_framework/settings.py b/rest_framework/settings.py index f7d9a0919..b699d7caf 100644 --- a/rest_framework/settings.py +++ b/rest_framework/settings.py @@ -50,7 +50,7 @@ DEFAULTS = { 'DEFAULT_VERSIONING_CLASS': None, # Generic view behavior - 'DEFAULT_PAGINATION_CLASS': None, + 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination', 'DEFAULT_FILTER_BACKENDS': (), # Throttling