Enum JavaxValidationOption
- java.lang.Object
-
- java.lang.Enum<JavaxValidationOption>
-
- com.github.victools.jsonschema.module.javax.validation.JavaxValidationOption
-
- All Implemented Interfaces:
Serializable
,Comparable<JavaxValidationOption>
public enum JavaxValidationOption extends Enum<JavaxValidationOption>
Flags to enable/disable certain aspects of theJavaxValidationModule
's processing.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INCLUDE_PATTERN_EXPRESSIONS
Use this option to include a string's "pattern" according to@Pattern(regexp = "...")
or@Email(regexp = "...")
.NOT_NULLABLE_FIELD_IS_REQUIRED
Use this option to add not-nullable fields to their parent's list of "required" properties.NOT_NULLABLE_METHOD_IS_REQUIRED
Use this option to add not-nullable methods to their parent's list of "required" properties.PREFER_IDN_EMAIL_FORMAT
Use this option to indicate the "idn-email" format instead of "email" when an@Email
annotation is being found.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static JavaxValidationOption
valueOf(String name)
Returns the enum constant of this type with the specified name.static JavaxValidationOption[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NOT_NULLABLE_FIELD_IS_REQUIRED
public static final JavaxValidationOption NOT_NULLABLE_FIELD_IS_REQUIRED
Use this option to add not-nullable fields to their parent's list of "required" properties.
-
NOT_NULLABLE_METHOD_IS_REQUIRED
public static final JavaxValidationOption NOT_NULLABLE_METHOD_IS_REQUIRED
Use this option to add not-nullable methods to their parent's list of "required" properties.
-
PREFER_IDN_EMAIL_FORMAT
public static final JavaxValidationOption PREFER_IDN_EMAIL_FORMAT
Use this option to indicate the "idn-email" format instead of "email" when an@Email
annotation is being found.
Beware that this format was only introduced inSchemaVersion.DRAFT_7
.
-
INCLUDE_PATTERN_EXPRESSIONS
public static final JavaxValidationOption INCLUDE_PATTERN_EXPRESSIONS
Use this option to include a string's "pattern" according to@Pattern(regexp = "...")
or@Email(regexp = "...")
.
-
-
Method Detail
-
values
public static JavaxValidationOption[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (JavaxValidationOption c : JavaxValidationOption.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JavaxValidationOption valueOf(String name)
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
-
-