ImFlog / schema-registry-plugin

Gradle plugin to interact with Confluent Schema-Registry.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for attaching @Nullable annotation on nullable fields

sgc109 opened this issue · comments

I'm using the java class generated by this plugin from Kotlin.

However, even though I declared a field as nullable in avro(included "null" to "type"), @Nullable annotation is not attached in the resulting java file, so Kotlin can't consider that the field is nullable type.
I think, of course, I could define some delegator class wrapping the result java class as a work-around, but I don't think its that clean solution.
Am I wrong at some point, or would it be possible to support @Nullable attaching feature?

Hello @sgc109, this plugin is not responsible for generating the java classes from an avro schema definition, it's only interacting with the schema registry to retrieve / compare and push versions of those schemas.
I think you are probably using another gradle plugin that does this java class generation. If so I think you should move this issue to this plugin.

Feel free to share a redacted build.gradle file to reproduce the issue if I am mistaken.

Without news from you @sgc109 I am closing this.
If you have anything else to add ping me on this issue and I will reopen it if needs be.
🙏