-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
[Rust] Add support for reqwest-middleware when using reqwest #13946
[Rust] Add support for reqwest-middleware when using reqwest #13946
Conversation
60107f9
to
c8b1f9d
Compare
I'm a little bit concerned about making this a mandatory extra dependency - especially a crate which appears relatively new / small in popularity... What do you think about putting this behind an optional feature flag instead? |
Fair enough. I'll give it a shot. |
20476ab
to
35dd16c
Compare
35dd16c
to
92799da
Compare
@jacob-pro I'd say it's ready now. |
modules/openapi-generator/src/main/resources/rust/reqwest/configuration.mustache
Outdated
Show resolved
Hide resolved
92799da
to
089b921
Compare
Looks good to me 👍 - @wing328 should be able to review ? |
The build is successful locally:
Will try to add tests to the CI in a separate PR. Thanks again for the enhancement. |
FYI. I've filed #13990 to add tests in CI. |
Add support for reqwest-middleware (only when async support is enabled).
With this, one can easily add middleware which add features like tracing or retries to the client requests:
Not sure if this would be considered a breaking change or not as it changes the Configuration struct signature. Let me know if I need to retarget the PR.
@frol, @farcaller, @richardwhiuk, @paladinzh, @jacob-pro: Pinging you as requested on the PR template :)
PR checklist
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*
.For Windows users, please run the script in Git BASH.
master
(6.3.0) (minor release - breaking changes with fallbacks),7.0.x
(breaking changes without fallbacks)