Open tyilo opened 3 years ago
Hmm, actually the problem seems to be that #/$defs/reference
is not mapped to urn:defs-test#/$defs/reference
Thanks for the report and apologies for the delay investigating. There's been a problem with the scheme 'urn'. It seems it doesn't play nice with the constructor for java.net.URI, which I use throughout. I pushed enough to fix the precise issue above (thanks for the test case) but will need to do more digging to make sure it works throughout.
When I use urn:
with $dynamicRef
/$dynamicAnchor
I get same error.
Sorry to read that; could you confirm that you are using 0.11.2.
If you are, could you paste an example of a failed case here? You can check it in advance on https://tryjsonschematypes.appspot.com/#validate
I got java.lang.IllegalStateException: java.net.URISyntaxException: Expected scheme-specific part at index 4: urn:
for
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "urn:java:common.proto.Message",
"title": "Message itself",
"type": "object",
"properties": {
"head": {
"type": "object"
},
"body": {
"$dynamicRef": "#body"
}
},
"required": ["head", "body"],
"additionalProperties": false,
"$defs": {
"body": {
"$dynamicAnchor": "body",
"type": "object"
}
}
}
When loading the following schema I get a warning: