Skip to content

Clarify relationship formatting: JSON Patch #515

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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Clarify-relationship-formatting-jsonpatch
  • Loading branch information
hhware committed Mar 29, 2015
commit 73999bef48184c532d99608788355dbcf4eef601
8 changes: 4 additions & 4 deletions extensions/jsonpatch/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ target a particular relationship's URL.
#### Updating To-One Relationships <a href="#patch-updating-to-one-relationships" id="patch-updating-to-one-relationships" class="headerlink"></a>

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

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

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

For all operations, the `"value"` **MUST** contain an object that contains
`type` and `id` members, or an array of objects that each contain `type`
and `id` members.
an array of linkage objects or an empty array, to remove all elements
of the relationship.

If a client requests a `"replace"` operation to a *to-many relationship URL*, the
server **MUST** either completely replace every member of the relationship,
Expand Down
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