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
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g go -i apicurio_test.yaml -o /var/tmp/apicurio_test
Related issues/PRs
This seems related to #8392 where the file upload fails
Suggest a fix
The issue is that client.decode expects a **os.File to be passed in, but the return type of the file download endpoint is already **os.File. The endpoint passes &localVarReturnValue which ends up as a ***os.File, so the file write never happens and nil is returned.
It seems like the **os.File return type of the endpoint is unnecessary, and could be reduced to just *os.File, or decode could expect a ***os.File, although a triple pointer makes me shudder just a little.
The text was updated successfully, but these errors were encountered:
Bug Report Checklist
Description
Have an OpenAPI v3 endpoint definition to download a file, when you create the client, and try to execute a download, you get a nil file pointer back.
openapi-generator version
master
OpenAPI declaration file content or url
https://gist.github.com/acranbury/0b2358548c7e45ab5cc2f857b964cd28
Generation Details
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g go -i apicurio_test.yaml -o /var/tmp/apicurio_test
Related issues/PRs
This seems related to #8392 where the file upload fails
Suggest a fix
The issue is that
client.decode
expects a**os.File
to be passed in, but the return type of the file download endpoint is already**os.File
. The endpoint passes&localVarReturnValue
which ends up as a***os.File
, so the file write never happens andnil
is returned.It seems like the
**os.File
return type of the endpoint is unnecessary, and could be reduced to just*os.File
, ordecode
could expect a***os.File
, although a triple pointer makes me shudder just a little.The text was updated successfully, but these errors were encountered: