Record Class JsonSchemaException.ValidationError
java.lang.Object
java.lang.Record
cloud.opencode.base.json.exception.JsonSchemaException.ValidationError
- Enclosing class:
JsonSchemaException
public static record JsonSchemaException.ValidationError(String path, String keyword, String message, Object expected, Object actual)
extends Record
Validation Error - Represents a Single Schema Validation Error
验证错误 - 表示单个 Schema 验证错误
- Since:
- JDK 25, opencode-base-json V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
ConstructorsConstructorDescriptionValidationError(String path, String keyword, String message) Creates a validation error with path, keyword, and message.Creates an instance of aValidationErrorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionactual()Returns the value of theactualrecord component.final booleanIndicates whether some other object is "equal to" this one.expected()Returns the value of theexpectedrecord component.final inthashCode()Returns a hash code value for this object.keyword()Returns the value of thekeywordrecord component.message()Returns the value of themessagerecord component.path()Returns the value of thepathrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
ValidationError
-
ValidationError
Creates an instance of aValidationErrorrecord class.- Parameters:
path- the value for thepathrecord componentkeyword- the value for thekeywordrecord componentmessage- the value for themessagerecord componentexpected- the value for theexpectedrecord componentactual- the value for theactualrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
keyword
Returns the value of thekeywordrecord component.- Returns:
- the value of the
keywordrecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
expected
Returns the value of theexpectedrecord component.- Returns:
- the value of the
expectedrecord component
-
actual
Returns the value of theactualrecord component.- Returns:
- the value of the
actualrecord component
-