Interface SchemaItem

All Superinterfaces:
Prototype.Api
All Known Subinterfaces:
SchemaArray, SchemaBoolean, SchemaInteger, SchemaNull, SchemaNumber, SchemaObject, SchemaString
All Known Implementing Classes:
SchemaArray.BuilderBase.SchemaArrayImpl, SchemaBoolean.BuilderBase.SchemaBooleanImpl, SchemaInteger.BuilderBase.SchemaIntegerImpl, SchemaItem.BuilderBase.SchemaItemImpl, SchemaNull.BuilderBase.SchemaNullImpl, SchemaNumber.BuilderBase.SchemaNumberImpl, SchemaObject.BuilderBase.SchemaObjectImpl, SchemaString.BuilderBase.SchemaStringImpl

public interface SchemaItem extends Prototype.Api
Common interface for all Json Schema items.
See Also:
  • Method Details

    • builder

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

      static SchemaItem.Builder builder(SchemaItem 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 SchemaItem create()
      Create a new instance with default values.
      Returns:
      a new instance
    • title

      Optional<String> title()
      Title of the item.
      Returns:
      item title
    • description

      Optional<String> description()
      Description of the item.
      Returns:
      item description
    • required

      boolean required()
      Used in the object properties to mark required property.
      Returns:
      whether object property is required
    • schemaType

      SchemaType schemaType()
      Schema type of the item.
      Returns:
      schema type
    • generate

      @Deprecated(forRemoval=true, since="4.3.0") default void generate(Hson.Struct.Builder builder)
      Deprecated, for removal: This API element is subject to removal in a future version.
      this method is not intended to be broadly used. Will be removed later.
      Generated the Json schema item to the Json. This method servers mainly as a helpful tool for the Json generation. It should not be used.
      Parameters:
      builder - hson struct builder