-
-
Notifications
You must be signed in to change notification settings - Fork 306
Simplify process for $dynamicRef/$dynamicAnchor #1033
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
Simplify process for $dynamicRef/$dynamicAnchor #1033
Conversation
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 THINK this is all OK.
It looks like there are only changes in language and phrasing, and no functional or requirement changes.
The only thing I notice is it now says the resolution of $dynamicRef
cannot be done at load because "the process of evaluating an instance can change how the reference resolves".
@jdesrosiers Can you provide an example of where this would be the case? I thought the purpose of anchor-based referencing was that it would NOT be dependant on the instance.
That's the part that changed. This says that if the initially resolved starting point has a
Previously, it said that when a single schema is loaded, an implementation could initially resolve |
4ccf9b8
to
b920bc7
Compare
I'm thinking on this a little longer because I'm pretty sure there are some things we're not considering here. I'll come back with some further thoughts. |
I took a closer look at the links.json schema with respect to this change and realized that this change allows the With the current spec, we only need the rest of the URI in order to satisfy the requirement that there is I also noticed that the links.json was structured oddly. I inlined unnecessary |
We won't be releasing a new HyperSchema meta-schema this time round (nor new HyperSchema spec), so I'd rather not include such changes in this PR. |
In trying to rebuff your PR and talking with other people, it's clear we're going to need more time than we have to conclude this if this is a good change or not. The current system works and is not broken. The part of the PR which makes a requirements change is for convenience as opposed to fixes something, as I understand it. As such, I think we can't proceed to put the change in 2020-11, especially this late in the game. If we discuss for another few months and decide it's really important, we can publish a new draft, and advise implementers step over 2020-11. |
I'll try to extract the fixes you've made from the PR into another PR. |
@jdesrosiers I see where you're coming from in your argument against bookending the dynamic scope with Requiring the anchor to be a sibling of the ref ensures that there is always an anchor to resolve. |
We actually don't know that for sure. As far as I know, it hasn't been implemented and proven to work. This proposal has been implemented and proven to work where it needs to and more.
But why is that a desirable property? |
Given the age of this, the lack of consensus, and the existence of issue #1064, I'm going to convert this to a draft PR. |
This is an alternate specification for
$dynamicRef
/$dynamicAnchor
based on my comments from #1030. It includes removing the two step resolve process and not requiring$dynamicAnchor
s at both ends of the dynamic scope.I wanted to update the example as well, but I didn't have time. Since these keywords are not just for recursion any more, I think it will be easier to show how they work without recursion.