Class UnionTypeSchema
java.lang.Object
com.fasterxml.jackson.module.jsonSchema.jakarta.JsonSchema
com.fasterxml.jackson.module.jsonSchema.jakarta.types.UnionTypeSchema
This class represents a
JsonSchema
as a Union Type Schema:
"An array of two or more simple type definitions. Each
item in the array MUST be a simple type definition or a schema.
The instance value is valid if it is of the same type as one of
the simple type definitions, or valid by one of the schemas, in-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
_equals
(UnionTypeSchema that) Attempt to return this JsonSchema as anUnionTypeSchema
boolean
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatTypes
getType()
boolean
determine if this JsonSchema is anUnionTypeSchema
.void
setElements
(ValueTypeSchema[] elements) Methods inherited from class com.fasterxml.jackson.module.jsonSchema.jakarta.JsonSchema
_equals, arraysEqual, asAnySchema, asArraySchema, asBooleanSchema, asContainerSchema, asContainerTypeSchema, asIntegerSchema, asNullSchema, asNumberSchema, asObjectSchema, asSimpleTypeSchema, asStringSchema, asValueSchemaSchema, asValueTypeSchema, enrichWithBeanProperty, equals, get$ref, get$schema, getDescription, getDisallow, getExtends, getId, getReadonly, getRequired, isAnySchema, isArraySchema, isBooleanSchema, isContainerTypeSchema, isIntegerSchema, isNullSchema, isNumberSchema, isObjectSchema, isSimpleTypeSchema, isStringSchema, isValueTypeSchema, minimalForFormat, set$ref, set$schema, setDescription, setDisallow, setExtends, setId, setReadonly, setRequired
-
Field Details
-
elements
-
-
Constructor Details
-
UnionTypeSchema
public UnionTypeSchema()
-
-
Method Details
-
isUnionTypeSchema
public boolean isUnionTypeSchema()Description copied from class:JsonSchema
determine if this JsonSchema is anUnionTypeSchema
.- Overrides:
isUnionTypeSchema
in classJsonSchema
- Returns:
- true if this JsonSchema is an UnionTypeSchema, false otherwise
-
asUnionTypeSchema
Description copied from class:JsonSchema
Attempt to return this JsonSchema as anUnionTypeSchema
- Overrides:
asUnionTypeSchema
in classJsonSchema
- Returns:
- this as a UnionTypeSchema if possible, or null otherwise
-
getType
public com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatTypes getType()- Specified by:
getType
in classJsonSchema
-
getElements
-
setElements
-
equals
- Overrides:
equals
in classJsonSchema
-
_equals
-