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
When a client that returns byte[] (FileParameter) as a response is created and called, FileParameter is interpreted as Json and decoded, resulting in an exception.
openapi-generator version
5.2.1.
Related issues/PRs
I'm sorry if this has already been pointed out.
Suggest a fix/enhancement
In the next conditional branch, it looks like the fact that FileParameter is passed is not taken into account.
Any reason this has been closed? We ran into the same issue today. FileParameter is used correctly as class for responses that contain binary files, but when the API call is performed, the code still tries to deserialize it as JSON.
Description
When a client that returns byte[] (FileParameter) as a response is created and called, FileParameter is interpreted as Json and decoded, resulting in an exception.
openapi-generator version
5.2.1.
Related issues/PRs
I'm sorry if this has already been pointed out.
Suggest a fix/enhancement
In the next conditional branch, it looks like the fact that FileParameter is passed is not taken into account.
https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/ApiClient.mustache#L99-L147
For now, by adding the following code, I was able to get the byte[] without any error.
The text was updated successfully, but these errors were encountered: