Class ValidationMessage
java.lang.Object
com.networknt.schema.ValidationMessage
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Object[]private final Stringprivate final JsonNodePathprivate final JsonNodePathprivate final com.fasterxml.jackson.databind.JsonNodeprivate final Stringprivate final Stringprivate final SchemaLocationprivate final com.fasterxml.jackson.databind.JsonNodeprivate final String -
Constructor Summary
ConstructorsConstructorDescriptionValidationMessage(String type, String code, JsonNodePath evaluationPath, SchemaLocation schemaLocation, JsonNodePath instanceLocation, String property, Object[] arguments, Map<String, Object> details, String messageKey, Supplier<String> messageSupplier, com.fasterxml.jackson.databind.JsonNode instanceNode, com.fasterxml.jackson.databind.JsonNode schemaNode) -
Method Summary
Modifier and TypeMethodDescriptionstatic ValidationMessage.Builderbuilder()booleanObject[]getCode()getError()Gets the error.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.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.getType()inthashCode()booleanisValid()toString()
-
Field Details
-
type
-
code
-
evaluationPath
-
schemaLocation
-
instanceLocation
-
property
-
arguments
-
messageKey
-
messageSupplier
-
details
-
instanceNode
private final com.fasterxml.jackson.databind.JsonNode instanceNode -
schemaNode
private final com.fasterxml.jackson.databind.JsonNode schemaNode
-
-
Constructor Details
-
ValidationMessage
ValidationMessage(String type, String code, JsonNodePath evaluationPath, SchemaLocation schemaLocation, JsonNodePath instanceLocation, String property, Object[] arguments, Map<String, Object> details, String messageKey, Supplier<String> messageSupplier, com.fasterxml.jackson.databind.JsonNode instanceNode, com.fasterxml.jackson.databind.JsonNode schemaNode)
-
-
Method Details
-
getCode
-
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
-
getArguments
-
getDetails
-
getMessage
-
getMessageKey
-
isValid
public boolean isValid() -
getError
-
toString
-
equals
-
hashCode
-
getType
-
builder
-