You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It will as shown above select the fetchJson function as the wrapper. and that wrapper has poor handling if a Blob is ever returned.
This seems like a systematic bug, where the fetch-wrapper selected tests for JSON compatibility in any of the content-types for any of the response objects defined for an endpoint.
The bug manifests in https://github.com/oazapfts/oazapfts/blob/main/src/codegen/generate.ts#L689, where it selects the response type.
Ideally, the generated code should be wrapped with code that can handle all defined content types, and not default to the JSON compatible one as long as any response is JSON compatible.
The text was updated successfully, but these errors were encountered:
Given the api spec at https://gist.github.com/ehvattum/e7fdc53bda8a3d03556c0c649cdef7c9,
Oazapftz will generate an api client that looks like:
It will as shown above select the
fetchJson
function as the wrapper. and that wrapper has poor handling if a Blob is ever returned.This seems like a systematic bug, where the fetch-wrapper selected tests for JSON compatibility in any of the content-types for any of the response objects defined for an endpoint.
The bug manifests in https://github.com/oazapfts/oazapfts/blob/main/src/codegen/generate.ts#L689, where it selects the response type.
Ideally, the generated code should be wrapped with code that can handle all defined content types, and not default to the JSON compatible one as long as any response is JSON compatible.
The text was updated successfully, but these errors were encountered: