You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by "Carsten Seibert (Jira)" <ji...@apache.org> on 2023/12/28 14:13:00 UTC

[jira] [Commented] (AVRO-2728) idl2schemata: types with the same name in different namespaces => overwritten files

    [ https://issues.apache.org/jira/browse/AVRO-2728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17801013#comment-17801013 ] 

Carsten Seibert commented on AVRO-2728:
---------------------------------------

We are also facing this issue when importing different domains from our quite extensive company models. Any chance to have this priotised? 

> idl2schemata: types with the same name in different namespaces => overwritten files
> -----------------------------------------------------------------------------------
>
>                 Key: AVRO-2728
>                 URL: https://issues.apache.org/jira/browse/AVRO-2728
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: tools
>    Affects Versions: 1.10.0, 1.9.1
>            Reporter: Jarek Rosiek
>            Priority: Major
>
> For the following AVDL:
> {code:java}
> @namespace("ns1")
> protocol Proto {
>   record Foo {
>     ns2.Foo foo;
>   }  
>   @namespace("ns2")
>   record Foo {
>     int x;
>   }
> }
> {code}
> 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:
> {code:java}
> ns1.Foo.avsc
> ns2.Foo.avsc{code}
>  
> 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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)