-
-
Notifications
You must be signed in to change notification settings - Fork 311
Typo in section 8.2.3 of draft 7 leading to wrong information #1499
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
Comments
No, this is correct: using an In fairness, the spec uses "non-empty" in other places and should use it here, too. |
So, using fragment in $id here means using fragment along with baseURI or base reference URI? |
There's definitely something not quite right about that line. Greg, I think you're thinking of a case like, If it said, "that is blank", it would make the sentence make sense. However, I don't think that needs to be said at all. I think it's clear enough that an empty fragment would not follow the plain name syntax. In any case, we can't change already published releases. We'll have to check if this error is still present and fix it in the next release. |
This is the current text. It looks like the problem has been corrected, so I'm going to close this issue. |
https://json-schema.org/draft-07/draft-handrews-json-schema-01#rfc.section.8.2.3
Using JSON Pointer fragments requires knowledge of the structure of the schema. When writing schema documents with the intention to provide re-usable schemas, it may be preferable to use a plain name fragment that is not tied to any particular structural location. This allows a subschema to be relocated without requiring JSON Pointer references to be updated.
To specify such a subschema identifier, the "$id" keyword is set to a URI reference with a plain name fragment (not a JSON Pointer fragment). This value MUST begin with the number sign that specifies a fragment ("#"), then a letter ([A-Za-z]), followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), or periods (".").
The effect of using a fragment in "$id" that isn't blank or doesn't follow the plain name syntax is undefined. [CREF3]
------- The last line, I think it should be
"$id" that is blank
instead of"$id" that isn't blank
The text was updated successfully, but these errors were encountered: