openapi-generator icon indicating copy to clipboard operation
openapi-generator copied to clipboard

[rust] Support async file upload

Open vincent-herlemont opened this issue 1 year ago • 4 comments

Adding upload support when generating async Rust code.

PR checklist

  • [x] Read the contribution guidelines.
  • [x] Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • [x] Run the following to build the project and update samples:
    ./mvnw clean package || exit
    ./bin/generate-samples.sh ./bin/configs/*.yaml || exit
    ./bin/utils/export_docs_generators.sh || exit
    
    (For Windows users, please run the script in Git BASH) Commit all changed files. This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master. These must match the expectations made by your contribution. You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*. IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
  • [x] File the PR against the correct branch: master (upcoming 7.x.0 minor release - breaking changes with fallbacks), 8.0.x (breaking changes without fallbacks)
  • [x] If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

vincent-herlemont avatar Dec 04 '24 14:12 vincent-herlemont

The function From.file for adding a file in multipart requests seems to require the stream feature of the reqwest crate.

vincent-herlemont avatar Dec 05 '24 13:12 vincent-herlemont

Mention @farcaller to review Rust part.

vincent-herlemont avatar Dec 05 '24 13:12 vincent-herlemont

thanks for the PR

cc @frol (2017/07) @farcaller (2017/08) @richardwhiuk (2019/07) @paladinzh (2020/05) @jacob-pro (2022/10)

wing328 avatar Dec 06 '24 09:12 wing328

@farcaller @vincent-herlemont Any chance of reviving this?

metasim avatar May 28 '25 17:05 metasim

@metasim did you test it locally?

can you or @vincent-herlemont submit a new PR on top of this one with resolved merge conflicts?

thanks.

wing328 avatar Aug 01 '25 08:08 wing328

@wing328 I did not test this PR.... I was more interested in the functionality being implemented, and it looked like it was more or less done, yet stalled for some reason.

metasim avatar Aug 01 '25 13:08 metasim

looks like this is already done with an additional option useAsyncFileStream

so closing this one

wing328 avatar Oct 19 '25 08:10 wing328