public class StringSchema extends ValueTypeSchema
This represents a JsonSchema as a String
  • Field Details

    • maxLength

      private Integer maxLength
      this defines the maximum length of the string.
    • minLength

      private Integer minLength
      this defines the minimum length of the string.
    • pattern

      private String pattern
      this provides a regular expression that a string instance MUST match in order to be valid. Regular expressions SHOULD follow the regular expression specification from ECMA 262/Perl 5
  • Constructor Details

    • StringSchema

      public StringSchema()
  • Method Details

    • asStringSchema

      public StringSchema asStringSchema()
      Description copied from class: JsonSchema
      Attempt to return this JsonSchema as a StringSchema
      Overrides:
      asStringSchema in class JsonSchema
      Returns:
      this as a StringSchema if possible, or null otherwise
    • getMaxLength

      public Integer getMaxLength()
    • getMinLength

      public Integer getMinLength()
    • getPattern

      public String getPattern()
    • getType

      public com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatTypes getType()
      Specified by:
      getType in class JsonSchema
    • isStringSchema

      public boolean isStringSchema()
      Description copied from class: JsonSchema
      determine if this JsonSchema is an StringSchema.
      Overrides:
      isStringSchema in class JsonSchema
      Returns:
      true if this JsonSchema is an StringSchema, false otherwise
    • setMaxLength

      public void setMaxLength(Integer maxLength)
    • setMinLength

      public void setMinLength(Integer minLength)
    • setPattern

      public void setPattern(String pattern)
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class ValueTypeSchema
    • _equals

      protected boolean _equals(StringSchema that)