swagger-api / swagger-api/swagger-codegen
[Typescript-Fetch] Support for default params
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
Typescript-Fetch does not currently generate any code to help with default parameters in methods, but Typescript and ES6 have support for default parameters.
Implementing default parameters can help improve the usability of generated specs.
Swagger-codegen version
2.2.1
Swagger declaration file content or url
Command line used for generation
Steps to reproduce
Related issues
Suggest a Fix
It appears that the defaultValue helper exists to help solve this problem.
{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}
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 with the Typescript-Fetch generator templates and inspect how the mentioned defaultValue helper is currently used. Update the generation path so generated method parameters support TypeScript/ES6 default values, then verify the generated output includes the expected default-parameter behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100