Package org.everit.json.schema
Class ArraySchema.Builder
- java.lang.Object
-
- org.everit.json.schema.Schema.Builder<ArraySchema>
-
- org.everit.json.schema.ArraySchema.Builder
-
- Enclosing class:
- ArraySchema
public static class ArraySchema.Builder extends Schema.Builder<ArraySchema>
Builder class forArraySchema
.
-
-
Field Summary
-
Fields inherited from class org.everit.json.schema.Schema.Builder
unprocessedProperties
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description ArraySchema.Builder
addItemSchema(Schema itemSchema)
Adds an item schema for tuple validation.ArraySchema.Builder
additionalItems(boolean additionalItems)
ArraySchema.Builder
allItemSchema(Schema allItemSchema)
ArraySchema
build()
ArraySchema.Builder
containsItemSchema(Schema contained)
ArraySchema.Builder
maxItems(Integer maxItems)
ArraySchema.Builder
minItems(Integer minItems)
ArraySchema.Builder
requiresArray(boolean requiresArray)
ArraySchema.Builder
schemaOfAdditionalItems(Schema schemaOfAdditionalItems)
ArraySchema.Builder
uniqueItems(boolean uniqueItems)
-
Methods inherited from class org.everit.json.schema.Schema.Builder
defaultValue, description, id, nullable, readOnly, schemaLocation, schemaLocation, title, unprocessedProperties, writeOnly
-
-
-
-
Method Detail
-
addItemSchema
public ArraySchema.Builder addItemSchema(Schema itemSchema)
Adds an item schema for tuple validation. The array items of the subject under validation will be matched to expected schemas by their index. In other words the {n}thaddItemSchema()
invocation defines the expected schema of the {n}th item of the array being validated.- Parameters:
itemSchema
- the schema of the next item.- Returns:
- this
-
additionalItems
public ArraySchema.Builder additionalItems(boolean additionalItems)
-
allItemSchema
public ArraySchema.Builder allItemSchema(Schema allItemSchema)
-
build
public ArraySchema build()
- Specified by:
build
in classSchema.Builder<ArraySchema>
-
maxItems
public ArraySchema.Builder maxItems(Integer maxItems)
-
minItems
public ArraySchema.Builder minItems(Integer minItems)
-
requiresArray
public ArraySchema.Builder requiresArray(boolean requiresArray)
-
schemaOfAdditionalItems
public ArraySchema.Builder schemaOfAdditionalItems(Schema schemaOfAdditionalItems)
-
uniqueItems
public ArraySchema.Builder uniqueItems(boolean uniqueItems)
-
containsItemSchema
public ArraySchema.Builder containsItemSchema(Schema contained)
-
-