Skip to content
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

Support overriding a namespace when generating C# code from Avro schemas #149

Open
skovalyova opened this issue Aug 10, 2021 · 0 comments
Open
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@skovalyova
Copy link

Let's assume we have the following AVRO schema example-class.avsc:

{ "name": "Name", "namespace": "Avro.Namespace", "type": "record", "doc": "...", "fields": [ { "doc": "Description", "name": "some_field", "type": "string" } ] }

After calling the dotnet avro generate < example-class.avsc > ExampleClass.cs command, the namespace in the C# class matches the namespace defined in the schema (Avro.Namespace), so I need to rename it manually to fit the rest of C# code. Is it possible to add some parameter to dotnet avro generate command to specify a custom namespace?

For example, the avrogen tool provides similar parameter:
--namespace - Map an Avro schema/protocol namespace to a C# namespace. The format is "my.avro.namespace:my.csharp.namespace". May be specified multiple times to map multiple namespaces.

@skovalyova skovalyova changed the title Support overriding a nsmespace when generating C# code from Avro schemas Support overriding a namespace when generating C# code from Avro schemas Aug 10, 2021
@dstelljes dstelljes added enhancement New feature or request good first issue Good for newcomers labels Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants