public enum SchemaVersion extends Enum<SchemaVersion>
Members of this enum offer two informations about JSON Schemas:
$schema
),JsonNode
).Enum Constant and Description |
---|
DRAFTV3
Draft v3
|
DRAFTV4
Draft v4 (default version)
|
DRAFTV4_HYPERSCHEMA
Draft v4 hyperschema
|
Modifier and Type | Method and Description |
---|---|
URI |
getLocation()
Return the value of
$schema as a JsonRef |
JsonNode |
getSchema()
Return the meta schema as JSON
|
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.
|
public static final SchemaVersion DRAFTV4
public static final SchemaVersion DRAFTV3
public static final SchemaVersion DRAFTV4_HYPERSCHEMA
public static SchemaVersion[] values()
for (SchemaVersion c : SchemaVersion.values()) System.out.println(c);
public static SchemaVersion 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 URI getLocation()
$schema
as a JsonRef
public JsonNode getSchema()
Note: since JsonNode
is mutable, this method returns a copy.
JsonNode.deepCopy()