Open andrescevp opened 1 year ago
Just wanted to post a workaround:
Download the typescript templates
openapi-generator-cli author template -g typescript -o ./templates/typescript
Modify the template
Remove the HttpFile
import from ./templates/typescript/model/model.mustache
Use the custom templates
Use the custom templates by adding -t ./templates/typescript
to your openapi-generator-cli
command.
Bug Report Checklist
http
tools importsDescription
I am generating the TS only models, i get the models but wrong imports.
openapi-generator version
2.5.2 - Installed by yarn in WSL ubuntu 20.04 with openjdk 11.0.16 2022-07-19
OpenAPI declaration file content or url
Not relevante here
Generation Details
Only models are required.
... other imports import { HttpFile } from '../http/http';
TS_POST_PROCESS_FILE='prettier --write --config .prettierrc && eslint --fix' openapi-generator-cli generate -s -i http://0.0.0.0:8080/swagger.json --global-property models -g typescript -o ./src/@custom_types
The last import is wrong, do not exists.
Related issues/PRs
Suggest a fix