-
Notifications
You must be signed in to change notification settings - Fork 376
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
doesn't work when $ref has an id #107
Comments
apparently this is a lingering issue APIDevTools/json-schema-ref-parser#22 (comment) |
Hi @andreineculau. That is not a valid usage of {
"id": "foo",
"type": "object",
"properties": {
"foo": {
"$ref": "#"
}
},
"additionalProperties": false
} The issue is unrelated to the one you linked, and is simply how the JSONPointer and JSONSchema specs define $refs. If a $ref doesn't begin with |
Well, fwiw that was not the case for JSON Schema v4, and that's what I have specified in my local schema's https://tools.ietf.org/html/draft-zyp-json-schema-04#section-7.2.3 |
Read more carefully:
Don't rely on inline dereferencing. |
this should work
but it doesn't - json-schema-to-typescript will try to read a file called "foo", despite having a reference to a schema with id "foo"
The text was updated successfully, but these errors were encountered: