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

[REQ][rust] Use relative paths in generated code #20740

Open
michaelbeaumont opened this issue Feb 26, 2025 · 0 comments · May be fixed by #20741
Open

[REQ][rust] Use relative paths in generated code #20740

michaelbeaumont opened this issue Feb 26, 2025 · 0 comments · May be fixed by #20741

Comments

@michaelbeaumont
Copy link

Is your feature request related to a problem? Please describe.

The rust generator should support dropping the generated code into an arbitrary path in the crate. Currently, each generated file refers to the absolute path crate::models, forcing the use of hacks like search and replace if the generated could should be in crate::api::models, for example.

Describe the solution you'd like

Rust doesn't make this obvious but we can import the parent without the absolute path using:

use super::super::models;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant