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 of namespace field #31

Open
untereiner opened this issue Aug 1, 2022 · 2 comments
Open

support of namespace field #31

untereiner opened this issue Aug 1, 2022 · 2 comments

Comments

@untereiner
Copy link

Hi,

I have a bunch an .avpr file (or a bunch of .avsc files) for whom I want to generate rust traits. These schemas are organized into namespaces.
I would like to give a try to implement a possible solution. I though about modules but I am beginner in rust. Do you think it could be a good solution to organize the files and the code into a crate ?

@lerouxrgd
Copy link
Owner

I think it might be possible to have rust modules corresponding to avro namespaces.

It could be within a single file or split in multiple files, although a single file sounds better to me.

I think the tricky point to add namespaces with the current implementation is that namespaces might change how the dependency order/dag is calculated (since you would need to group all structs from a same namespace together when generating it).

In any case it will be better to give it a try after the latest official avro-rs is released and integrated to this crate.

@untereiner
Copy link
Author

untereiner commented Aug 1, 2022

I think the tricky point to add namespaces with the current implementation is that namespaces might change how the dependency order/dag is calculated (since you would need to group all structs from a same namespace together when generating it).

yes what's true.
I will give it a try when rsgen-avro has officially moved to the apache-avro rust implementation.

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

No branches or pull requests

2 participants