Class AvroSchemaGenerator
java.lang.Object
tools.jackson.dataformat.avro.schema.VisitorFormatWrapperImpl
tools.jackson.dataformat.avro.schema.AvroSchemaGenerator
- All Implemented Interfaces:
tools.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper,tools.jackson.databind.jsonFormatVisitors.WithGettableSerializationContext,tools.jackson.databind.jsonFormatVisitors.WithSettableSerializationContext
Class that can generate an
AvroSchema for a given Java POJO,
using definitions Jackson would use for serialization.
An instance is typically given to
ObjectMapper.acceptJsonFormatVisitor(java.lang.Class<?>, tools.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper)
which will invoke necessary callbacks.
For default configuration of things like "Logical Types support", see Javadocs
of VisitorFormatWrapperImpl.
-
Nested Class Summary
Nested classes/interfaces inherited from interface tools.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper
tools.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper.Base -
Field Summary
Fields inherited from class tools.jackson.dataformat.avro.schema.VisitorFormatWrapperImpl
_builder, _context, _logicalTypesEnabled, _schemas, _valueSchema, _writeEnumAsString, DEFAULT_ENUM_AS_STRING, DEFAULT_LOGICAL_TYPES_ENABLED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDisables Avro schema with Logical Types generation.Disable Java enum to Avro string mapping.Enables Avro schema with Logical Types generation.Enable Java enum to Avro string mapping.Methods inherited from class tools.jackson.dataformat.avro.schema.VisitorFormatWrapperImpl
_throwUnsupported, _throwUnsupported, createChildWrapper, expectAnyFormat, expectArrayFormat, expectAvroFormat, expectBooleanFormat, expectIntegerFormat, expectMapFormat, expectNullFormat, expectNumberFormat, expectObjectFormat, expectStringFormat, getAvroSchema, getContext, getSchemas, isLogicalTypesEnabled, isWriteEnumAsStringEnabled, setContext
-
Constructor Details
-
AvroSchemaGenerator
public AvroSchemaGenerator()
-
-
Method Details
-
getGeneratedSchema
-
enableLogicalTypes
Description copied from class:VisitorFormatWrapperImplEnables Avro schema with Logical Types generation.- Overrides:
enableLogicalTypesin classVisitorFormatWrapperImpl
-
disableLogicalTypes
Description copied from class:VisitorFormatWrapperImplDisables Avro schema with Logical Types generation.- Overrides:
disableLogicalTypesin classVisitorFormatWrapperImpl
-
enableWriteEnumAsString
Description copied from class:VisitorFormatWrapperImplEnable Java enum to Avro string mapping.- Overrides:
enableWriteEnumAsStringin classVisitorFormatWrapperImpl
-
disableWriteEnumAsString
Description copied from class:VisitorFormatWrapperImplDisable Java enum to Avro string mapping.- Overrides:
disableWriteEnumAsStringin classVisitorFormatWrapperImpl
-