[BUG] Schemas without $id
will fail validation on spec-compliant JSON Schema validators
#550
Open
2 tasks done
Labels
bug
Something isn't working
Describe the bug.
Consider this concise variant of
schemas/1.0.0-without-$id.json
:Under a compliant implementation, the
$ref
at/definitions/externalDocs/patternProperties/^x-/$ref
will resolve against the identifier at/definitions/externalDocs/id
, leading to/definitions/externalDocs/definitions/vendorExtension
instead of/definitions/vendorExtension
as expected.Expected behavior
When producing these schema versions without
$id
, I think you should actually remove the nested identifiers. That way it works for implementations that don't support$id
(like Visual Studio Code) and for compliant implementations too.Screenshots
None
How to Reproduce
Try to perform validation using
schemas/1.0.0-without-$id.json
🥦 Browser
None
👀 Have you checked for similar open issues?
🏢 Have you read the Contributing Guidelines?
Are you willing to work on this issue ?
Yes I am willing to submit a PR!
The text was updated successfully, but these errors were encountered: