-
-
Notifications
You must be signed in to change notification settings - Fork 233
Syntax erro - Pointers must begin with "#/" #42
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
This error means that you have an invalid |
This is a valid bug; it violates the spec WRT internal links. Internal links are not necessarily JSON pointers.
ajv gets it right see also http://json-schema.org/latest/json-schema-core.html#rfc.section.9.2 $id "To name subschemas in a JSON Schema document, subschemas can use "$id" to give themselves a document-local identifier. This is done by setting "$id" to a URI reference consisting only of a fragment. The fragment identifier MUST begin with a letter ([A-Za-z]), followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), or periods (".")." http://json-schema.org/latest/json-schema-core.html#rfc.section.9.2.1 Internal links "Schemas can be identified by any URI that has been given to them, including a JSON Pointer or their URI given directly by "$id". Tools SHOULD take note of the URIs that schemas, including subschemas, provide for themselves using "$id". This is known as "Internal referencing"." http://json-schema.org/latest/json-schema-core.html#rfc.section.5 Fragment identifiers "plain name fragment identifiers are reserved for referencing locally named schemas. All fragment identifiers that do not match the JSON Pointer syntax MUST be interpreted as plain name fragment identifiers." |
as a stopgap the program could simply ignore internal refs. Not ideal but better than crashing. |
Example dereferencing local refs
|
this seems to duplicate #17 |
I intend to support inline references in the next version of JSON Schema $Ref Parser, which I have already begun working on. 👍 In the meantime, I will implement @n1ywb's stopgap recommendation of ignoring these references. |
…is a stop-gap fix for Issue #42.
I just published version 3.3.1, which includes the stopgap fix that @n1ywb suggested |
6.1.0 has the same bug |
I think this might also be related to #136 |
Faced it today in 9.0.6 version. |
Hi there, I just started getting this error today. Not sure what changed or how to fix it.
Any ideas?
The text was updated successfully, but these errors were encountered: