Class ValueTypeSchema
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
- Direct Known Subclasses:
BooleanSchema
,NumberSchema
,StringSchema
This class represents a
JsonSchema
A primitive type.-
Field Summary
FieldsModifier and TypeFieldDescriptionThis provides an enumeration of all possible values that are valid for the instance property.protected com.fasterxml.jackson.databind.jsonFormatVisitors.JsonValueFormat
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.jakarta.types.SimpleTypeSchema
defaultdefault, links, pathStart, title
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
_equals
(ValueTypeSchema that) Deprecated.Since 2.7Attempt to return this JsonSchema as aValueTypeSchema
boolean
getEnums()
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonValueFormat
boolean
determine if this JsonSchema is anValueTypeSchema
.void
void
setFormat
(com.fasterxml.jackson.databind.jsonFormatVisitors.JsonValueFormat format) 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, 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 Details
-
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 formatThis 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
-
-
Constructor Details
-
ValueTypeSchema
public ValueTypeSchema()
-
-
Method Details
-
asValueSchemaSchema
Deprecated.Since 2.7- Overrides:
asValueSchemaSchema
in classJsonSchema
-
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
-
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
-
setFormat
public void setFormat(com.fasterxml.jackson.databind.jsonFormatVisitors.JsonValueFormat format) -
equals
- Overrides:
equals
in classSimpleTypeSchema
-
_equals
-