You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
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 todotnet 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.
The text was updated successfully, but these errors were encountered: