-
-
Notifications
You must be signed in to change notification settings - Fork 138
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
JsonEnumDefaultValue not supported when using AvroMapper to generate schema from JAVA class #388
Comments
Sounds like missing functionality. I don't know off-hand how easy it'd be to add: I think If anyone wants to tackle this, I'd be happy to help with PR. |
Yup createEnumSchema is where the update is needed. org.apache.avro.Schema createEnum is overloaded with additional param for setting default value. https://github.com/apache/avro/blob/master/lang/java/avro/src/main/java/org/apache/avro/Schema.java#L238 Do you know how we get @JsonEnumDefaultValue value to use that method to use for createEnum? |
@Sonic-Rage All access to annotations is via Introspection would need to be done by caller of |
I think this issue can be finished now, since Avro was upgraded to 1.11.3. |
@Sonic-Rage I updated the PR #391 I think it is now completable as per @MichalFoksa 's comment |
Need it to have the default key value pair in order to make enum forward compatible
Unless I'm missing something I can't find a way to configure the class to fill in the default value when creating the schema
Configured the AvroMapper in some groovy to create the schema for reference
The text was updated successfully, but these errors were encountered: