-
Hi, I am just getting started and having a hard time creating avro schemas with nullable lists.
Generates
But that class does generate avro schema with a nullable simple_array. I have found success with the cli flag --nullable-references all. Is there something I can do in setup/config of SetAvroValueSerializer that is equivalent to --nullable-references all? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You should be able to make it work by passing a custom var producer = new ProducerBuilder<SomeKey, SomeValue>(producerConfig)
.SetValueSerializer(new AsyncSchemaRegistrySerializer(
registryConfig,
registerAutomatically: AutomaticRegistrationBehavior.Always,
schemaBuilder: new SchemaBuilder(nullableReferenceTypeBehavior: NullableReferenceTypeBehavior.All)))
.Build(); Alternatively, you could enable nullable reference types; the default behavior takes those annotations into account. |
Beta Was this translation helpful? Give feedback.
You should be able to make it work by passing a custom
SchemaBuilder
toAsyncSchemaRegistrySerializer
:Alternatively, you could enable nullable reference types; the default behavior takes those annotations into account.