OpenAPITools / OpenAPITools/openapi-generator

[REQ] [Java] [native] Support useAbstractionForFiles for this library as well

Open
#8,549 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement: Feature
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Is your feature request related to a problem? Please describe.

I would like to be able to send and receive an InputStream instead of a File when uploading/downloading.

Describe the solution you'd like

Support the useAbstractionForFile config option for the native library for uploading files (similar to "resttemplate").

Describe alternatives you've considered

Create a custom template but this is a very common and frequently requested feature.

Additional context

  1. Consider adding support of useAbstractionForFile config option in OkHttp library as well (as requested in #7941 ).
  2. Extend the functionality and return an InputStream when downloading files, not only when uploading files (for all supported libraries) As requested in the comments of #6715 .

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect the native library templates and the existing resttemplate implementation for the useAbstractionForFile option. Trace how file uploads are generated and verify that the generated client accepts an InputStream instead of a File. Consider the related OkHttp and download requirements only if the implementation scope includes them.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.