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

Conversation

hhware
Copy link
Contributor

@hhware hhware commented Mar 28, 2015

Three things are changed here:

  • Replacements with "linkage objects" which I believe were forgotten in Clarify relationship formatting #480.
  • "Should" is replaced with "MUST" for to-one relationships to make it consistent with all similar cases.
  • An empty array option is added for to-many relationships -- I guess it is an omission, because it is allowed in the base spec.
  • [added in the second attempt] Same for to-one relationship

I would like to request to consider this for 1.0.

@@ -96,8 +96,7 @@ 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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last sentence should read:

The "value" MUST be a linkage object or null, to remove the relationship.

@hhware hhware force-pushed the Clarify-relationship-formatting-jsonpatch branch from 3628378 to 73999be Compare March 29, 2015 14:34
@hhware
Copy link
Contributor Author

hhware commented Mar 29, 2015

@dgeb, sorry to miss that! Updated.

@dgeb
Copy link
Member

dgeb commented Apr 7, 2015

@hhware thanks for correcting.

👍 LGTM.

@tkellen
Copy link
Member

tkellen commented Apr 7, 2015

👍

dgeb added a commit that referenced this pull request Apr 7, 2015
…sonpatch

Clarify relationship formatting: JSON Patch
@dgeb dgeb merged commit d4346d0 into json-api:gh-pages Apr 7, 2015
@hhware hhware deleted the Clarify-relationship-formatting-jsonpatch branch April 7, 2015 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
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