public class AvroSchemaGenerator extends VisitorFormatWrapperImpl
AvroSchema for a given Java POJO,
using definitions Jackson would use for serialization.
An instance is typically given to
ObjectMapper.acceptJsonFormatVisitor(java.lang.Class<?>, com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper)
which will invoke necessary callbacks.
For default configuration of things like "Logical Types support", see Javadocs
of VisitorFormatWrapperImpl.
_builder, _logicalTypesEnabled, _provider, _schemas, _valueSchema, _writeEnumAsString, DEFAULT_ENUM_AS_STRING, DEFAULT_LOGICAL_TYPES_ENABLED| Constructor and Description |
|---|
AvroSchemaGenerator() |
| Modifier and Type | Method and Description |
|---|---|
AvroSchemaGenerator |
disableLogicalTypes()
Disables Avro schema with Logical Types generation.
|
AvroSchemaGenerator |
disableWriteEnumAsString()
Disable Java enum to Avro string mapping.
|
AvroSchemaGenerator |
enableLogicalTypes()
Enables Avro schema with Logical Types generation.
|
AvroSchemaGenerator |
enableWriteEnumAsString()
Enable Java enum to Avro string mapping.
|
AvroSchema |
getGeneratedSchema() |
_throwUnsupported, _throwUnsupported, createChildWrapper, expectAnyFormat, expectArrayFormat, expectAvroFormat, expectBooleanFormat, expectIntegerFormat, expectMapFormat, expectNullFormat, expectNumberFormat, expectObjectFormat, expectStringFormat, getAvroSchema, getProvider, getSchemas, isLogicalTypesEnabled, isWriteEnumAsStringEnabled, setProviderpublic AvroSchema getGeneratedSchema()
public AvroSchemaGenerator enableLogicalTypes()
VisitorFormatWrapperImplenableLogicalTypes in class VisitorFormatWrapperImplpublic AvroSchemaGenerator disableLogicalTypes()
VisitorFormatWrapperImpldisableLogicalTypes in class VisitorFormatWrapperImplpublic AvroSchemaGenerator enableWriteEnumAsString()
VisitorFormatWrapperImplenableWriteEnumAsString in class VisitorFormatWrapperImplpublic AvroSchemaGenerator disableWriteEnumAsString()
VisitorFormatWrapperImpldisableWriteEnumAsString in class VisitorFormatWrapperImplCopyright © 2025 FasterXML. All rights reserved.