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

Pagination links should not go directly in links object #7

Closed
jpadilla opened this issue May 29, 2016 · 1 comment · Fixed by #8
Closed

Pagination links should not go directly in links object #7

jpadilla opened this issue May 29, 2016 · 1 comment · Fixed by #8

Comments

@jpadilla
Copy link
Contributor

According to the spec, pagination keys first, last, prev, and next should in the links object. This library currently forces you to add them in links.pagination. I can get a PR together if we agree.

Pagination links MUST appear in the links object that corresponds to a collection. To paginate the primary data, supply pagination links in the top-level links object. To paginate an included collection returned in a compound document, supply pagination links in the corresponding links object.

The following keys MUST be used for pagination links:

  • first: the first page of data
  • last: the last page of data
  • prev: the previous page of data
  • next: the next page of data
@digia
Copy link
Owner

digia commented May 30, 2016

It should be inline with the spec. I've been adding things as i run into them on my project.

A PR for this would be greatly appreciated.

Thank you!

jpadilla added a commit to jpadilla/jaysonapi that referenced this issue May 30, 2016
jpadilla added a commit to jpadilla/jaysonapi that referenced this issue May 30, 2016
@digia digia closed this as completed in #8 May 30, 2016
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 a pull request may close this issue.

2 participants