ory / sdk

The place where ORY's SDKs are being auto-generated
Apache License 2.0
141 stars 85 forks source link

Set Rust `supportMiddleware: true` #312

Open beanow-at-crabnebula opened 9 months ago

beanow-at-crabnebula commented 9 months ago

Preflight checklist

Ory Network Project

No response

Describe your problem

I'm looking to add trace instrumentation to the Rust Ory client. Currently this isn't possible as we're missing middleware support.

Describe your ideal solution

Middleware support is available since: https://github.com/OpenAPITools/openapi-generator/pull/13946

By generating with this option. https://github.com/openapitools/openapi-generator/blob/master/docs/generators/rust.md#config-options supportMiddleware: true

Workarounds or alternatives

Clone the SDK and generate with modified config yourself.

Version

master

Additional Context

NOTE: I think this would be a breaking change for the crate. Since the type of the client would change, anyone setting a client instead of the default would have a type issue and need to wrap it.

Along the lines of this, for a client without middleware added.

- client: my_client
+ client: reqwest_middleware::ClientBuilder(my_client).build()