[Kotlin]] add support for binary response#7205
[Kotlin]] add support for binary response#7205revmischa wants to merge 5 commits intoOpenAPITools:masterfrom
Conversation
Shippable CI reports the above error. Please take a look when you've time. |
|
Imports fixed. Not sure what's with the CircleCI error, looks like a transient issue to me |
|
All tests passed. If no further feedback on this PR, I'll merge it over the weekend. |
|
I think my solution is not a very good solution. We shouldn't write out tempfiles IMO, we should pass the InputStream handle back to the caller. I was hoping to start some discussion on how to achieve that because I couldn't figure out how to change the type mapping only for the response. |
What about using InputStream for both response and request ? In other words, we'll change the type mapping to map I'll put the merge on hold. |
|
I think this would have to be changed and it would break existing users https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/infrastructure/ApiClient.kt.mustache#L100 |
|
Upcoming version v5.0.0 is a major release and it's ok to include breaking changes without fallbacks. |
|
Closed via #9284 |
Add missing support for handling binary responses in Kotlin clients.
It would be a lot better to use
InputStreamfor the response type mapping, could use some advice on how to achieve that.More discussion at issue: #7204
@jimschubert , @dr4ke616 @karismann @Zomzog @andrewemery @4brunu @yutaka0m
PR checklist
./bin/generate-samples.shto update all Petstore samples related to your fix. 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*. For Windows users, please run the script in Git BASH.master