hey-api / openapi-ts

✨ Turn your OpenAPI specification into a beautiful TypeScript client
https://heyapi.vercel.app
Other
969 stars 77 forks source link

How Image Serve is handled from the backend? #801

Closed sagardwivedi closed 3 weeks ago

sagardwivedi commented 1 month ago

Description

I wrote an api to get profile image and i generated the client

image

image

I am fetching the image but it is not showing when i create URL.createobjecturl() it is showing undefined or empty

image

image

image

image

Reproducible example or configuration

No response

OpenAPI specification (optional)

import { defineConfig } from "@hey-api/openapi-ts";

export default defineConfig({ client: { name:"@hey-api/client-fetch", bundle: true }, input: "./openapi.json", output: { path: "./src/client", format: "biome", lint: "biome", },

});

System information (optional)

No response

mrlubos commented 1 month ago

Hey @sagardwivedi, can you please add a relevant portion of the OpenAPI specification?

sagardwivedi commented 1 month ago

image

mrlubos commented 1 month ago

@sagardwivedi I think you'll want to modify your response type. Otherwise, you're getting JSON as specified and I am not sure what the issue is there. I'd need to see a running example to help further