Enum SchemaVersion
- java.lang.Object
-
- java.lang.Enum<SchemaVersion>
-
- com.github.victools.jsonschema.generator.SchemaVersion
-
- All Implemented Interfaces:
Serializable
,Comparable<SchemaVersion>
public enum SchemaVersion extends Enum<SchemaVersion>
Supported JSON Schema Versions.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DRAFT_2019_09
DRAFT_2020_12
DRAFT_6
DRAFT_7
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getIdentifier()
Getter for the$schema
tag's value.static SchemaVersion
valueOf(String name)
Returns the enum constant of this type with the specified name.static SchemaVersion[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DRAFT_6
public static final SchemaVersion DRAFT_6
-
DRAFT_7
public static final SchemaVersion DRAFT_7
-
DRAFT_2019_09
public static final SchemaVersion DRAFT_2019_09
-
DRAFT_2020_12
public static final SchemaVersion DRAFT_2020_12
-
-
Method Detail
-
values
public static SchemaVersion[] 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 (SchemaVersion c : SchemaVersion.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SchemaVersion 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
-
getIdentifier
public String getIdentifier()
Getter for the$schema
tag's value.- Returns:
- value for the
$schema
tag
-
-