Enum SchemaKeyword
- java.lang.Object
-
- java.lang.Enum<SchemaKeyword>
-
- com.github.victools.jsonschema.generator.SchemaKeyword
-
- All Implemented Interfaces:
Serializable
,Comparable<SchemaKeyword>
public enum SchemaKeyword extends Enum<SchemaKeyword>
JSON Schema properties and their values.
-
-
Enum Constant Summary
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
forVersion(SchemaVersion version)
Provide the appropriate tag name/value, considering the specified schema version.static Stream<SchemaKeyword>
getTagStream()
static SchemaKeyword
valueOf(String name)
Returns the enum constant of this type with the specified name.static SchemaKeyword[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
TAG_SCHEMA
public static final SchemaKeyword TAG_SCHEMA
-
TAG_SCHEMA_VALUE
public static final SchemaKeyword TAG_SCHEMA_VALUE
-
TAG_ID
public static final SchemaKeyword TAG_ID
-
TAG_ANCHOR
public static final SchemaKeyword TAG_ANCHOR
Beware that this keyword was only introduced inSchemaVersion.DRAFT_2019_09
.
-
TAG_DEFINITIONS
public static final SchemaKeyword TAG_DEFINITIONS
-
TAG_REF
public static final SchemaKeyword TAG_REF
BeforeSchemaVersion.DRAFT_2019_09
all other properties in the same sub-schema besides this one were ignored.
-
TAG_REF_MAIN
public static final SchemaKeyword TAG_REF_MAIN
-
TAG_REF_PREFIX
@Deprecated public static final SchemaKeyword TAG_REF_PREFIX
Deprecated.is now implicitly created based onTAG_DEFINITIONS
or an explicit alternative definitions pathCommon prefix of all standardTAG_REF
values.
-
TAG_TYPE
public static final SchemaKeyword TAG_TYPE
-
TAG_TYPE_NULL
public static final SchemaKeyword TAG_TYPE_NULL
-
TAG_TYPE_ARRAY
public static final SchemaKeyword TAG_TYPE_ARRAY
-
TAG_TYPE_OBJECT
public static final SchemaKeyword TAG_TYPE_OBJECT
-
TAG_TYPE_BOOLEAN
public static final SchemaKeyword TAG_TYPE_BOOLEAN
-
TAG_TYPE_STRING
public static final SchemaKeyword TAG_TYPE_STRING
-
TAG_TYPE_INTEGER
public static final SchemaKeyword TAG_TYPE_INTEGER
-
TAG_TYPE_NUMBER
public static final SchemaKeyword TAG_TYPE_NUMBER
-
TAG_PROPERTIES
public static final SchemaKeyword TAG_PROPERTIES
-
TAG_ITEMS
public static final SchemaKeyword TAG_ITEMS
-
TAG_REQUIRED
public static final SchemaKeyword TAG_REQUIRED
-
TAG_ADDITIONAL_PROPERTIES
public static final SchemaKeyword TAG_ADDITIONAL_PROPERTIES
-
TAG_PATTERN_PROPERTIES
public static final SchemaKeyword TAG_PATTERN_PROPERTIES
-
TAG_PROPERTIES_MIN
public static final SchemaKeyword TAG_PROPERTIES_MIN
-
TAG_PROPERTIES_MAX
public static final SchemaKeyword TAG_PROPERTIES_MAX
-
TAG_ALLOF
public static final SchemaKeyword TAG_ALLOF
-
TAG_ANYOF
public static final SchemaKeyword TAG_ANYOF
-
TAG_ONEOF
public static final SchemaKeyword TAG_ONEOF
-
TAG_NOT
public static final SchemaKeyword TAG_NOT
-
TAG_TITLE
public static final SchemaKeyword TAG_TITLE
-
TAG_DESCRIPTION
public static final SchemaKeyword TAG_DESCRIPTION
-
TAG_CONST
public static final SchemaKeyword TAG_CONST
-
TAG_ENUM
public static final SchemaKeyword TAG_ENUM
-
TAG_DEFAULT
public static final SchemaKeyword TAG_DEFAULT
-
TAG_READ_ONLY
public static final SchemaKeyword TAG_READ_ONLY
Beware that this keyword was only introduced inSchemaVersion.DRAFT_7
.
-
TAG_WRITE_ONLY
public static final SchemaKeyword TAG_WRITE_ONLY
Beware that this keyword was only introduced inSchemaVersion.DRAFT_7
.
-
TAG_LENGTH_MIN
public static final SchemaKeyword TAG_LENGTH_MIN
-
TAG_LENGTH_MAX
public static final SchemaKeyword TAG_LENGTH_MAX
-
TAG_FORMAT
public static final SchemaKeyword TAG_FORMAT
-
TAG_PATTERN
public static final SchemaKeyword TAG_PATTERN
-
TAG_MINIMUM
public static final SchemaKeyword TAG_MINIMUM
-
TAG_MINIMUM_EXCLUSIVE
public static final SchemaKeyword TAG_MINIMUM_EXCLUSIVE
-
TAG_MAXIMUM
public static final SchemaKeyword TAG_MAXIMUM
-
TAG_MAXIMUM_EXCLUSIVE
public static final SchemaKeyword TAG_MAXIMUM_EXCLUSIVE
-
TAG_MULTIPLE_OF
public static final SchemaKeyword TAG_MULTIPLE_OF
-
TAG_ITEMS_MIN
public static final SchemaKeyword TAG_ITEMS_MIN
-
TAG_ITEMS_MAX
public static final SchemaKeyword TAG_ITEMS_MAX
-
TAG_ITEMS_UNIQUE
public static final SchemaKeyword TAG_ITEMS_UNIQUE
-
TAG_IF
public static final SchemaKeyword TAG_IF
Beware that this keyword was only introduced inSchemaVersion.DRAFT_7
.
-
TAG_THEN
public static final SchemaKeyword TAG_THEN
Beware that this keyword was only introduced inSchemaVersion.DRAFT_7
.
-
TAG_ELSE
public static final SchemaKeyword TAG_ELSE
Beware that this keyword was only introduced inSchemaVersion.DRAFT_7
.
-
-
Method Detail
-
values
public static SchemaKeyword[] 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 (SchemaKeyword c : SchemaKeyword.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SchemaKeyword 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
-
forVersion
public String forVersion(SchemaVersion version)
Provide the appropriate tag name/value, considering the specified schema version.- Parameters:
version
- applicable JSON Schema version- Returns:
- corresponding tag name/value for this keyword in the indicated JSON Schema version
-
getTagStream
public static Stream<SchemaKeyword> getTagStream()
-
-