acacode / acacode/swagger-typescript-api
add process.exit example of generateApi in README.md
- Dominant language
- TypeScript
- Stars
- 4.1k
- Forks
- 436
- PR merge metrics
- No merged PRs in 30d
Description
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);
});
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.