-
-
Notifications
You must be signed in to change notification settings - Fork 242
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
Errors for required properties do not contain the fragment correctly. #115
Comments
The error message seems correct to me; it is stating that the object at |
@pd Hm good point, but in that case this could be clarified by using a better error message. The current error message is far too cryptic. |
👍 @pd - the error messages are what I would expect to see. @yorickpeterse, how would you make them better? :) |
I am definitely open to suggestions on improving the wording of the error text, but I am unsure that this particular message needs more clarity. I would be happy to hear suggestions, but I am going to close this issue as it is not a code defect. Please feel free to continue the discussion! |
The only way I can think of making the error message more informative would be to display the part of the schema that fails the validation - but that would be a fair bit of effort, I think. |
Something along the lines of the following is at least less confusing: |
Assume we have the following script (based on the documentation in the README):
Running this results in the following output:
This error message doesn't seem to include the fragment for the "a" property correctly. If we specify an incorrect type on the other hand it is set properly:
Which results in:
The text was updated successfully, but these errors were encountered: