Class TitleSchemaFactoryWrapper
java.lang.Object
com.fasterxml.jackson.module.jsonSchema.jakarta.factories.SchemaFactoryWrapper
com.fasterxml.jackson.module.jsonSchema.jakarta.customProperties.TitleSchemaFactoryWrapper
- All Implemented Interfaces:
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWithSerializerProvider, com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper, Visitor
Adds a title to every object schema, either root level or nested. Generally
useful for writing additional properties to a schema.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classNested classes/interfaces inherited from interface com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper.Base -
Field Summary
Fields inherited from class SchemaFactoryWrapper
provider, schema, schemaProvider, visitorContext, visitorFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddTitle(JsonSchema schema, com.fasterxml.jackson.databind.JavaType type) Adds writes the type as the title of the schema.com.fasterxml.jackson.databind.jsonFormatVisitors.JsonArrayFormatVisitorexpectArrayFormat(com.fasterxml.jackson.databind.JavaType convertedType) com.fasterxml.jackson.databind.jsonFormatVisitors.JsonObjectFormatVisitorexpectObjectFormat(com.fasterxml.jackson.databind.JavaType convertedType) Methods inherited from class SchemaFactoryWrapper
expectAnyFormat, expectBooleanFormat, expectIntegerFormat, expectMapFormat, expectNullFormat, expectNumberFormat, expectStringFormat, finalSchema, getProvider, setProvider, setVisitorContext
-
Constructor Details
-
TitleSchemaFactoryWrapper
public TitleSchemaFactoryWrapper()
-
-
Method Details
-
expectObjectFormat
public com.fasterxml.jackson.databind.jsonFormatVisitors.JsonObjectFormatVisitor expectObjectFormat(com.fasterxml.jackson.databind.JavaType convertedType) - Specified by:
expectObjectFormatin interfacecom.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper- Overrides:
expectObjectFormatin classSchemaFactoryWrapper
-
expectArrayFormat
public com.fasterxml.jackson.databind.jsonFormatVisitors.JsonArrayFormatVisitor expectArrayFormat(com.fasterxml.jackson.databind.JavaType convertedType) - Specified by:
expectArrayFormatin interfacecom.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper- Overrides:
expectArrayFormatin classSchemaFactoryWrapper
-
addTitle
Adds writes the type as the title of the schema.- Parameters:
schema- The schema who's title to set.type- The type of the object represented by the schema.
-