Class ArraySchema
- java.lang.Object
-
- com.fasterxml.jackson.module.jsonSchema.jakarta.JsonSchema
-
- com.fasterxml.jackson.module.jsonSchema.jakarta.types.SimpleTypeSchema
-
- com.fasterxml.jackson.module.jsonSchema.jakarta.types.ContainerTypeSchema
-
- com.fasterxml.jackson.module.jsonSchema.jakarta.types.ArraySchema
-
public class ArraySchema extends ContainerTypeSchema
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classArraySchema.AdditionalItemsThis provides a definition for additional items in an array instance when tuple definitions of the items is provided.static classArraySchema.ArrayItemsWhen 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 classArraySchema.ItemsThis attribute defines the allowed items in an instance array, and MUST be a jsonSchema or an array of jsonSchemas.static classArraySchema.ItemsDeserializerstatic classArraySchema.NoAdditionalItemsThis can be false to indicate additional items in the array are not allowedstatic classArraySchema.SchemaAdditionalItemsor it can be a jsonSchema that defines the jsonSchema of the additional items.static classArraySchema.SingleItemsWhen 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.AdditionalItemsadditionalItemsprotected ArraySchema.Itemsitemsprotected java.lang.IntegermaxItemsThis attribute defines the maximum number of values in an arrayprotected java.lang.IntegerminItemsThis attribute defines the minimum number of values in an arrayprotected java.lang.BooleanuniqueItemsThis 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.jakarta.types.ContainerTypeSchema
enums, oneOf
-
Fields inherited from class com.fasterxml.jackson.module.jsonSchema.jakarta.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)ArraySchemaasArraySchema()Attempt to return this JsonSchema as anArraySchemabooleanequals(java.lang.Object obj)ArraySchema.AdditionalItemsgetAdditionalItems()ArraySchema.ItemsgetItems()java.lang.IntegergetMaxItems()java.lang.IntegergetMinItems()com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatTypesgetType()java.lang.BooleangetUniqueItems()booleanisArraySchema()determine if this JsonSchema is anArraySchema.voidsetAdditionalItems(ArraySchema.AdditionalItems additionalItems)voidsetItems(ArraySchema.Items items)voidsetItemsSchema(JsonSchema jsonSchema)voidsetMaxItems(java.lang.Integer maxItems)voidsetMinItems(java.lang.Integer minItems)voidsetUniqueItems(java.lang.Boolean uniqueItems)-
Methods inherited from class com.fasterxml.jackson.module.jsonSchema.jakarta.types.ContainerTypeSchema
_equals, asContainerSchema, asContainerTypeSchema, getEnums, getOneOf, isContainerTypeSchema, setEnums, setOneOf
-
Methods inherited from class com.fasterxml.jackson.module.jsonSchema.jakarta.types.SimpleTypeSchema
_equals, asSimpleTypeSchema, getDefault, getLinks, getPathStart, getTitle, isSimpleTypeSchema, setDefault, setLinks, setPathStart, setTitle
-
Methods inherited from class com.fasterxml.jackson.module.jsonSchema.jakarta.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:JsonSchemaAttempt to return this JsonSchema as anArraySchema- Overrides:
asArraySchemain 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:
getTypein classJsonSchema
-
getUniqueItems
public java.lang.Boolean getUniqueItems()
-
isArraySchema
public boolean isArraySchema()
Description copied from class:JsonSchemadetermine if this JsonSchema is anArraySchema.- Overrides:
isArraySchemain 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:
equalsin classContainerTypeSchema
-
_equals
protected boolean _equals(ArraySchema that)
-
-