Description
[EDIT: I now thing that "anchorPointer"
is a simpler and better option, you may want to start the "anchorPointer" proposal instead of the more complex and incomplete "indirectAnchor"
described in the first few comments.
This is split off from #140, which is now just tracking the simple "anchor"
case of setting the context URI directly (resolving references against the current context base).
I'm going to call this keyword "indirectAnchor"
although I'm not attached to the name. Quotes from the #140 are edited to use this keyword name.
@dlax asked:
Can't we say that the
"indirectAnchor"
's value must be a URI reference to a (sub)schema and has the effect to override the context with the instance pointed by referenced (sub)schema?
...and in response to my concern that this would be too convoluted for users, he brought up the following good point:
I find this quite symmetrical with how Hyper-Schema's LDO are currently defining the context which is already deviating from RFC5988 because the link is not on the instance. Accordingly, I don't think it'd be more convoluted to assume that anything related to link's context (here, the anchor) should be considered through the instance's schema indirection.
The question at this point is how to define such an approach where the point in the instance to which the referenced schema refers is unambiguous, given that a single subschema may validate against numerous parts of a JSON document.
I'll take a pass at this in a separate comment.