Class StringSchema
- java.lang.Object
-
- com.fasterxml.jackson.module.jsonSchema.jakarta.JsonSchema
-
- com.fasterxml.jackson.module.jsonSchema.jakarta.types.SimpleTypeSchema
-
- com.fasterxml.jackson.module.jsonSchema.jakarta.types.ValueTypeSchema
-
- com.fasterxml.jackson.module.jsonSchema.jakarta.types.StringSchema
-
public class StringSchema extends ValueTypeSchema
This represents aJsonSchema
as a String
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Integer
maxLength
this defines the maximum length of the string.private java.lang.Integer
minLength
this defines the minimum length of the string.private java.lang.String
pattern
this provides a regular expression that a string instance MUST match in order to be valid.-
Fields inherited from class com.fasterxml.jackson.module.jsonSchema.jakarta.types.ValueTypeSchema
enums, format
-
Fields inherited from class com.fasterxml.jackson.module.jsonSchema.jakarta.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)
StringSchema
asStringSchema()
Attempt to return this JsonSchema as aStringSchema
boolean
equals(java.lang.Object obj)
java.lang.Integer
getMaxLength()
java.lang.Integer
getMinLength()
java.lang.String
getPattern()
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatTypes
getType()
boolean
isStringSchema()
determine if this JsonSchema is anStringSchema
.void
setMaxLength(java.lang.Integer maxLength)
void
setMinLength(java.lang.Integer minLength)
void
setPattern(java.lang.String pattern)
-
Methods inherited from class com.fasterxml.jackson.module.jsonSchema.jakarta.types.ValueTypeSchema
_equals, asValueSchemaSchema, asValueTypeSchema, getEnums, getFormat, isValueTypeSchema, setEnums, setFormat
-
Methods inherited from class com.fasterxml.jackson.module.jsonSchema.jakarta.types.SimpleTypeSchema
_equals, asSimpleTypeSchema, getDefault, getLinks, getPathStart, getTitle, isSimpleTypeSchema, setDefault, setLinks, setPathStart, setTitle
-
Methods inherited from class com.fasterxml.jackson.module.jsonSchema.jakarta.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:JsonSchema
Attempt to return this JsonSchema as aStringSchema
- Overrides:
asStringSchema
in 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:
getType
in classJsonSchema
-
isStringSchema
public boolean isStringSchema()
Description copied from class:JsonSchema
determine if this JsonSchema is anStringSchema
.- Overrides:
isStringSchema
in 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:
equals
in classValueTypeSchema
-
_equals
protected boolean _equals(StringSchema that)
-
-