Interface SchemaArray

All Superinterfaces:
Prototype.Api, SchemaItem
All Known Implementing Classes:
SchemaArray.BuilderBase.SchemaArrayImpl

public interface SchemaArray extends Prototype.Api, SchemaItem
Json schema related to the array.
See Also:
  • Method Details

    • builder

      static SchemaArray.Builder builder()
      Create a new fluent API builder to customize configuration.
      Returns:
      a new builder
    • builder

      static SchemaArray.Builder builder(SchemaArray instance)
      Create a new fluent API builder from an existing instance.
      Parameters:
      instance - an existing instance used as a base for the builder
      Returns:
      a builder based on an instance
    • create

      static SchemaArray create()
      Create a new instance with default values.
      Returns:
      a new instance
    • maxItems

      Optional<Integer> maxItems()
      Max number of items an array can have.
      Returns:
      max array size
    • minItems

      Optional<Integer> minItems()
      Min number of items an array can have.
      Returns:
      min array size
    • uniqueItems

      Optional<Boolean> uniqueItems()
      Whether the array can contain duplicate values.
      Returns:
      duplicate values allowed
    • items

      Json type used to validate the content of the array. It is filled by the more specific configured schema item type.
      Returns:
      configured items schema type
    • itemsObject

      Optional<SchemaObject> itemsObject()
      Array items should be validated as an objects.
      Returns:
      json object schema
    • itemsArray

      Optional<SchemaArray> itemsArray()
      Array items should be validated as an arrays.
      Returns:
      json array schema
    • itemsNumber

      Optional<SchemaNumber> itemsNumber()
      Array items should be validated as a number.
      Returns:
      json number schema
    • itemsInteger

      Optional<SchemaInteger> itemsInteger()
      Array items should be validated as an integer.
      Returns:
      json integer schema
    • itemsString

      Optional<SchemaString> itemsString()
      Array items should be validated as a string.
      Returns:
      json string schema
    • itemsBoolean

      Optional<SchemaBoolean> itemsBoolean()
      Array items should be validated as a boolean.
      Returns:
      json boolean schema
    • itemsNull

      Optional<SchemaNull> itemsNull()
      Array items should be validated as an null.
      Returns:
      json array schema
    • schemaType

      SchemaType schemaType()
    • generate

      default void generate(Hson.Struct.Builder builder)