Package com.networknt.schema
Enum PathType
- All Implemented Interfaces:
Serializable,Comparable<PathType>,java.lang.constant.Constable
Enumeration defining the different approached available to generate the paths added to validation messages.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionPaths as JSONPath expressions.Paths as JSONPointer expressions.The legacy approach, loosely based on JSONPath (but not guaranteed to give valid JSONPath expressions).Paths as a URI reference. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionAppend the given index to the provided current path.Append the given child token to the provided current path.convertToJsonPointer(String path) getRoot()Return the representation of the document root.static PathTypeReturns the enum constant of this type with the specified name.static PathType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
LEGACY
The legacy approach, loosely based on JSONPath (but not guaranteed to give valid JSONPath expressions). -
JSON_PATH
Paths as JSONPath expressions. -
JSON_POINTER
Paths as JSONPointer expressions. -
URI_REFERENCE
Paths as a URI reference.
-
-
Field Details
-
DEFAULT
The default path generation approach to use.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
append
Append the given child token to the provided current path.- Parameters:
currentPath- The path to append to.child- The child token.- Returns:
- The resulting complete path.
-
append
Append the given index to the provided current path.- Parameters:
currentPath- The path to append to.index- The index to append.- Returns:
- The resulting complete path.
-
getRoot
Return the representation of the document root.- Returns:
- The root token.
-
convertToJsonPointer
-