Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #11933
Closed
Open
Issue created Mar 21, 2022 by Administrator@rootContributor

[BUG][java] Allow requests to return InputStream rather than File

Created by: hamermike

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

When the Java SDK is paired with the okhttp-gson library requests made with a response body of...

"type": "string",
"format": "binary"

return a File rather than an InputStream or other form of binary data. I am logging the feature request as I've tried to implement this without success and am looking for guidance on the implementation.

Describe the solution you'd like

Requests with a response body of...

"type": "string",
"format": "binary"

return an InputStream rather than relying on a File. Using the useAbstractionForFiles additional property to control this behavior would be acceptable.

Describe alternatives you've considered

I've attempted to implement this functionality within the SDK using a combination of an additional property, useAbstractionForFiles, which already exists and seems to cover this use-case by the description of the property and using Mustache templates.

Additional context

I've come across an issue where in testing {{#returnType}}{{#isFile}}true{{/isFile}}{{/returnType}} within the request never returns true although the return type from the function is of type File.

Assignee
Assign to
Time tracking