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
Evaluation path: relative to $ref resolved schema or resource/document root? #1482
Comments
I opened this as an issue rather than a discussion because the spec seems to say nothing on this and, in my opinion, should. |
The current text (for the upcoming verion) is:
What's unclear to you? The evaluation path follows through the |
Yes, I did read the spec, thank you.
I don't see anything in the spec addressing whether the evaluation path includes the path between $ref's resolved resource root and the schema resolved from a fragment (or even between document root and schema, though I presume not, included in the question to consider all plausible options). Stated another way, whether evaluating an anchor or pointer fragment of the $ref is considered "evaluation" for the evaluation path. The only evaluation path example using $ref in the spec points to the resource and document root.
That answer makes the most sense to me, though I can also see the pointer to the fragment being useful information to include, especially for an anchor fragment. I think the spec should be clearer on this. |
I was uncertain whether you were looking at 2020-12 or what's in master.
I think you're wanting the keyword location, which is the dereferenced location and includes the base URI. Keyword location gives you where you are; evaluation path gives you how you got there. |
After traversing a
$ref
that contains a fragment, does the evaluation path of the resolved schema include the path between the document or resource root and the subschema indicated by the fragment?Given, for example, this schema:
For the referenced
false
schema that ultimately causes any instance to fail validation, is its evaluation path:/$ref/$defs/A/$defs/B/allOf/0
- with its pointer relative to the referenced schema's document rootor
/$ref/$defs/B/allOf/0
- with its pointer relative to the referenced schema's resource rootor
/$ref/allOf/0
- with its pointer relative to the referenced schema?
The text was updated successfully, but these errors were encountered: