Skip to content

Commit 77bc3cb

Browse files
authored
top-level links object is related to the document in some cases (#1753)
* top-level links object is related to the document in some cases 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/ * fix typo
1 parent 2fd0b55 commit 77bc3cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

_format/1.2/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ The members `data` and `errors` **MUST NOT** coexist in the same document.
303303
A document **MAY** contain any of these top-level members:
304304

305305
* `jsonapi`: an object describing the server's implementation.
306-
* `links`: a [links object][links] related to the primary data.
306+
* `links`: a [links object][links] related to the document as a whole.
307307
* `included`: an array of [resource objects] that are related to the primary
308308
data and/or each other ("included resources").
309309

0 commit comments

Comments
 (0)
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