Skip to content

Conversation

@emilbonnek
Copy link

@emilbonnek emilbonnek commented Jan 7, 2026

Summary

This PR updates the Rust client generator template to use reqwest 0.13 instead of 0.12 (closes #22621).

Caution

I have not tested this with a real generated client yet.

Changes

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.

Updates:

  • Updated all reqwest dependencies from ^0.12 to ^0.13
  • Added "query" and "form" to reqwest feature flags for all variants.

Why query feature is needed

The generated API code in api.mustache extensively uses req_builder.query() for handling query parameters. Without this feature flag, generated clients would fail to compile with reqwest 0.13.

Why form feature is needed

The generated API code uses req_builder.form() for URL-encoded form parameters. This feature is also required for compilation.


Summary by cubic

Update the Rust client generator to use reqwest 0.13 and enable the query and form features so generated clients keep working with query params and URL-encoded forms. Closes #22621.

  • Dependencies
    • Bumped reqwest to ^0.13 across blocking, async (with/without file streaming), and reqwest-trait variants.
    • Enabled "query" and "form" features for all configs; kept "json", "multipart", and "stream" where applicable.
    • Adjusted reqwest-middleware features (removed "blocking") for consistency. No API surface changes.

Written for commit 1ffe00a. Summary will update on new commits.

Update the Rust client generator template to use reqwest 0.13 instead
of 0.12, as requested in issue OpenAPITools#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 OpenAPITools#22621
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[REQ] [Rust] Build clients with reqwest 0.13

1 participant