Skip to content

top-level links object is related to the document in some cases #1753

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

Merged
merged 2 commits into from
Aug 15, 2024

Conversation

jelhan
Copy link
Contributor

@jelhan jelhan commented Aug 15, 2024

The top-level links object is related to the whole document in 2 out of 4 cases: self and describedby links are related to the document. Not only to its primary data. Even more they are useful even if a document does not have primary data.

A document could not have primary data if 1) being an error response, 2) a response to a successful mutation, and 3) having an extension applied. Top-level links, especially self, are commonly used in those cases. And intended to be used.

This PR improves the wording of the specification to avoid confusion. It was motivated by this thread in the discussion forum: https://jsonapi.org/format/

TODO:

  • Backport to v1.1

jelhan added 2 commits August 15, 2024 13:54
The top-level `links` object is related to the whole document in 2 out of 4 cases: `self` and `describedby` links are related to the document. Not only to its primary data. Even more they are useful even if a document does not have primary data.

A document could not have primary data if 1) being an error response, 2) a response to a successful mutation, and 3) having an extension applied. Top-level links, especially `self`, are commonly used in those cases. And intended to be used.

This PR improves the wording of the specification to avoid confusion. It was motivated by this thread in the discussion forum: https://jsonapi.org/format/
@dgeb dgeb merged commit 77bc3cb into gh-pages Aug 15, 2024
1 check passed
@dgeb dgeb deleted the clarify-top-level-links-relation-to-document branch August 15, 2024 20:28
@dgeb
Copy link
Member

dgeb commented Aug 15, 2024

Looks like a solid correction. Thanks!

@Panman82
Copy link

Is this something that would be back-ported v1.1? Being more of a clarifying change than an actual change to the spec, seems appropriate. 🤷‍♂️

jelhan added a commit that referenced this pull request Aug 22, 2024
The clarification was merged to v1.2 (upcoming) in #1753. This backports the changes to v1.1.
@jelhan
Copy link
Contributor Author

jelhan commented Aug 22, 2024

Is this something that would be back-ported v1.1? Being more of a clarifying change than an actual change to the spec, seems appropriate. 🤷‍♂️

Thanks for the reminder. I created #1754 to do so.

dgeb pushed a commit that referenced this pull request Sep 17, 2024
The clarification was merged to v1.2 (upcoming) in #1753. This backports the changes to v1.1.
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.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy