-
-
Notifications
You must be signed in to change notification settings - Fork 266
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
Feature/ref is delegation #580
Conversation
I'm assuming this is section 8.3. Schema References With "$ref" (as of c872253). I want to make sure I'm understanding this correct, what's the impact of this change? What's an example of something you couldn't do before that you can now? Some nits:
"boolean assertion" and "applied" need to be defined. We use "applied" in some other places but the usage is more colloquial I think.
This is probably redundant, since keywords already don't affect each other except as explicitly described.
Is it the schema that "MUST be interpreted as a $ref reference", or the property value? This seems to conflict with the first sentence from earlier.
We already normatively reference RFC 3986, and I'm not sure what this helps with.
This doesn't make any sense to me. Implementations should only be concerned with the URI that the URI Reference resolves to. In a URI base of
Is changing how we dereference URIs supposed to be part of this issue?
SHOULD NOT implies that the discouraged behavior is still an option, and still legal (with a really good reason). ... and there's probably more but this is enough for now. |
And thanks for taking the time to write specific text, by the way! That's some good progress. |
@awwright I'll leave most of the replying to @Relequestual, but to address:
I think if we just replace "result in a boolean assertion" with "produce a boolean assertion result" then everything works fine, and fits with the definition of assertions in the current text. For "applied", there is now a "Subschema Application" section from a recent PR, which should cover this. We can certainly tweak the wording there if needed, either as part of this PR or separately. |
Yes! 8.3. Thanks for clarifying.
The major difference is previously, all other keywords adjacent to
Because previous it said it
I don't see any harm in being really clear about where this is coming from. I personally find it helpful, so I'll leave it here.
I spent a little while familiarising myself with the correct termonology. The plain name fragment is indeed "foo", and section 9.2. shows resolution as you described. What did you understand this to mean?
This isn't changing anything as far as I understand. Could you explain why you think this is a change vs emphasis on current working?
That is correct. I checked RFC 2119. It's clear to me from discussions on slack and more than just a few SO questions and comments, that some people and implementations have fair and valid reasons for wanting to dereference the use of |
@awwright Given the previous comment is 3 levels deep, I'd appreciate splitting your reply up into multiple comments please. |
@Relequestual Most of your comments make sense, give me a day to write a proper reply though. Thanks! |
I think it might be a good idea to address this in an appendix, similar to the appendix on keywords that have been moved that I added to the validation spec. This way people reading the new spec will get the correct impression that it's not special, and we can directly address the change in the appendix, with the clear context that only people moving from older drafts need to even read the appendix. It will be dropped well before RFC. |
@Relequestual regarding:
I think I'm with @awwright on this. We're not changing anything at all about how the value of |
Again I'm kind of agreeing with @awwright . We seem to all agree that the functionality is not changing, so what is the purpose of the extra wording? What existing wording is it clarifying? This is where it gets hard to give feedback on text divorced from the current file. I'm guessing that if we see this as a direct diff it will be more clear what you're getting at. |
@Relequestual it's not clear to me that we want to address this in the spec at all. It's analogous to collapsing If we do want to address this, then we need to talk about using
None of this is required to understand or implement the spec. I'd also consider an appendix here, although one that would also be part of the RFC. That is a good way to convey interesting usage that is not obvious from the spec, but is not required for implementation. |
@handrews OK, I think you're seeing a change in behaviour where I'm seeing clarifications, with insight from the URI RFC. I felt it was important to add these clarifications because they were discussed in the associated issues as needing clarification. I don't feel we can dump in "ref is delegation" without also addressing the exsisting use cases of inlining references, and how they should be handled, otherwise we're replacing adding ambiguity to the issue. #514 includes a number of issues around use of $ref, and you (and a number of others) upthumbed my comment about specifying how inclusion should work given this change: #514 (comment) I spent considerable time reading through the two issues and made notes on key points required to resolve them. If we think #514 is just too fuzzy, we can try and nail down the requirements to resolve in a new issue, but I didn't think that was required. If you both feel this PR is far off what you were expecting, I suggest we close it, create a new issue in favour of #514, and define how it should be resolved alongside #523. /cc @awwright |
One of the reasons I didn't want to do this as a diff initialy is because #514 is essentially "$ref isn't defined well in the spec, let's fix that and re-explain". I can attempt to solve both issues separatley, but given they would need to be done one after another, I thought it made sense to do both at the same time. |
Sorry, sorry. Third commit of this PR shows the diff of previous vs my suggested change. Just as text and not as the XML. |
Can we use a CREF? I don't have anything to add to the other points, at least not until I see the revision, if any. Are you able to make a new PR that edits the XML sources? |
@awwright Thanks. I'll aim to make a new PR based on this one but in the XML within the next week. |
Closed in favour of #585 |
$ref
is now delegation rather than inclusion by default, and if inclusion is required, it must not effect adjacent key words.Attempt to resolve #523 and #514
I've spent the past two days refreshing my understanding of the current issues around
$ref
, what exactly a URI is and how they can be used, drawing diagrams of possible ways to resolve and handle$ref
... so I figure I've thought this one through.Previously...
I can't think of any reason this should still be true, given the expected default behaviour should "now" be delegation rather than inclusion. As such, I've removed that section.
(I've done this as just a text document first to get feedback and thoughts as I can't bring myself to look at XML today. I'll update this branch as needed, and finally move the text to the actual XML for final the final PR state.)