-
Notifications
You must be signed in to change notification settings - Fork 280
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
Use of $id in $ref is not working #321
Comments
Hello @sunilgunisetty , for now I suggest using the I re-read the current version of the spec and I think what you ask for should work (though previous json schema drafts explained it differently). But it isn't covered by the official test suite, so I'm not 100% sure. Let's keep this issue open as a feature request. |
@erosb Thank you. |
I think this says it should work? https://json-schema.org/latest/json-schema-core.html#rfc.section.8.2.4 |
* added integ test for reproducing the problem * test update: `JsonPointerEvaluatorTest#JsonPointerEvaluatorTest()` now expects the source URI to be set as location for remote fetched documents - updating `JsonPointerEvaluator#configureBasedOnState()` to pass the test * for reference schemas, using the location of the found object (instead of the resolved URI) as schema location * changing `JsonPointerEvaluator#query()` to first try to lookup the result schema by $id in the containing document, before trying to use it as a json pointer * adding some missing `final` modifiers to fields
This is now fixed and released in version 1.12.0. |
I have the following schema in 2 different files.
and
When I try to load
ProductDescription.json
I get exception with a messagea JSON pointer should start with '/' or '#/'
.I am using static
load
method inSchemaLoader
class to load the schema.In my front end I use
ajv
with the same files and it works without any issue.Am I missing something / am I using wrong methods. Any suggestions is highly appreciated.
The text was updated successfully, but these errors were encountered: