-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] file uploads not supported by the Rust generator #17822
Comments
Here is a spec that show the problem if it would be helpful I have no idea if this might be helpful but it's what copilot says in the interface about that TODO line:
This is still a problem on |
For the implementation of this issue, what interface should we have?
|
Stream reader would be my preference |
that's what i prefer as it will be a backward compatible change. otherwise, we will need an option for fallback. |
Bug Report Checklist
Description
It's not clear how the project documents file upload support. But according to https://openapi-generator.tech/docs/generators/rust/ both
File
data type andFormMultipart
are implemented. In practice the generated code contains just a TODO.Side comment: file parameter becomes encoded as
file: std::path::PathBuf
which makes it impossible to use the generated code from WASM.openapi-generator version
Also checked the latest templates in
master
OpenAPI declaration file content or url
Generation Details
In the generated Rust code I see
Reflecting the template
openapi-generator/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache
Line 269 in 783e68c
Steps to reproduce
Create an endpoint with response body with
"content": "multipart/form-data"
and containing file parameter with format "binary", and type "string. Run Rust generator for this API spec.Related issues/PRs
#16167
Suggest a fix
Create an explicit ticket about file support implementation and make it visible on the website that it's still missing.
The text was updated successfully, but these errors were encountered: