-
-
Notifications
You must be signed in to change notification settings - Fork 310
Add "anchor" LDO keyword. #352
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
Conversation
This corresponds directly to the RFC 5988 "anchor" keyword.
I assume you're referring to the "Depending on the media type of the instance, it it may or may not be possible to assign a URI to the exact default context resource" paragraph. I'm not sure it's needed at all for the simple case (URI) at stake here. Could you explain why you added it?
Looks enough to me. |
@dlax it's not in a dedicated commit because it's part of this logical change. I would not make one without the other. Without As a general rule, I keep changes that interact with each other together in the same commit. I would not merge these separately. |
I thought I had answered this but apparently I didn't (or at least not very clearly). My apologies. I included that because: 1.) not being able to produce a URI for the context resource feels strange to me, and therefore worth acknowledging. Without it, I feel fairly certain that someone would file an issue requesting clarification. 2.) The fact that we can't guarantee a context URI is due to the split nature of JSON / JSON Schema hypermedia documents. There are two resources involved: the schema and the instance (even if you never fetch the schema from a remote location). Most hypermedia documents involve one media type, and can therefore declare a fragment syntax to fulfill all use cases. JSON Schema needs to work with instances that are plain
(added emphasis mine) Many people (myself included once upon a time, before I understood media types and URI fragments as thoroughly as I do now) find this very counter-intuitive. I want to avoid widespread incorrect implementations, so I documented this in the spec. It's just too surprisng to ignore. This should also help clarify the utility of the |
@handrews Thanks for your detailed clarification. I agree it's worth mentioning. |
Last call: as of tomorrow this will have been up for 14 days and I will merge. It is a near-universal link serialization feature and no one has really objected at any point (just discussed how to handle the non-URI-identifiable cases, which is independent of this keyword). |
Addresses the simpler half of #140.
This corresponds directly to the RFC 5988 "anchor" keyword.
I'm not sure whether all of the talk of the context URI and whether it is possible
to construct one belongs where I put it in the
"rel"
section or whether it shouldbe moved to
"anchor"
, or a bit of each.I'm also not sure if there needs to be more explanation of
"anchor"
. Since it isadapted from RFC 5988 I went with less explanation.