opwvhk commented on PR #2887: URL: https://github.com/apache/avro/pull/2887#issuecomment-2114512046
> Regarding you point where we can extend the `@AvroTypeName` annotation functionality to also override the name of the record, in my opinion there is already `@AvroName` annotation that specially does this. Actually, `@AvroName` if for fields only; not types. In the original discussion we came to the conclusion that adding a `namespace` field to that annotation would lead to confusion. On the other hand, using a separate `@AvroNamespace` annotation would be a start into the annotation problems ([as written about quite a bit](https://duckduckgo.com/?q=java+annotations+mistake+problem)). With this, I think we should make a choice: 1. Use `@AvroName` for field names, and `@AvroTypeName` for the full type names (i.e., including namespace) 2. Adjust `@AvroName` for fields and types, and `@AvroNamespace` for type namespaces 3. Use `@AvroName` only, but add a special syntax like `my.namespace._` to override the namespace only The advantage of option 2 is that this sidesteps this entire discussion, but it also means there are 2 annotations to adjust the full type name. The latter is what will stay with us forever. The advantage of option 3 is that we don't have two annotations on full type names, but I'm not happy with the extra syntax. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
