You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Alexander Rosenfeld (Jira)" <ji...@apache.org> on 2023/04/20 23:48:00 UTC

[jira] [Created] (AVRO-3739) Avro code generation for C# doesn't support references to types across files

Alexander Rosenfeld created AVRO-3739:
-----------------------------------------

             Summary: Avro code generation for C# doesn't support references to types across files
                 Key: AVRO-3739
                 URL: https://issues.apache.org/jira/browse/AVRO-3739
             Project: Apache Avro
          Issue Type: Bug
          Components: csharp
            Reporter: Alexander Rosenfeld


Hi Apache Avro maintainers, thanks in advance for reviewing this. I'm using the [https://www.nuget.org/packages/Apache.Avro] package (and also the `avrogen` C# tool) to generate C# classes from my Avro schemas. I have a few common building blocks to these schemas (common things like Enum definitions that get used in multiple places across multiple files). I'd like to DRY them by defining them once and _referencing_ them many times, instead of defining them everywhere I need to use them.

 

I understand this behavior is possible with Avro in general. It also appears that the JVM side of things supports this behavior through and through. However, when I try to generate C# from Avro schema files that have this multi-file connectivity, I get errors about not being able to resolve / find the type.

 

I have posted a question on StackOverflow about this, it provides some example JSON and C# for what I'm trying to do: [https://stackoverflow.com/questions/76065680/avro-c-sharp-generate-classes-using-types-defined-across-multiple-schema-files]

 

ps. apologies if the urgency is not right. I wasn't sure how to label this, so I left it at the default. This is a pretty big missing feature to me.



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