Enum Draft
- All Implemented Interfaces:
Serializable, Comparable<Draft>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDraft 2019-09 - https://json-schema.org/draft/2019-09/schema Commonly used by many projectsDraft 2020-12 - https://json-schema.org/draft/2020-12/schema Usually used by OpenAPI 3.1Draft 4 - http://json-schema.org/draft-04/schema# Usually used by OpenAPI 3.0Draft 7 - http://json-schema.org/draft-07/schema# Commonly used by many projects -
Method Summary
Modifier and TypeMethodDescriptionstatic DraftConverts a draft number to aDraftenum value.static DraftfromIdentifier(String string) Converts a draft identifier to aDraftenum value.booleanbooleanstatic DraftReturns the enum constant of this type with the specified name.static Draft[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
DRAFT4
Draft 4 - http://json-schema.org/draft-04/schema# Usually used by OpenAPI 3.0 -
DRAFT7
Draft 7 - http://json-schema.org/draft-07/schema# Commonly used by many projects -
DRAFT201909
Draft 2019-09 - https://json-schema.org/draft/2019-09/schema Commonly used by many projects -
DRAFT202012
Draft 2020-12 - https://json-schema.org/draft/2020-12/schema Usually used by OpenAPI 3.1
-
-
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
-
getIdentifier
- Returns:
- the identifier of the draft version.
-
from
-
fromIdentifier
-
isAfter
- Parameters:
draft- to check against- Returns:
- true if the draft instance was released after the draft provided.
-
isBefore
- Parameters:
draft- to check against- Returns:
- true if the draft instance was released before the draft provided.
-