acacode / acacode/swagger-typescript-api
add process.exit example of generateApi in README.md
- 主要语言
- TypeScript
- 星标
- 4.1k
- 派生
- 436
- PR 合并指标
- 30 天内没有已合并 PR
描述
Hi, thanks for this project, it makes life simpler.
But I hava a small recommendation that, it will be useful to add `process.exit` example of generateApi in README.md.
Since I would like to make a watch dog cli to detect changes of swagger.json and auto generate client.ts when swagger.json changes.
I found out that my program can not exit in expected.
And I found some similar case in https://github.com/acacode/swagger-typescript-api/pull/436
After adding `process.exit`, the hanging situation is resolved.
So my code finally looks like this.
```
generateApi(myConfig)
.catch((error) => {
console.error(error);
process.exit(1);
})
.finally(() => {
process.exit(0);
});
```
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。