openapi-react-query-codegen
openapi-react-query-codegen copied to clipboard
Binary response from axios client returned as string instead of Blob
Describe the bug
When generating a (axios) client for an endpoint with a binary response type (i.e content-type=application/octet-stream), the generated response type is Blob:
export type GetSomethingResponse = (Blob | File);
However, at runtime, the query result.data type is a string.
Expected behavior The query should return a Blob or File value as expected for binary responses.
Version: 1.6.2
Additional context
It looks like this issue has been fixed in @hey-api/openapi-ts v0.59.2 https://github.com/hey-api/openapi-ts/pull/1420 . Would it be possible to bump the dependency to that version, or is there a workaround for that situation?