mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2026-03-02 23:58:55 +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 oneof-reqwest
This tests for a oneOf interface representation
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: 0.0.1
- Package version: 0.0.1
- 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 oneof-reqwest and add the following to Cargo.toml under [dependencies]:
oneof-reqwest = { path = "./oneof-reqwest" }
Documentation for API Endpoints
All URIs are relative to http://localhost:8080
| Class | Method | HTTP request | Description |
|---|---|---|---|
| BarApi | create_bar | POST /bar | Create a Bar |
| FooApi | create_foo | POST /foo | Create a Foo |
| FooApi | get_all_foos | GET /foo | GET all Foos |
Documentation For Models
- Addressable
- Animal
- Apple
- Banana
- Bar
- BarCreate
- BarRef
- BarRefOrValue
- Cat
- Dog
- Entity
- EntityRef
- Extensible
- Foo
- FooRef
- FooRefOrValue
- Fruit
- FruitType
- Pasta
- Pizza
- PizzaSpeziale
To get access to the crate's generated documentation, use:
cargo doc --open