Interface SchemaString

All Superinterfaces:
Prototype.Api, SchemaItem
All Known Implementing Classes:
SchemaString.BuilderBase.SchemaStringImpl

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

    • builder

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

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

      default void generate(JsonObject.Builder builder)
      Description copied from interface: SchemaItem
      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.
      Specified by:
      generate in interface SchemaItem
      Parameters:
      builder - json object builder
    • maxLength

      Optional<Long> maxLength()
      Maximum length of the string.
      Returns:
      maximum string length
    • minLength

      Optional<Long> minLength()
      Minimum length of the string.
      Returns:
      minimum string length
    • pattern

      Optional<String> pattern()
      String pattern to follow.
      Returns:
      string pattern
    • format

      Optional<String> format()
      String format, such as date, time, or date-time.
      Returns:
      string format
      Since:
      27.0.2
    • enumValues

      Optional<List<JsonValue>> enumValues()
      Values of the enum keyword, in declaration order. Entries of any JSON type are preserved, including JsonNull. The string type restriction applies independently of these values. When absent, no enum keyword restricts the string values. A present empty list generates an empty enum, which allows no values.
      Returns:
      enum values
      Since:
      27.0.2
    • schemaType

      SchemaType schemaType()