ljsonschema icon indicating copy to clipboard operation
ljsonschema copied to clipboard

Full list of Error messages

Open SwethaCleo opened this issue 5 years ago • 3 comments

In case there are more than 2 errors in the document, how can we get the complete list? The ljsonschema currently returns only 1 error.

SwethaCleo avatar Jun 19 '19 19:06 SwethaCleo

Yes, I did it that way initially to return as fast as possible as I am using this library to validate untrusted network payloads (actually the error is not even shown in that case). I guess that trying to carry on might make sense in some cases. So to answer the question, no, it is currently impossible to get the full list of errors.

jdesgats avatar Jun 22 '19 18:06 jdesgats

Hi @jdesgats , it would be great if that could be done. We can have an flag for the user to either abort on 1st error or capture the full list of errors. Your's is one of the best working jsonschema validators for lua that I have found and if this option is included we need not write custom code in another language only so that we get this added feature of complete errors list. Thanks in advance,

SwethaCleo avatar Jun 22 '19 18:06 SwethaCleo

Hi, I don't have any plans to implement that anytime soon unfortunately. I'd happily review a pull request but I don't have time to work on this at the moment.

jdesgats avatar Jun 24 '19 20:06 jdesgats