Class ValueTypeSchema
- java.lang.Object
-
- com.fasterxml.jackson.module.jsonSchema.JsonSchema
-
- com.fasterxml.jackson.module.jsonSchema.types.SimpleTypeSchema
-
- com.fasterxml.jackson.module.jsonSchema.types.ValueTypeSchema
-
- Direct Known Subclasses:
BooleanSchema
,NumberSchema
,StringSchema
public abstract class ValueTypeSchema extends SimpleTypeSchema
This class represents aJsonSchema
A primitive type.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Set<java.lang.String>
enums
This provides an enumeration of all possible values that are valid for the instance property.protected com.fasterxml.jackson.databind.jsonFormatVisitors.JsonValueFormat
format
This property defines the type of data, content type, or microformat to be expected in the instance property values.-
Fields inherited from class com.fasterxml.jackson.module.jsonSchema.types.SimpleTypeSchema
defaultdefault, links, pathStart, title
-
-
Constructor Summary
Constructors Constructor Description ValueTypeSchema()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected boolean
_equals(ValueTypeSchema that)
ValueTypeSchema
asValueSchemaSchema()
Deprecated.Since 2.7ValueTypeSchema
asValueTypeSchema()
Attempt to return this JsonSchema as aValueTypeSchema
boolean
equals(java.lang.Object obj)
java.util.Set<java.lang.String>
getEnums()
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonValueFormat
getFormat()
boolean
isValueTypeSchema()
determine if this JsonSchema is anValueTypeSchema
.void
setEnums(java.util.Set<java.lang.String> enums)
void
setFormat(com.fasterxml.jackson.databind.jsonFormatVisitors.JsonValueFormat format)
-
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, asStringSchema, asUnionTypeSchema, enrichWithBeanProperty, equals, get$ref, get$schema, getDescription, getDisallow, getExtends, getId, getReadonly, getRequired, getType, isAnySchema, isArraySchema, isBooleanSchema, isContainerTypeSchema, isIntegerSchema, isNullSchema, isNumberSchema, isObjectSchema, isStringSchema, isUnionTypeSchema, minimalForFormat, set$ref, set$schema, setDescription, setDisallow, setExtends, setId, setReadonly, setRequired
-
-
-
-
Field Detail
-
enums
protected java.util.Set<java.lang.String> enums
This provides an enumeration of all possible values that are valid for the instance property. This MUST be an array, and each item in the array represents a possible value for the instance value. If this attribute is defined, the instance value MUST be one of the values in the array in order for the schema to be valid. Comparison of enum values uses the same algorithm as defined in "uniqueItems" (Section 5.15).
-
format
protected com.fasterxml.jackson.databind.jsonFormatVisitors.JsonValueFormat format
This property defines the type of data, content type, or microformat to be expected in the instance property values. A format attribute MAY be one of the values listed below, and if so, SHOULD adhere to the semantics describing for the format. A format SHOULD only be used to give meaning to primitive types (string, integer, number, or boolean). Validators MAY (but are not required to) validate that the instance values conform to a format. Additional custom formats MAY be created. These custom formats MAY be expressed as an URI, and this URI MAY reference a schema of thatNOTE: serialization of `format` was fixed in Jackson 2.7; requires at least this version of databind
-
-
Method Detail
-
asValueSchemaSchema
@Deprecated public ValueTypeSchema asValueSchemaSchema()
Deprecated.Since 2.7- Overrides:
asValueSchemaSchema
in classJsonSchema
-
asValueTypeSchema
public ValueTypeSchema asValueTypeSchema()
Description copied from class:JsonSchema
Attempt to return this JsonSchema as aValueTypeSchema
- Overrides:
asValueTypeSchema
in classJsonSchema
- Returns:
- this as a ValueTypeSchema if possible, or null otherwise
- Since:
- 2.7
-
getEnums
public java.util.Set<java.lang.String> getEnums()
-
getFormat
public com.fasterxml.jackson.databind.jsonFormatVisitors.JsonValueFormat getFormat()
-
isValueTypeSchema
public boolean isValueTypeSchema()
Description copied from class:JsonSchema
determine if this JsonSchema is anValueTypeSchema
.- Overrides:
isValueTypeSchema
in classJsonSchema
- Returns:
- true if this JsonSchema is an ValueTypeSchema, false otherwise
-
setEnums
public void setEnums(java.util.Set<java.lang.String> enums)
-
setFormat
public void setFormat(com.fasterxml.jackson.databind.jsonFormatVisitors.JsonValueFormat format)
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classSimpleTypeSchema
-
_equals
protected boolean _equals(ValueTypeSchema that)
-
-