Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add
$self
for self-identifying documents #4389New 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
Add
$self
for self-identifying documents #4389Changes from all commits
6e129a2
604789f
5e3c600
f469211
43cb464
1294a86
2e5bfbc
e0a2cb6
d68683c
7568b58
34fb6d6
8d1c6be
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to reveal my ignorance here, but this seems like the exact situation where you want to use absolute $self value. I thought the idea of distinguishing URIs -- identifiers -- from URLs -- locators -- is that you could have the same document in multiple locations and would want to make clear that it is the same document -- with a single identifier -- even though it could be retrieved from multiple locations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mikekistler I just did
$self
by analogy with JSON Schema's$id
. If folks want to deviate from that (and as you note there are reasons to do so for simplicity) then we can, but let's decide that intentionally. I think @karenetheridge brought up this in some way as well? I admit I've somewhat lost track at this point.I do not have a use case where you would want the identity to change based on the location, although I'm sure I could construct one where it's somehow beneficial. But maybe not so beneficial as to be worth discarding the simplicity of requiring an absolute URI.
Notably, the newly proposed JSON Schema replacement JSON Structure requires an absolute
$id
(although they also say it SHOULD be a URL which I need to reply to because that is missing the point of$id
entirely in my view and guiding people to the wrong behavior).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have filed issue #4548 to debate the absolute-URI idea, along with several other spin-off issues previously filed. Although perhaps it is worth taking a step back and looking at all of those "spin-off" issues comprehensively. Honestly I'm not sure where to go with this as people keep having fundamental objections that could substantially change the whole thing, and those aren't good questions to resolve in a PR. Those are discussion or issue questions, really.