|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.fasterxml.jackson.databind.jsonSchema.types.JsonSchema
public abstract class JsonSchema
The type wraps the json schema specification at : Json JsonSchema Draft
JSON (JavaScript Object Notation) JsonSchema defines the media type "application/schema+json", a JSON based format for defining the structure of JSON data. JSON JsonSchema provides a contract for what JSON data is required for a given application and how to interact with it. JSON JsonSchema is intended to define validation, documentation, hyperlink navigation, and interaction control of JSON data.
JSON (JavaScript Object Notation) JsonSchema is a JSON media type for defining the structure of JSON data. JSON JsonSchema provides a contract for what JSON data is required for a given application and how to interact with it. JSON JsonSchema is intended to define validation, documentation, hyperlink navigation, and interaction control of JSON data.An example JSON JsonSchema provided by the JsonSchema draft:
{
"name":"Product",
"properties":{
"id":{
"type":"number",
"description":"Product identifier",
"required":true
},
"name":{
"description":"Name of the product",
"type":"string",
"required":true
},
"price":{
"required":true,
"type": "number",
"minimum":0,
"required":true
},
"tags":{
"type":"array",
"items":{
"type":"string"
}
}
},
"links":[
{
"rel":"full",
"href":"{id}"
},
{
"rel":"comments",
"href":"comments/?id={id}"
}
]
}
| Nested Class Summary | |
|---|---|
static class |
JsonSchema.JsonSchemaIdResolver
|
| Constructor Summary | |
|---|---|
JsonSchema()
|
|
| Method Summary | |
|---|---|
AnySchema |
asAnySchema()
Attempt to return this JsonSchema as an AnySchema |
ArraySchema |
asArraySchema()
Attempt to return this JsonSchema as an ArraySchema |
BooleanSchema |
asBooleanSchema()
Attempt to return this JsonSchema as a BooleanSchema |
ContainerTypeSchema |
asContainerSchema()
Attempt to return this JsonSchema as a ContainerTypeSchema |
IntegerSchema |
asIntegerSchema()
Attempt to return this JsonSchema as an IntegerSchema |
NullSchema |
asNullSchema()
Attempt to return this JsonSchema as a NullSchema |
NumberSchema |
asNumberSchema()
Attempt to return this JsonSchema as a NumberSchema |
ObjectSchema |
asObjectSchema()
Attempt to return this JsonSchema as an ObjectSchema |
SimpleTypeSchema |
asSimpleTypeSchema()
Attempt to return this JsonSchema as a SimpleTypeSchema |
StringSchema |
asStringSchema()
Attempt to return this JsonSchema as a StringSchema |
UnionTypeSchema |
asUnionTypeSchema()
Attempt to return this JsonSchema as an UnionTypeSchema |
ValueTypeSchema |
asValueSchemaSchema()
Attempt to return this JsonSchema as a ValueTypeSchema |
boolean |
equals(Object obj)
|
String |
get$ref()
$ref |
String |
get$schema()
$schema |
JsonSchema[] |
getDisallow()
disallow |
JsonSchema[] |
getExtends()
extendsextends |
String |
getId()
id |
Boolean |
getRequired()
required |
abstract com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatTypes |
getType()
|
boolean |
isAnySchema()
determine if this JsonSchema is an AnySchema. |
boolean |
isArraySchema()
determine if this JsonSchema is an ArraySchema. |
boolean |
isBooleanSchema()
determine if this JsonSchema is an BooleanSchema. |
boolean |
isContainerTypeSchema()
determine if this JsonSchema is an ContainerTypeSchema. |
boolean |
isIntegerSchema()
determine if this JsonSchema is an IntegerSchema. |
boolean |
isNullSchema()
determine if this JsonSchema is an NullSchema. |
boolean |
isNumberSchema()
determine if this JsonSchema is an NumberSchema. |
boolean |
isObjectSchema()
determine if this JsonSchema is an ObjectSchema. |
boolean |
isSimpleTypeSchema()
determine if this JsonSchema is an SimpleTypeSchema. |
boolean |
isStringSchema()
determine if this JsonSchema is an StringSchema. |
boolean |
isUnionTypeSchema()
determine if this JsonSchema is an UnionTypeSchema. |
boolean |
isValueTypeSchema()
determine if this JsonSchema is an ValueTypeSchema. |
static JsonSchema |
minimalForFormat(com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatTypes format)
Create a schema which verifies only that an object is of the given format. |
void |
set$ref(String $ref)
$ref |
void |
set$schema(String $schema)
$schema |
void |
setDisallow(JsonSchema[] disallow)
disallow |
void |
setExtends(JsonSchema[] extendsextends)
extendsextends |
void |
setId(String id)
id |
void |
setRequired(Boolean required)
required |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JsonSchema()
| Method Detail |
|---|
public AnySchema asAnySchema()
AnySchema
public ArraySchema asArraySchema()
ArraySchema
public BooleanSchema asBooleanSchema()
BooleanSchema
public ContainerTypeSchema asContainerSchema()
ContainerTypeSchema
public IntegerSchema asIntegerSchema()
IntegerSchema
public NullSchema asNullSchema()
NullSchema
public NumberSchema asNumberSchema()
NumberSchema
public ObjectSchema asObjectSchema()
ObjectSchema
public SimpleTypeSchema asSimpleTypeSchema()
SimpleTypeSchema
public StringSchema asStringSchema()
StringSchema
public UnionTypeSchema asUnionTypeSchema()
UnionTypeSchema
public ValueTypeSchema asValueSchemaSchema()
ValueTypeSchema
public boolean equals(Object obj)
equals in class Objectpublic String get$ref()
$ref
public String get$schema()
$schema
public JsonSchema[] getDisallow()
disallow
public JsonSchema[] getExtends()
extendsextends
public String getId()
id
public Boolean getRequired()
required
public abstract com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatTypes getType()
public boolean isAnySchema()
AnySchema.
public boolean isArraySchema()
ArraySchema.
public boolean isBooleanSchema()
BooleanSchema.
public boolean isContainerTypeSchema()
ContainerTypeSchema.
public boolean isIntegerSchema()
IntegerSchema.
public boolean isNullSchema()
NullSchema.
public boolean isNumberSchema()
NumberSchema.
public boolean isObjectSchema()
ObjectSchema.
public boolean isSimpleTypeSchema()
SimpleTypeSchema.
public boolean isStringSchema()
StringSchema.
public boolean isUnionTypeSchema()
UnionTypeSchema.
public boolean isValueTypeSchema()
ValueTypeSchema.
public void set$ref(String $ref)
$ref
$ref - the $ref to setpublic void set$schema(String $schema)
$schema
$schema - the $schema to setpublic void setDisallow(JsonSchema[] disallow)
disallow
disallow - the disallow to setpublic void setExtends(JsonSchema[] extendsextends)
extendsextends
extendsextends - the extendsextends to setpublic void setId(String id)
id
id - the id to setpublic void setRequired(Boolean required)
required
required - the required to setpublic static JsonSchema minimalForFormat(com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatTypes format)
format - the format to expect
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||