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

retrieving binary data #2

Open
goot1 opened this issue Jul 25, 2019 · 1 comment
Open

retrieving binary data #2

goot1 opened this issue Jul 25, 2019 · 1 comment

Comments

@goot1
Copy link

goot1 commented Jul 25, 2019

Hi,

How can I process binary Data using this typescript-fetch generation tool?

I saw in the code:

return response{{#returnType}}.json(){{/returnType}};

at .json - But sometimes the backend is returning binary data.
How to process there?

Did I miss something?

Here is my hopefully working swagger configuration:
/store/product/{id}/pic:
summary: Image
get:
parameters:
- in: path
required: true
name: id
schema:
type: number
tags:
- shop
responses:
200:
description: Alles ok
content:
image/png:
schema:
$ref: '#/components/schemas/BinaryPic'
components:
BinaryPic:
description: Binary Image file
type: string
format: binary

@mgechev
Copy link
Owner

mgechev commented Jul 25, 2019

Not missing anything, the generator does not support binary data. Currently, I don't have the bandwidth to introduce support. If you have a moment, feel free to open a PR, I'd love to merge it.

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

No branches or pull requests

2 participants