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

Is it possible to generate class with Guid ? #168

Closed
ievgenii-shepeliuk opened this issue Jan 19, 2022 · 3 comments · Fixed by #170
Closed

Is it possible to generate class with Guid ? #168

ievgenii-shepeliuk opened this issue Jan 19, 2022 · 3 comments · Fixed by #170

Comments

@ievgenii-shepeliuk
Copy link

ievgenii-shepeliuk commented Jan 19, 2022

Hello

I am using dotnet avro generate to create C# class from Avro schema.
Since Avro supports logicalType: "uuid" for string fields, it would be great to have a peroperty of ``Guidtype instead ofstring`

Is it possible to achieve now ? If yes - could you please explain.

If it's not possible - can this be a feature request for C# class generator ?

PS: is C# class generation CLI is extensible now at all, i.e. to reuse the same logic for schema to class generation and deserializaion from kafka to an instance ?

@dstelljes
Copy link
Member

Thanks for the suggestion. We’ll cut a new 7.2.x in the next couple of days.

You can use the Chr.Avro.Codegen library directly in your applications. Presently Chr.Avro does not implement a source generator, which sounds like you’re after, but that’s something we could look at adding.

@ievgenii-shepeliuk
Copy link
Author

Thanks for the suggestion. We’ll cut a new 7.2.x in the next couple of days.

You can use the Chr.Avro.Codegen library directly in your applications. Presently Chr.Avro does not implement a source generator, which sounds like you’re after, but that’s something we could look at adding.

Thanks for fixing it.

But there's C# source generator - dotnet avro generate from Chr.Avro.Cli, what did you mean with

Presently Chr.Avro does not implement a source generator,

@dstelljes
Copy link
Member

A .NET source generator, which would support using generated code transparently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants