acacode / acacode/swagger-typescript-api
add process.exit example of generateApi in README.md
- Linguagem predominante
- TypeScript
- Estrelas
- 4.1k
- Forks
- 436
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
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);
});
```
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Avaliação
Esta issue ainda não foi avaliada.