Skip to content

Clarify relationship self link #920

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 1 commit into from
Nov 24, 2015
Merged

Conversation

ethanresnick
Copy link
Member

PR in response to the confusion in http://discuss.jsonapi.org/t/how-to-handle-an-excessive-number-of-included-resources/209

This isn't adding anything new, just repeating info in another place to make it easier to find amidst our (now quite long) spec.

@ethanresnick ethanresnick force-pushed the clarify-relationship-self branch from a5eea96 to 3846bf7 Compare November 21, 2015 09:05
@ethanresnick
Copy link
Member Author

Any objections to my merging this?

PR in response to the confusion in http://discuss.jsonapi.org/t/how-to-handle-an-excessive-number-of-included-resources/209

This isn't adding anything new, just repeating info in another place to make it easier to find amidst our (now quite long) spec.
@ethanresnick ethanresnick force-pushed the clarify-relationship-self branch from 3846bf7 to 136f37a Compare November 24, 2015 00:27
@dgeb
Copy link
Member

dgeb commented Nov 24, 2015

The wording is slightly awkward, but I am fine with this 👍

@ethanresnick
Copy link
Member Author

Cool beans; merged. Re the wording, I'm happy to revise it if anyone has ideas. In the mean time, though, I figure something is better than nothing.

ethanresnick added a commit that referenced this pull request Nov 24, 2015
@ethanresnick ethanresnick merged commit 5a1be64 into gh-pages Nov 24, 2015
@bintoro
Copy link
Contributor

bintoro commented Nov 24, 2015

I think the wording of the added part is fine; however, I've always thought the previous sentence is unhelpful:

For example, it would allow a client to remove an author from an article without deleting the people resource itself.

Surely you don't need to go through the relationship URL to do that — just set the value to null. So if someone revisits this part, that explanation is what I think could use some improvement.

In #498 I suggested:

For example, it would allow a client to add a new comment to an article without going through the article resource and updating the entire set of comments references.

Looking at this now, "replacing the entire set of comments references" would be even better.

@ethanresnick
Copy link
Member Author

Nice to see you again, @bintoro! Hope all's going well :)

About the sentence you mentioned: I've always understood its chief purpose to be pointing out the difference between updating resource objects and updating the links between them. Your text better captures when exactly a relationship link would be needed (since, as you point out, the example currently given could be handled through the resource object), but it seems to bury this high-level distinction a bit. Maybe there's some text that gets the best of both worlds?

@ethanresnick ethanresnick deleted the clarify-relationship-self branch November 24, 2015 07:32
@bintoro
Copy link
Contributor

bintoro commented Nov 24, 2015

Well hey @ethanresnick 😄

I had to take some time off coding because of vision problems that turned out to be a tumor messing with the optic nerve! It got taken out and now I'm recovered. 💪

About the sentence you mentioned: I've always understood its chief purpose to be pointing out the difference between updating resource objects and updating the links between them.

Ahh okay now I get it. I've always read it as if it's trying to present a way to do something fancy:

For example, it would allow a client to remove an author from an article without deleting the people resource itself.

Rewriting it like this totally changes the connotation for me:

For example, deleting an author through an article's relationship URL would break the relationship without deleting the people resource itself.

To me, this looks more like a description of what the link is, as opposed to an example of something cool the link can do. Am I making any sense here?

@ethanresnick
Copy link
Member Author

@bintoro Sorry to hear about the vision issues, and so glad you're recovered!

To me, this looks more like a description of what the link is, as opposed to an example of something cool the link can do. Am I making any sense here?

Yeah, that makes total sense, and I'm 👍 on the spirit of your wording, though I'd tweak it a bit:

For example, removing an author through an article's relationship URL would disconnect the person from the article without deleting the people resource itself.

Does that sound good? If so, can you open a PR and, assuming no one objects, we'll merge it in!

@bintoro
Copy link
Contributor

bintoro commented Nov 25, 2015

removing an author through an article's relationship URL would disconnect the person [...]

Yessss, that's the word I was going for. Perfect.

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