Skip to content

feat: avro_derive: Allow providing a name other than the ident - #239

Merged
martin-g merged 4 commits into
apache:mainfrom
bryanburgers:name
Jul 23, 2025
Merged

martin-g merged 4 commits into
apache:mainfrom
bryanburgers:name

Conversation

@bryanburgers

@bryanburgers bryanburgers commented Jul 23, 2025 •

Copy link
Copy Markdown
Contributor

I'm trying to write Rust structs that match an external schema that is created outside of Rust.

The external schema uses names that aren't idiomatic Rust struct identifiers.

Allowing the renaming of structs and enums means I don't need to compromise on Rust identifiers just to match the schema exactly.

@Kriskras99 Kriskras99 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice addition, might be enough to make derives on rsgen-avro match the original schema.

Comment thread avro_derive/tests/derive.rs Resolved
Comment thread avro_derive/tests/derive.rs Resolved
Comment thread avro_derive/tests/derive.rs Resolved
@martin-g martin-g changed the title avro_derive: Allow providing a name other than the ident feat: avro_derive: Allow providing a name other than the ident Jul 23, 2025
bryanburgers and others added 2 commits July 23, 2025 07:42
@bryanburgers

Copy link
Copy Markdown
Contributor Author

Thanks for looking at this so quickly!

Let me know if you’d like me to rebase into a single commit when you’re done reviewing.

@martin-g

Copy link
Copy Markdown
Member

Let me know if you’d like me to rebase into a single commit when you’re done reviewing.

No need!
I'll squash it with the merge!

@martin-g
martin-g merged commit 1e64604 into apache:main Jul 23, 2025
@martin-g

Copy link
Copy Markdown
Member

Thank you for the contribution, @bryanburgers !

@bryanburgers bryanburgers mentioned this pull request Aug 20, 2025
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 this pull request may close these issues.

3 participants