mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2026-03-01 09:18:56 +00:00
* [Rust] Update reqwest dependency to 0.13 with query and form features Update the Rust client generator template to use reqwest 0.13 instead of 0.12, as requested in issue #22621. In reqwest 0.13, the `query()` and `form()` methods have been moved behind feature flags and are disabled by default. Since the generated Rust clients extensively use both methods, these features must be explicitly enabled. Changes: - Updated all reqwest dependencies from ^0.12 to ^0.13 - Added "query" and "form" to reqwest feature flags for all variants: - Blocking client configuration - Async client with file stream support - Async client without file stream - Reqwest-trait variant - Updated reqwest-middleware features for consistency This maintains full backward compatibility as only the dependency version and features change. The API surface of generated code remains identical. Fixes #22621 * [Rust] Updated samples * [Rust] Rename rustls-tls feature to rustls to match reqwest 0.13 In reqwest 0.13, the rustls-tls feature was renamed to rustls. This updates the Cargo.mustache template and all generated samples to use the new feature name, fixing CI build failures when using --all-features flag. * [Rust] Upgrade reqwest-middleware to 0.5 for reqwest 0.13 compatibility The previous reqwest-middleware 0.4 depends on reqwest 0.12, which caused type conflicts when upgrading to reqwest 0.13: - reqwest::Error (from reqwest 0.13) - reqwest_middleware::reqwest::Error (from reqwest 0.12 via middleware) These are different types from different versions of reqwest. reqwest-middleware 0.5 is compatible with reqwest 0.13, resolving the version conflict. With both using the same reqwest version, the re-exported types are now correctly aligned. * [Rust] Use query and form features from reqwest-middleware It adds "query" and "form" features for reqwest-middleware crate in petstore-async-middleware example and Cargo.mustache template. --------- Co-authored-by: Emil Bonne Kristiansen <emilbonnek@gmail.com>
Rust API client for petstore-name-mapping
rust name mapping test
Overview
This API client was generated by the OpenAPI Generator project. By using the openapi-spec from a remote server, you can easily generate an API client.
- API version: 1.0.0
- Package version: 1.0.0
- Generator version: 7.20.0-SNAPSHOT
- Build package:
org.openapitools.codegen.languages.RustClientCodegen
Installation
Put the package under your project folder in a directory named petstore-name-mapping and add the following to Cargo.toml under [dependencies]:
petstore-name-mapping = { path = "./petstore-name-mapping" }
Documentation for API Endpoints
All URIs are relative to http://petstore.swagger.io/v2
| Class | Method | HTTP request | Description |
|---|---|---|---|
| FakeApi | get_parameter_name_mapping | GET /fake/parameter-name-mapping | parameter name mapping test |
Documentation For Models
To get access to the crate's generated documentation, use:
cargo doc --open