Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve binary payload support #333

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

robbertvc
Copy link

@robbertvc robbertvc commented Jan 12, 2022

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 responseFormat for 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant