-
Notifications
You must be signed in to change notification settings - Fork 325
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
Error handling as per draft 2019-09 section 10. #286
Comments
@prashanthjos This has been discussed in several issues; however, nobody is actively working on this yet. I would be very happy to accept a PR is someone wants to work on it. As this issue mentioned the guideline from the json-schema-core, we should follow it when implementing the error handling. Given that, I have closed the following related issues as they are all about error messages and should be addressed at the same time. During the implementation, we need to double-check if these issues are addressed at the same time. |
Thank you @stevehu. Should we preserve the signature of the validate method on JsonSchema class. To support the new error message formats , the recursive validate calls should start returning JsonNode Array that represent the errors occurred in each validator rather than a Set. We can collate the error nodes during the recursive call stack. If we should preserve the signature of validate method should we introduce a new "validateJson" method that does the recursive procedure mentioned above. This might change signatures and code in majority of validators. Please let me know your thoughts. |
@prashanthjos As this is a major change to the library, signature change is OK and we can bump up the release to 1.1.0 afterward. |
Also the way spec represents either the error schema path or error data node path doesn’t follow neither of JSON path or JSON pointer representations. Any thoughts? |
The spec mentioned JSON pointer, but this field is changing so fast these days. Here is something I found in the above link.
|
@stevehu I'm not sure what this change exactly entails in term of the |
The major change is the structure of the message, which contains more information. I am not sure if the signature would be changed though. If yes, I agree that we should bump up to 2.0.0. |
Is there any plan to include the new error handling with the networknt library as outlined in the draft spec below.
https://json-schema.org/draft/2019-09/json-schema-core.html#rfc.section.10
I am planing to use this feature . Can you please let me know if there is any work happening in this area.
The text was updated successfully, but these errors were encountered: