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 and FormMultipart 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
$ openapi-generator-cli --version
openapi-generator-cli 7.0.1
Also checked the latest templates in master
OpenAPI declaration file content or url
"UploadRequest": {
"properties": {
"file": {
"format": "binary",
"type": "string"
}
},
"required": [
"file"
],
"type": "object"
}
Generation Details
In the generated Rust code I see
// TODO: support file upload for 'file' parameter
Reflecting the template
|
// TODO: support file upload for '{{{baseName}}}' parameter |
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.
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
Filedata type andFormMultipartare implemented. In practice the generated code contains just a TODO.Side comment: file parameter becomes encoded as
file: std::path::PathBufwhich makes it impossible to use the generated code from WASM.openapi-generator version
Also checked the latest templates in
masterOpenAPI 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.