doubts about ref.json test. #634
-
Hello, I have a doubt about the particular test in the test suit ref.json#L179 :
Is the "definitions" keyword is just a convention or is a part of the specification? Thank you, D. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
It's kind of both part of the specification and convention. A reference will evaluate anything you point to as a schema. For example, this should work.
However, the validator doesn't know the
The However, Note that |
Beta Was this translation helpful? Give feedback.
-
Thank you, Jason for clearing it. That was the question - whether I must always parse "definitions" (otherwise no $id(s) or $anchor(s) would be recovered while json pointer may fail). |
Beta Was this translation helpful? Give feedback.
It's kind of both part of the specification and convention. A reference will evaluate anything you point to as a schema. For example, this should work.
However, the validator doesn't know the
mydefs
keyword and doesn't know that it's values are schemas. This example wouldn't work.The
id
isn't recognized as an identifier because the validator doesn't know thatmydefs
values should be processed as sch…