-
Notifications
You must be signed in to change notification settings - Fork 23
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
Example from specification fails with NPE #12
Comments
I tested it this way and it worked: {
"$defs": {
"tree": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://example.com/tree",
"$dynamicAnchor": "node",
"type": "object",
"properties": {
"data": true,
"children": {
"type": "array",
"items": {
"$dynamicRef": "#node"
}
}
}
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://example.com/strict-tree",
"$dynamicAnchor": "node",
"$ref": "tree",
"unevaluatedProperties": false
} {
"children": [ { "daat": 1 } ]
} But I will attempt to patch your test locally and see what happens. |
Maybe it doesn't work because |
Step one is to not NPE if $dynamicAnchor doesn't resolve, which is obviously bad. c2d871f It doesn't fix your test case though so I'll look more into that. |
OK the issue is the port spec in the URL http://localhost:1234/strict-tree.json. The library was mishandling those. e5d884a contains fixes for this specific test case (although it's possible there are more). |
I've prepared test suite based on https://json-schema.org/draft/2020-12/json-schema-core.html#recursive-example in json-schema-org/JSON-Schema-Test-Suite#521
Currently it fails with NullPointerException:
The text was updated successfully, but these errors were encountered: