Package com.networknt.schema
Class Error
java.lang.Object
com.networknt.schema.Error
Represents an error which could be when parsing a schema or when validating
an instance.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic Error.Builderbuilder()booleanObject[]The evaluation path is the set of keys, starting from the schema root, through which evaluation passes to reach the schema object that produced a specific result.getIndex()The instance location is the location of the JSON value within the root instance being validated.com.fasterxml.jackson.databind.JsonNodeReturns the instance node which was evaluated.Gets the formatted error message.Returns the property with the error.The schema location is the canonical IRI of the schema object plus a JSON Pointer fragment indicating the subschema that produced a result.com.fasterxml.jackson.databind.JsonNodeReturns the schema node which was evaluated.inthashCode()booleanisValid()toString()
-
Method Details
-
getInstanceLocation
The instance location is the location of the JSON value within the root instance being validated.- Returns:
- The path to the input json
-
getEvaluationPath
The evaluation path is the set of keys, starting from the schema root, through which evaluation passes to reach the schema object that produced a specific result.- Returns:
- the evaluation path
-
getSchemaLocation
The schema location is the canonical IRI of the schema object plus a JSON Pointer fragment indicating the subschema that produced a result. In contrast with the evaluation path, the schema location MUST NOT include by-reference applicators such as $ref or $dynamicRef.- Returns:
- the schema location
-
getInstanceNode
public com.fasterxml.jackson.databind.JsonNode getInstanceNode()Returns the instance node which was evaluated.This corresponds with the instance location.
- Returns:
- the instance node
-
getSchemaNode
public com.fasterxml.jackson.databind.JsonNode getSchemaNode()Returns the schema node which was evaluated.This corresponds with the schema location.
- Returns:
- the schema node
-
getProperty
Returns the property with the error.For instance, for the required validator the instance location does not contain the missing property name as the instance must refer to the input data.
- Returns:
- the property name
-
getIndex
-
getArguments
-
getDetails
-
getMessage
Gets the formatted error message.- Returns:
- the error message
-
getMessageKey
-
isValid
public boolean isValid() -
toString
-
equals
-
hashCode
public int hashCode() -
getKeyword
-
builder
-