Skip to content

Commit 67ca27a

Browse files
committed
ordering-relationships
1 parent ab0be29 commit 67ca27a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

format/index.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,12 @@ relationship URLs.
297297
If present, a *related resource URL* **MUST** be a valid URL, even if the
298298
relationship isn't currently associated with any target resources.
299299

300+
> Note: The spec does not impart meaning to order of resource identifier
301+
objects in linkage arrays of to-many relationships, although implementations
302+
may do that. Arrays of resource identifier objects may represent ordered
303+
or unordered relationships, and both types can be mixed in one response
304+
object.
305+
300306
For example, the following article is associated with an `author`:
301307

302308
```javascript
@@ -1453,8 +1459,8 @@ Accept: application/vnd.api+json
14531459

14541460
If a client makes a `POST` request to a *relationship URL*, the server
14551461
**MUST** append the specified members to the relationship using set
1456-
semantics. This means that if a given `type` and `id` is already in the
1457-
relationship, the server **MUST NOT** add it again.
1462+
semantics (ordered or unordered). This means that if a given `type` and
1463+
`id` is already in the relationship, the server **MUST NOT** add it again.
14581464

14591465
> Note: This matches the semantics of databases that use foreign keys for
14601466
has-many relationships. Document-based storage should check the has-many

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