public enum Draft extends Enum<Draft>
| Enum Constant and Description |
|---|
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
|
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
|
| Modifier and Type | Method and Description |
|---|---|
static Draft |
from(String string)
Converts a draft number to a
Draft enum value. |
static Draft |
fromIdentifier(String string)
Converts a draft identifier to a
Draft enum value. |
String |
getIdentifier() |
static Draft |
valueOf(String name)
Returns 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.
|
public static final Draft DRAFT4
public static final Draft DRAFT7
public static final Draft DRAFT201909
public static final Draft DRAFT202012
public static Draft[] values()
for (Draft c : Draft.values()) System.out.println(c);
public static Draft valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic String getIdentifier()
public static Draft from(String string)
Draft enum value.string - A draft number, e.g.: [4|7|8|2019-09|2020-12]Copyright © 2023 Eclipse. All rights reserved.