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 anUnionTypeSchemabooleancom.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatTypesgetType()booleandetermine if this JsonSchema is anUnionTypeSchema.voidsetElements(ValueTypeSchema[] elements) Methods inherited from class 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:JsonSchemadetermine if this JsonSchema is anUnionTypeSchema.- Overrides:
isUnionTypeSchemain classJsonSchema- Returns:
- true if this JsonSchema is an UnionTypeSchema, false otherwise
-
asUnionTypeSchema
Description copied from class:JsonSchemaAttempt to return this JsonSchema as anUnionTypeSchema- Overrides:
asUnionTypeSchemain classJsonSchema- Returns:
- this as a UnionTypeSchema if possible, or null otherwise
-
getType
public com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatTypes getType()- Specified by:
getTypein classJsonSchema
-
getElements
-
setElements
-
equals
- Overrides:
equalsin classJsonSchema
-
_equals
-