Replies: 4 comments 5 replies
-
@pmad7954 We already have an open issue (#680) for a similar feature and as noted by @stevehu, we currently expect the provided schema to be valid and only do minimal testing of the schema. Right now, the library only produces errors about the JSON instance being validated; it does not produce any other type of message. I also have a need to validate my schemas but I cannot do that until all the schema keywords work as specified and pass all the JSON Schema Test Suite conformance tests. I assume that your warnings would be equivalent to the lint output mentioned in that issue. I have a few other ideas on this:
Can you provide examples of what you would consider an error and warning in this context? |
Beta Was this translation helpful? Give feedback.
-
@pmad7954 I just read you Stackoverflow question and that is a little different from what you described here. If you only need programmatic access to the extra information, you could try leveraging the Custom Message support to hack something. See |
Beta Was this translation helpful? Give feedback.
-
I posted a response to your Stackoverflow question. I think your question was overlooked because there are many libraries that qualify as |
Beta Was this translation helpful? Give feedback.
-
Hi @fdutton / @pmad7954 , I also have a similar requirement (I want to be able to categorise the validation failures and only if the failure is of a certain severity I want to act on it, otherwise just ignore it). While I do see how we can use custom messages to solve this problem as mentioned in the stack overflow answer, but it can be limiting for my exact requirement. I am wondering if JsonSchemaWalkers can be somehow used here? What do you think? |
Beta Was this translation helpful? Give feedback.
-
Hi Team,
First I need to tell you that I'm very satisfied with the json-schema-validator library and I appreciate your contribution there.
If I explain my question, simply I need to differentiate the validation failures, errors, and warns, and based on the type I decide how to print that through a Java code. I raise my question in StackOverflow but I did not get any answers there. I hope someone here will help me to do what I need. I have explained this thoroughly in the StackOverflow question, use the following link to view it.
Stackoverflow question
TIA!
Beta Was this translation helpful? Give feedback.
All reactions