Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/pagination #37

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

Feat/pagination #37

wants to merge 15 commits into from

Conversation

butterman0423
Copy link
Contributor

Pagination support for controllers with getAll routes.

Append a query string with arguments page=<int> and perPage=<int> to control pageNumber and items shown on a given page respectively. Example, http://path/to/resource?page=2&perPage=10 gets the second page with at most 10 items shown on it. These options do not need to be explicitly mentioned: default values when omitted are page=1 and perPage=10.

A 400 response is returned if the arguments have invalid values i.e

  • page <= 0 or perPage <= 0
  • page exceeds the total amount of pages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants