Class StringSchema
- java.lang.Object
-
- com.fasterxml.jackson.module.jsonSchema.JsonSchema
-
- com.fasterxml.jackson.module.jsonSchema.types.SimpleTypeSchema
-
- com.fasterxml.jackson.module.jsonSchema.types.ValueTypeSchema
-
- com.fasterxml.jackson.module.jsonSchema.types.StringSchema
-
public class StringSchema extends ValueTypeSchema
This represents aJsonSchemaas a String
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.IntegermaxLengththis defines the maximum length of the string.private java.lang.IntegerminLengththis defines the minimum length of the string.private java.lang.Stringpatternthis provides a regular expression that a string instance MUST match in order to be valid.-
Fields inherited from class com.fasterxml.jackson.module.jsonSchema.types.ValueTypeSchema
enums, format
-
Fields inherited from class com.fasterxml.jackson.module.jsonSchema.types.SimpleTypeSchema
defaultdefault, links, pathStart, title
-
-
Constructor Summary
Constructors Constructor Description StringSchema()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean_equals(StringSchema that)StringSchemaasStringSchema()Attempt to return this JsonSchema as aStringSchemabooleanequals(java.lang.Object obj)java.lang.IntegergetMaxLength()java.lang.IntegergetMinLength()java.lang.StringgetPattern()com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatTypesgetType()booleanisStringSchema()determine if this JsonSchema is anStringSchema.voidsetMaxLength(java.lang.Integer maxLength)voidsetMinLength(java.lang.Integer minLength)voidsetPattern(java.lang.String pattern)-
Methods inherited from class com.fasterxml.jackson.module.jsonSchema.types.ValueTypeSchema
_equals, asValueSchemaSchema, asValueTypeSchema, getEnums, getFormat, isValueTypeSchema, setEnums, setFormat
-
Methods inherited from class com.fasterxml.jackson.module.jsonSchema.types.SimpleTypeSchema
_equals, asSimpleTypeSchema, getDefault, getLinks, getPathStart, getTitle, isSimpleTypeSchema, setDefault, setLinks, setPathStart, setTitle
-
Methods inherited from class com.fasterxml.jackson.module.jsonSchema.JsonSchema
_equals, arraysEqual, asAnySchema, asArraySchema, asBooleanSchema, asContainerSchema, asContainerTypeSchema, asIntegerSchema, asNullSchema, asNumberSchema, asObjectSchema, asUnionTypeSchema, enrichWithBeanProperty, equals, get$ref, get$schema, getDescription, getDisallow, getExtends, getId, getReadonly, getRequired, isAnySchema, isArraySchema, isBooleanSchema, isContainerTypeSchema, isIntegerSchema, isNullSchema, isNumberSchema, isObjectSchema, isUnionTypeSchema, minimalForFormat, set$ref, set$schema, setDescription, setDisallow, setExtends, setId, setReadonly, setRequired
-
-
-
-
Field Detail
-
maxLength
private java.lang.Integer maxLength
this defines the maximum length of the string.
-
minLength
private java.lang.Integer minLength
this defines the minimum length of the string.
-
pattern
private java.lang.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
-
-
Method Detail
-
asStringSchema
public StringSchema asStringSchema()
Description copied from class:JsonSchemaAttempt to return this JsonSchema as aStringSchema- Overrides:
asStringSchemain classJsonSchema- Returns:
- this as a StringSchema if possible, or null otherwise
-
getMaxLength
public java.lang.Integer getMaxLength()
-
getMinLength
public java.lang.Integer getMinLength()
-
getPattern
public java.lang.String getPattern()
-
getType
public com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatTypes getType()
- Specified by:
getTypein classJsonSchema
-
isStringSchema
public boolean isStringSchema()
Description copied from class:JsonSchemadetermine if this JsonSchema is anStringSchema.- Overrides:
isStringSchemain classJsonSchema- Returns:
- true if this JsonSchema is an StringSchema, false otherwise
-
setMaxLength
public void setMaxLength(java.lang.Integer maxLength)
-
setMinLength
public void setMinLength(java.lang.Integer minLength)
-
setPattern
public void setPattern(java.lang.String pattern)
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classValueTypeSchema
-
_equals
protected boolean _equals(StringSchema that)
-
-