Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.10.0, 1.9.1
-
None
-
None
Description
For the following AVDL:
@namespace("ns1") protocol Proto { record Foo { ns2.Foo foo; } @namespace("ns2") record Foo { int x; } }
the tool will generate just a single file named Foo.avsc with the schema of the last record Foo.
Suggested solution:
Add an option to the idl2schemata command named, for example, -fqnames that will make the tool generate files named using full qualified type names. For example, for the protocol shown above the files would be named:
ns1.Foo.avsc ns2.Foo.avsc
Impact:
My company wanted to use Avro IDL as a specification format for the schemas (more readable, ability to import other files). We need to push the schemas to kafka Schema Registry. We could use idl2schemata to generate schemas in JSON format but we risk pushing wrong schema whenever different teams working on schemas from different namespaces create a type with the same base name.