swagger-api / swagger-api/swagger-codegen
[typescript-fetch] HTTP 204 - Client leave exception
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Hello !
If I have time, I would propose PR, otherwise someone will do it (I hope ❤)
Describe the bug
In the case of a REST call that returns a 204 (No-Content)
The client leave exception here :
Expected behavior
The client must be return promise with null response
Contributor guide
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.
Research direction
Start in modules/swagger-codegen/src/main/resources/typescript-fetch/api.mustache at the referenced lines around 269-270, and inspect how a 204 response is handled. Done means a generated TypeScript Fetch client returns a promise resolving to null for a 204 response instead of throwing an exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100