Validate schema against instance, returning a list of ValidationError.
If there are no validation errors, then this method returns an empty list. To limit the maximum number of errors returned, use setMaxErrors.
The default behavior is to return all errors, and to follow an unlimited number of references. For schemas with cyclic references, this may result in a stack overflow.
Return
a list of validation errors
Parameters
schema
the schema to validate against
instance
the JSON data to validate
Throws
if the number of references followed exceeds the configured maximum depth
private fun validate(state: Validator.ValidationState, schema: Schema, instance: JsonNode, parentTag: String?)
Validate schema against instance
Parameters
schema
the schema to validate against
instance
the JSON data to validate
state
the validation state, used to track errors
parentTag
the parent tag, used to prevent infinite recursion