[REQ] Update Hyper version for Rust client to use v1
Is your feature request related to a problem? Please describe.
The Rust client uses hyper v0.14, while v1.1.0 exists. Presumably the more modern v1 release should be used.
Describe the solution you'd like
A update to the generator to use hyper v1.
Describe alternatives you've considered
There could be a feature to allow using the newer or older hyper version, in case this is used by people still on hyper v0.14 who don't want to ship both versions.
https://hyper.rs/guides/1/upgrading/ has a good guide to upgrading.
There could be a feature to allow using the newer or older hyper version, in case this is used by people still on hyper v0.14 who don't want to ship both versions.
Thanks for the suggestion. I think we can go with direct upgrade without fallback to v0.14 to start with.
If there's a need (valid) later, we can create another library option (e.g. hyper-0.x)
May I know if you can contribute a PR for the upgrade? Let me know if you need help on that.
I have wanted this before as well and thought about contributing a PR, but one thing I am unclear about is the swagger crate. It would basically need to be updated in lockstep. Are you somehow involved there or know the authors?
@wing328: Thanks for the suggestion. I think we can go with direct upgrade without fallback to v0.14 to start with.
What would that mean for the version of openapi-generator being targeted? I've opened a PR against 8.0.x.
@shahn: I have wanted this before as well and thought about contributing a PR, but one thing I am unclear about is the swagger crate. It would basically need to be updated in lockstep.
The rust-hyper client doesn't seem to use the swagger crate. Just the rust-server does. Hoping it's okay to just upgrade the rust-hyper generator for now.
I was surprised at how much the API changed. Even using the provided legacy::Client it wasn't just a drop in update given how Body is now modeled very differently as a trait.
Ah yes, I am using rust-server specifically. I am sure it is OK to update just rust-hyper, but updating both would be nicer (but also involve the swagger crate).