-
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
Is it possible to have all errors reported in one step? #6
Comments
@balasaalin thank your for reporting this issue. The current version of the library was designed with only having the "if the JSON is valid" question in mind, but enhancing it to scan everything and to provide a list of failures in a programmatically consumable manner makes sense for me. So my idea is to enhance the
I will try to handle it without breaking the current API. |
This would be a really nice feature. |
I tested this feature with a complicated structure and have an issue. Inner Object which is contained inside an array doesn't seem to be picked up in validation. I'm using this site for reference which does detect the error in the below example: http://jsonschemalint.com/draft4/# JSON Document:
Schema:
|
@illumi are you sure you tested it with version 1.1.0 ? |
@erosb Ah, my bad. It seems to work perfectly :) |
Ok, great :) I'm closing this issue. |
Hello, The 2nd message should be about "additioanl" property. Schema:
Data: |
No urgency on my side. |
Was this bugfix ever released? I still have this issue. |
Hello, this was fixed in version |
The validator reports only the first error it encounters and stops. It would be useful to report all the errors.
For the JSON instance and JSON Schema samples below, I would expect to get both errors without having to fix one error and then validate again in order to get the second error:
expected type: String, found: Integer
extraneous key [otherProp] is not permitted
Schema:
Instance:
The text was updated successfully, but these errors were encountered: