-
-
Notifications
You must be signed in to change notification settings - Fork 151
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
Pointer in a referenced schema does not seem to work right. #481
Comments
Short answerNo, the change wasn't reverted. You need to update SchemaRegistry.Global.Register(new Uri(path), schema); to SchemaRegistry.Global.Register(schema); Long answerThe way you're registering the schemas is causing the .net root cause to surface again. This new Uri(path) is the exact problem. If you want to rebuild the URI, you need to include the Secondarily, You shouldn't need to reload the schema in your (That's actually not a bad idea to build into the schema loading methods...) |
(I love your profile pic, BTW. Is that the one that was generated for you, or did you do that on purpose?) |
Thank you kindly for the detailed answer! :) ( Haha, yes, this profile pic was generated :D It is so good that I did not change it since ) |
It is working fine now! |
Environment
Describe the bug
Getting an exception when trying to evaluate a basic local file with a schema which has a reference to another schema which has a pointer in it.
Json.Schema.JsonSchemaException: 'Cannot resolve base schema from 'file:///.../json-everythingValidationTest/bin/Debug/net6.0/files/schemas/%23/definitions/values''
In the URI # gets replaced with %23
To Reproduce
I created a really small example project for it: repo
Expected behavior
The file gets validated.
I am not sure if I am doing something wrong, or is it a bug in the package.
The text was updated successfully, but these errors were encountered: