Skip to content

Commit

Permalink
Fix documentation on pagination.
Browse files Browse the repository at this point in the history
"Anything but a positive integer" would mean, e.g., -1 or "foo" or an empty list. This is not true - the code requires both parameters to be a positive integer. The value 0 is the only value that disables pagination.
  • Loading branch information
Natureshadow authored Dec 8, 2016
1 parent d3a6d16 commit da6f012
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/pagination.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ To set the default page size for collections of resources, use the
To set the maximum page size that the client can request, use the
``max_page_size`` argument. Even if ``page_size`` is greater than
``max_page_size``, at most ``max_page_size`` resources will be returned in a
page. If ``max_page_size`` is set to anything but a positive integer, the
page. If ``max_page_size`` is set to ``0``, the
client will be able to specify arbitrarily large page sizes. If, further,
``page_size`` is set to anything but a positive integer, pagination will be
``page_size`` is set to ``0``, pagination will be
disabled by default, and any :http:method:`get` request that does not specify a
page size in its query parameters will get a response with all matching
results.
Expand Down

0 comments on commit da6f012

Please sign in to comment.