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
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
The api*Api.ts code for optinal file upload has the following two flaws and does not compile:
public*Post(...,file?: File, ...)..{let reqHasFile =false;// a few lines later...reqHasFile=true;// WHY??? It should have checked and put the declaration in a if statementformParams.append("file",file);// <- TS(2769) No overload matches this call. (name: string, value: string | Blob): void, we pass a File interfaceif(!reqHasFile){headerParams['Content-Type']='application/x-www-form-urlencoded';}}
Bug Report Checklist
Description
The api*Api.ts code for optinal file upload has the following two flaws and does not compile:
openapi-generator version
openapi-generator-cli 7.14.0-SNAPSHOT
commit : 4cffd32
built : -999999999-01-01T00:00:00+18:00
source : https://github.com/openapitools/openapi-generator
docs : https://openapi-generator.tech/
Run via docker "docker run --rm -v .:/local openapitools/openapi-generator-cli"
OpenAPI declaration file content or url
https://gist.github.com/dgasparri/c5e343f3e7d225284c087ba304678e44Generation Details
docker run --rm -v .:/local openapitools/openapi-generator-cli generate -i /local/openapi-rust.current.yml -g typescript-jquery -o /local/out/typescript-jquery/ --additional-properties=importFileExtension='.js'
Steps to reproduce
The bug is in the compiled typescript+jquery code
Related issues/PRs
I searched for file, upload, label Client: typescript . I didn't find any other bug that could be related to this one.
Suggest a fix
The text was updated successfully, but these errors were encountered: