add process.exit example of generateApi in README.md
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 75/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- node.js, typescript
- Domain
- cli, documentation
Research direction
Look at the README.md file in the repository root. Find the section that documents the generateApi function. Add a code example showing how to use process.exit to ensure the program terminates after generation. Verify the example works by checking the existing generateApi usage patterns in the codebase.
Written by the indexing model from the issue text.
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);
});
- Dominant language
- TypeScript
- Stars
- 4.1k
- Forks
- 436
- Avg merge
- 9d 7h
- Merged PRs (30d)
- 3
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from acacode/swagger-typescript-api
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
acacode/swagger-typescript-api#1821 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
acacode/swagger-typescript-api#1638 · 3 comments · 10 reactions ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
acacode/swagger-typescript-api#1237 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
acacode/swagger-typescript-api#1146 · 3 comments ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
acacode/swagger-typescript-api#988 · 1 comment · 1 reaction ·
All issues in acacode/swagger-typescript-api
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
fullcalendar/fullcalendar#8106 ·