Skip to content

Commit 3628378

Browse files
committed
Clarify-relationship-formatting-jsonpatch
1 parent ed7fad4 commit 3628378

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

extensions/jsonpatch/index.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,7 @@ target a particular relationship's URL.
9696
#### Updating To-One Relationships <a href="#patch-updating-to-one-relationships" id="patch-updating-to-one-relationships" class="headerlink"></a>
9797

9898
To update a to-one relationship, perform a `"replace"` operation with a URL and
99-
`"path"` that targets the relationship. The `"value"` should be a link object
100-
that contains `"type"` and `"id"` members.
99+
`"path"` that targets the relationship. The `"value"` **MUST** be a linkage object.
101100

102101
For instance, the following request should update the `author` of an article:
103102

@@ -130,8 +129,8 @@ A server **MUST** respond to Patch operations that target a *to-many
130129
relationship URL* as described below.
131130

132131
For all operations, the `"value"` **MUST** contain an object that contains
133-
`type` and `id` members, or an array of objects that each contain `type`
134-
and `id` members.
132+
an empty array or an array of linkage objects.
133+
An empty array will remove all elements of the relationship.
135134

136135
If a client requests a `"replace"` operation to a *to-many relationship URL*, the
137136
server **MUST** either completely replace every member of the relationship,

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