Open johancm opened 3 years ago
Hello,
Thanks for reaching out to us. I think it would make sense to add this configuration into GlueSchemaRegistryConfiguration that will be consumed in the JsonSerializer. By default it will be disabled.
We are happy to accept a PR if you can raise one. It would be great if you can include a test. Thanks!
When sending POJO's using the JSON data format, the schema that gets generated do not allow for nullable fields. There is also no way to pass this intent as part of the configuration.
In particular, I'm referring to the following:
com.amazonaws.services.schemaregistry.serializers.json.JsonSerializer
serializes using the default configuration
this.jsonSchemaGenerator = new JsonSchemaGenerator(this.objectMapper);
However, the
mbknor-jackson-jsonSchema
library used has a configuration that, when generating a schema allows for nullable files , see theNullable types
section hereThis library needs to be extended with a configuration to allow for the generation of a schema that supports nullable types as described above.
without nullable fileds
vs
with nullable fields