Class ArraySchema
- java.lang.Object
-
- com.fasterxml.jackson.module.jsonSchema.JsonSchema
-
- com.fasterxml.jackson.module.jsonSchema.types.SimpleTypeSchema
-
- com.fasterxml.jackson.module.jsonSchema.types.ContainerTypeSchema
-
- com.fasterxml.jackson.module.jsonSchema.types.ArraySchema
-
public class ArraySchema extends ContainerTypeSchema
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ArraySchema.AdditionalItems
This provides a definition for additional items in an array instance when tuple definitions of the items is provided.static class
ArraySchema.ArrayItems
When this attribute value is an array of jsonSchemas and the instance value is an array, each position in the instance array MUST conform to the jsonSchema in the corresponding position for this array.static class
ArraySchema.Items
This attribute defines the allowed items in an instance array, and MUST be a jsonSchema or an array of jsonSchemas.static class
ArraySchema.ItemsDeserializer
static class
ArraySchema.NoAdditionalItems
This can be false to indicate additional items in the array are not allowedstatic class
ArraySchema.SchemaAdditionalItems
or it can be a jsonSchema that defines the jsonSchema of the additional items.static class
ArraySchema.SingleItems
When this attribute value is a jsonSchema and the instance value is an array, then all the items in the array MUST be valid according to the jsonSchema.
-
Field Summary
Fields Modifier and Type Field Description protected ArraySchema.AdditionalItems
additionalItems
protected ArraySchema.Items
items
protected java.lang.Integer
maxItems
This attribute defines the maximum number of values in an arrayprotected java.lang.Integer
minItems
This attribute defines the minimum number of values in an arrayprotected java.lang.Boolean
uniqueItems
This attribute indicates that all items in an array instance MUST be unique (contains no two identical values).-
Fields inherited from class com.fasterxml.jackson.module.jsonSchema.types.ContainerTypeSchema
enums, oneOf
-
Fields inherited from class com.fasterxml.jackson.module.jsonSchema.types.SimpleTypeSchema
defaultdefault, links, pathStart, title
-
-
Constructor Summary
Constructors Constructor Description ArraySchema()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
_equals(ArraySchema that)
ArraySchema
asArraySchema()
Attempt to return this JsonSchema as anArraySchema
boolean
equals(java.lang.Object obj)
ArraySchema.AdditionalItems
getAdditionalItems()
ArraySchema.Items
getItems()
java.lang.Integer
getMaxItems()
java.lang.Integer
getMinItems()
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatTypes
getType()
java.lang.Boolean
getUniqueItems()
boolean
isArraySchema()
determine if this JsonSchema is anArraySchema
.void
setAdditionalItems(ArraySchema.AdditionalItems additionalItems)
void
setItems(ArraySchema.Items items)
void
setItemsSchema(JsonSchema jsonSchema)
void
setMaxItems(java.lang.Integer maxItems)
void
setMinItems(java.lang.Integer minItems)
void
setUniqueItems(java.lang.Boolean uniqueItems)
-
Methods inherited from class com.fasterxml.jackson.module.jsonSchema.types.ContainerTypeSchema
_equals, asContainerSchema, asContainerTypeSchema, getEnums, getOneOf, isContainerTypeSchema, setEnums, setOneOf
-
Methods inherited from class com.fasterxml.jackson.module.jsonSchema.types.SimpleTypeSchema
_equals, asSimpleTypeSchema, getDefault, getLinks, getPathStart, getTitle, isSimpleTypeSchema, setDefault, setLinks, setPathStart, setTitle
-
Methods inherited from class com.fasterxml.jackson.module.jsonSchema.JsonSchema
_equals, arraysEqual, asAnySchema, asBooleanSchema, asIntegerSchema, asNullSchema, asNumberSchema, asObjectSchema, asStringSchema, asUnionTypeSchema, asValueSchemaSchema, asValueTypeSchema, enrichWithBeanProperty, equals, get$ref, get$schema, getDescription, getDisallow, getExtends, getId, getReadonly, getRequired, isAnySchema, isBooleanSchema, isIntegerSchema, isNullSchema, isNumberSchema, isObjectSchema, isStringSchema, isUnionTypeSchema, isValueTypeSchema, minimalForFormat, set$ref, set$schema, setDescription, setDisallow, setExtends, setId, setReadonly, setRequired
-
-
-
-
Field Detail
-
additionalItems
protected ArraySchema.AdditionalItems additionalItems
-
items
protected ArraySchema.Items items
-
maxItems
protected java.lang.Integer maxItems
This attribute defines the maximum number of values in an array
-
minItems
protected java.lang.Integer minItems
This attribute defines the minimum number of values in an array
-
uniqueItems
protected java.lang.Boolean uniqueItems
This attribute indicates that all items in an array instance MUST be unique (contains no two identical values). Two instance are consider equal if they are both of the same type and: are null; or are booleans/numbers/strings and have the same value; or are arrays, contains the same number of items, and each item in the array is equal to the corresponding item in the other array; or are objects, contains the same property names, and each property in the object is equal to the corresponding property in the other object.
-
-
Method Detail
-
asArraySchema
public ArraySchema asArraySchema()
Description copied from class:JsonSchema
Attempt to return this JsonSchema as anArraySchema
- Overrides:
asArraySchema
in classJsonSchema
- Returns:
- this as an ArraySchema if possible, or null otherwise
-
getAdditionalItems
public ArraySchema.AdditionalItems getAdditionalItems()
-
getItems
public ArraySchema.Items getItems()
-
getMaxItems
public java.lang.Integer getMaxItems()
-
getMinItems
public java.lang.Integer getMinItems()
-
getType
public com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatTypes getType()
- Specified by:
getType
in classJsonSchema
-
getUniqueItems
public java.lang.Boolean getUniqueItems()
-
isArraySchema
public boolean isArraySchema()
Description copied from class:JsonSchema
determine if this JsonSchema is anArraySchema
.- Overrides:
isArraySchema
in classJsonSchema
- Returns:
- true if this JsonSchema is an ArraySchema, false otherwise
-
setAdditionalItems
public void setAdditionalItems(ArraySchema.AdditionalItems additionalItems)
-
setItems
public void setItems(ArraySchema.Items items)
-
setItemsSchema
public void setItemsSchema(JsonSchema jsonSchema)
-
setMaxItems
public void setMaxItems(java.lang.Integer maxItems)
-
setMinItems
public void setMinItems(java.lang.Integer minItems)
-
setUniqueItems
public void setUniqueItems(java.lang.Boolean uniqueItems)
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classContainerTypeSchema
-
_equals
protected boolean _equals(ArraySchema that)
-
-