swagger-api / swagger-codegen

swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.
http://swagger.io
Apache License 2.0
16.99k stars 6.03k forks source link

[Rust] Allow to choose client library between hyper and reqwest #8803

Open bcourtine opened 6 years ago

bcourtine commented 6 years ago
Description

Rust client codegen uses hyper library. This library is "low-level", and requires some tunning (to deal with https, for example). Reqwest alternative https://github.com/seanmonstar/reqwest (which uses hyper under the hood), seems to be a good alternative.

Swagger-codegen version

master

Swagger declaration file content or url

Not applicable

Command line used for generation

Not applicable

Steps to reproduce

Not applicable

Related issues/PRs

Not found

Suggest a fix/enhancement

PR in preparation.

ctaggart commented 5 years ago

Any reason why this wasn't reviewed and merged? Pull request #8804 has been open for 11 months. It would be great a reqwest option and may be a surf option for clients too.

bcourtine commented 5 years ago

Hi @ctaggart.

Nobody looked at this PR here. But I submitted the same PR on the Swagger-Codegen fork https://github.com/OpenAPITools/openapi-generator

Fork project is much more active, and the PR was merged a long time ago (with other stuff since this time). So, if you need a Rust client, I can suggest to use OpenAPI generator: Rust generator has more features (including a Reqwest based client).