-
-
Notifications
You must be signed in to change notification settings - Fork 141
Add @AvroNamespace annotation to override Avro type namespace #324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add @AvroNamespace annotation to override Avro type namespace #324
Conversation
* Annotation allows to override default Avro type namespace value. | ||
* Default value is Java package name. | ||
*/ | ||
@Target(ElementType.TYPE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To allow "annotation bundle" usage may also want to add ElementType.ANNOTATION_TYPE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, good idea.
ElementType.ANNOTATION_TYPE added to allow "annotation bundle" usage.
but one thing is that this cannot go in 2.13 patch since it is both slightly backwards-incompatible (changes method signature of the helper method) and (more importantly) adds a new annotation type. EDIT: Removed a former comment wrt Ion -- for some reason, got things mixed up. |
PR is now rebased on 2.14. |
Thank you @MichalFoksa! Also, apologies for nonsensical comment wrt Ion & Amazon developers. This is for Avro, but somehow I managed to get things fixed. I'll try to get this reviewed soon, |
…space. Current namespace value is Java package name. This annotation allows to override its name.
No problem, really - I understand :). I have updated my commit - just reorganized imports in AvroSchemaHelper. Moved imports from |
Will merge: will also change package name from "...avro.annotations" to "...avro.annotation", just to be consistent with other Jackson packages (jackson-annotations, jackson-databind, jackson-dataformat-xml). |
Thank you again @MichalFoksa for contributing this! It will go in 2.14.0 once we get there. |
@cowtowncoder |
New
AvroNamespace
annotation to override default Avro type namespace.Simple way how to override default Avro namespace value with a new, custom, annotation.
This solves #310.
Is the new annotation package OK?