Class Error
- 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.Returns the expected types from the schema's "type" keyword.getIndex()The instance location is the location of the JSON value within the root instance being validated.tools.jackson.databind.JsonNodeReturns the instance node which was evaluated.Gets the formatted error message.Returns the property with the error.tools.jackson.databind.JsonNodegetPropertySchema(String propertyName) Returns the schema node for a specific property.The schema location is the canonical IRI of the schema object plus a JSON Pointer fragment indicating the subschema that produced a result.tools.jackson.databind.JsonNodeReturns the schema node which was evaluated.Returns all property names defined in the schema's "properties" keyword.inthashCode()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 tools.jackson.databind.JsonNode getInstanceNode()Returns the instance node which was evaluated.This corresponds with the instance location.
- Returns:
- the instance node
-
getSchemaNode
public tools.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
-
getSchemaPropertyNames
Returns all property names defined in the schema's "properties" keyword.This is useful for IDE integrations that need to suggest valid property names for quick fixes (e.g., "did you mean..." suggestions).
- Returns:
- list of property names from schema, or empty list if not available
-
getExpectedTypes
Returns the expected types from the schema's "type" keyword.The type field can be either a string (single type) or an array (union type). This method normalizes both cases into a list.
Example schemas: - {"type": "string"} → ["string"] - {"type": ["string", "number"]} → ["string", "number"]
- Returns:
- list of expected type names, or empty list if not available
-
getPropertySchema
Returns the schema node for a specific property.This retrieves the schema from schemaNode.get("properties").get(propertyName). Useful for IDE integrations that need to inspect the schema of individual properties (e.g., to generate quick fixes based on property-level constraints).
- Parameters:
propertyName- the property name to look up- Returns:
- the schema node for the property, or null if not found
-
getArguments
-
getDetails
-
getMessage
Gets the formatted error message.- Returns:
- the error message
-
getMessageKey
-
toString
-
equals
-
hashCode
public int hashCode() -
getKeyword
-
builder
-