Skip to content

Commit 228ed1e

Browse files
committed
ordering-relationships
1 parent f80a0ed commit 228ed1e

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

format/index.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,12 @@ relationship URLs.
291291
If present, a *related resource URL* **MUST** be a valid URL, even if the
292292
relationship isn't currently associated with any target resources.
293293

294+
> Note: The spec does not impart meaning to order of resource identifier
295+
objects in linkage arrays of to-many relationships, although implementations
296+
may do that. Arrays of resource identifier objects may represent ordered
297+
or unordered relationships, and both types can be mixed in one response
298+
object.
299+
294300
For example, the following article is associated with an `author`:
295301

296302
```javascript
@@ -1510,9 +1516,9 @@ Accept: application/vnd.api+json
15101516
```
15111517

15121518
If a client makes a `POST` request to a *relationship URL*, the server
1513-
**MUST** append the specified members to the relationship using set
1514-
semantics. This means that if a given `type` and `id` is already in the
1515-
relationship, the server **MUST NOT** add it again.
1519+
**MUST** add the specified members to the relationship unless they are
1520+
already present. If a given `type` and `id` is already in the relationship,
1521+
the server **MUST NOT** add it again.
15161522

15171523
> Note: This matches the semantics of databases that use foreign keys for
15181524
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