I was looking for method to mark avro field deprecated in a way that generated Java code (getters, and setters for the field) are marked with @Deprecated
annotation.
Puting @Deprecated
into "doc"
field doesn't work, because generator puts it into /** javadoc */
.
I have not had success getting the actual @Deprecated
annotation into the generated java code, but the older style javadoc deprecation kind of works:
// schema avdl
record MyRecord {
/** @deprecated unused */ union { null, int } count;
}
results in the generated java code having
/** @deprecated unused */
Integer count;
And some IDEs recognizes and highlights that (I use Intellij)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With