public static class TypedJsonSchemaObject.ArrayJsonSchemaObject extends TypedJsonSchemaObject
JsonSchemaObject implementation of type : 'array' schema elements.schema objects.TypedJsonSchemaObject.ArrayJsonSchemaObject, TypedJsonSchemaObject.BooleanJsonSchemaObject, TypedJsonSchemaObject.NumericJsonSchemaObject, TypedJsonSchemaObject.ObjectJsonSchemaObject, TypedJsonSchemaObject.StringJsonSchemaObjectJsonSchemaObject.Typetypesdescription, generateDescription, restrictions| Modifier and Type | Method and Description |
|---|---|
TypedJsonSchemaObject.ArrayJsonSchemaObject |
additionalItems(boolean additionalItemsAllowed)
If set to false, no additional items besides
items(Collection) are allowed. |
TypedJsonSchemaObject.ArrayJsonSchemaObject |
allOf(Collection<JsonSchemaObject> allOf)
The field value must match all specified schemas.
|
TypedJsonSchemaObject.ArrayJsonSchemaObject |
anyOf(Collection<JsonSchemaObject> anyOf)
The field value must match at least one of the specified schemas.
|
TypedJsonSchemaObject.ArrayJsonSchemaObject |
description(String description)
Set the description.
|
TypedJsonSchemaObject.ArrayJsonSchemaObject |
generatedDescription()
Auto generate the description if not explicitly set.
|
protected String |
generateDescription()
Customization hook for creating description out of defined values.
|
TypedJsonSchemaObject.ArrayJsonSchemaObject |
items(Collection<JsonSchemaObject> items)
Define the
items allowed in the array. |
TypedJsonSchemaObject.ArrayJsonSchemaObject |
maxItems(int count)
Define the maxItems.
|
TypedJsonSchemaObject.ArrayJsonSchemaObject |
minItems(int count)
Define the maxItems.
|
TypedJsonSchemaObject.ArrayJsonSchemaObject |
notMatch(JsonSchemaObject notMatch)
The field value must not match the specified schemas.
|
TypedJsonSchemaObject.ArrayJsonSchemaObject |
oneOf(Collection<JsonSchemaObject> oneOf)
The field value must match exactly one of the specified schemas.
|
TypedJsonSchemaObject.ArrayJsonSchemaObject |
possibleValues(Collection<? extends Object> possibleValues)
enumerates all possible values of the field.
|
TypedJsonSchemaObject.ArrayJsonSchemaObject |
range(Range<Integer> range)
Define the minItems and maxItems via the given
Range. |
org.bson.Document |
toDocument()
Create the JSON schema complying
Document representation. |
TypedJsonSchemaObject.ArrayJsonSchemaObject |
uniqueItems(boolean uniqueItems)
Define the whether the array must contain unique items.
|
getTypes, ofnewInstancepublic TypedJsonSchemaObject.ArrayJsonSchemaObject uniqueItems(boolean uniqueItems)
uniqueItems - TypedJsonSchemaObject.ArrayJsonSchemaObject.public TypedJsonSchemaObject.ArrayJsonSchemaObject range(Range<Integer> range)
Range.range bounds are not taken into account.range - must not be null. Consider Range.unbounded() instead.TypedJsonSchemaObject.ArrayJsonSchemaObject.public TypedJsonSchemaObject.ArrayJsonSchemaObject minItems(int count)
count - the allowed minimal number of array items.TypedJsonSchemaObject.ArrayJsonSchemaObject.public TypedJsonSchemaObject.ArrayJsonSchemaObject maxItems(int count)
count - the allowed maximal number of array items.TypedJsonSchemaObject.ArrayJsonSchemaObject.public TypedJsonSchemaObject.ArrayJsonSchemaObject items(Collection<JsonSchemaObject> items)
items allowed in the array.items - the allowed items in the array.TypedJsonSchemaObject.ArrayJsonSchemaObject.public TypedJsonSchemaObject.ArrayJsonSchemaObject additionalItems(boolean additionalItemsAllowed)
items(Collection) are allowed.additionalItemsAllowed - true to allow additional items in the array, false otherwise.TypedJsonSchemaObject.ArrayJsonSchemaObject.public TypedJsonSchemaObject.ArrayJsonSchemaObject possibleValues(Collection<? extends Object> possibleValues)
TypedJsonSchemaObjectpossibleValues in class TypedJsonSchemaObjectpossibleValues - must not be null.TypedJsonSchemaObject.public TypedJsonSchemaObject.ArrayJsonSchemaObject allOf(Collection<JsonSchemaObject> allOf)
TypedJsonSchemaObjectallOf in class TypedJsonSchemaObjectallOf - must not be null.TypedJsonSchemaObject.public TypedJsonSchemaObject.ArrayJsonSchemaObject anyOf(Collection<JsonSchemaObject> anyOf)
TypedJsonSchemaObjectanyOf in class TypedJsonSchemaObjectanyOf - must not be null.TypedJsonSchemaObject.public TypedJsonSchemaObject.ArrayJsonSchemaObject oneOf(Collection<JsonSchemaObject> oneOf)
TypedJsonSchemaObjectoneOf in class TypedJsonSchemaObjectoneOf - must not be null.TypedJsonSchemaObject.public TypedJsonSchemaObject.ArrayJsonSchemaObject notMatch(JsonSchemaObject notMatch)
TypedJsonSchemaObjectnotMatch in class TypedJsonSchemaObjectTypedJsonSchemaObject.public TypedJsonSchemaObject.ArrayJsonSchemaObject description(String description)
TypedJsonSchemaObjectdescription in class TypedJsonSchemaObjectdescription - must not be null.TypedJsonSchemaObject.public TypedJsonSchemaObject.ArrayJsonSchemaObject generatedDescription()
TypedJsonSchemaObjectgeneratedDescription in class TypedJsonSchemaObjectTypedJsonSchemaObject.public org.bson.Document toDocument()
TypedJsonSchemaObjectDocument representation. This includes type,
description and the fields of Restrictions#toDocument() if set.toDocument in interface JsonSchemaObjecttoDocument in class TypedJsonSchemaObjectprotected String generateDescription()
TypedJsonSchemaObjectTypedJsonSchemaObject.toDocument() when no explicit TypedJsonSchemaObject.description(java.lang.String) is set.generateDescription in class TypedJsonSchemaObjectCopyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.