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

Code generation from avro schema files #212

Open
Chuckame opened this issue May 18, 2024 · 2 comments
Open

Code generation from avro schema files #212

Chuckame opened this issue May 18, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@Chuckame
Copy link
Contributor

Chuckame commented May 18, 2024

the need

Currently, there is no up-to-date or maintained kotlin plug-in that generates kotlin code from an avro schema file.

This plug-in would generate kotlin source code compatible with avro4k and using all the built-in avro4k annotations and serializers. It also makes a new life for avro, especially when the famous davidmc24's plug-in stopped its support in décembre of 2023, and is now the ownership of apache 😅

how / questions

To be used with a configured instance of Avro, we could just generate code with @Contextual for all the non primitive fields. That way, the built-in serializers will be taken by default as they are already bundled with the default Avro instance.

There is still a challenge: how to discover the kotlin type behind a custom logical avro type?

@Chuckame Chuckame added the enhancement New feature or request label May 18, 2024
@trdw
Copy link
Contributor

trdw commented May 29, 2024

This would be very useful to us since we have a diverse collection of programming languages. For cases when teams prefer the schema-first approach (especially the non-JVM teams), we could have one .avsc file that drives code generation for all our languages, rather than Kotlin -> .avsc first.

@MRamonLeon
Copy link

Also valuable for us as we consume GraphQL schemas from other sources in our Kotlin repo.

@Chuckame Chuckame pinned this issue Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants