[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
.