swagger-typescript-api
swagger-typescript-api copied to clipboard
improve binary payload support
Hi. Thanks for the very useful generator. We had some issues where the generated code was slightly wrong in the case of binary payloads when using Axios though. This PR contains some fixes which were useful for our specific needs:
- fix missing
responseFormatfor requests which have an octet-stream content-type response - use ArrayBuffer type instead of File for both browser and node compatibility
Let me known if you are interested in merging some of these fixes - with or without additional code changes. Thanks!
Example section (used for sending protobuf responses):
requestBody:
content:
application/octet-stream:
schema:
type: string
format: binary
required: true