Fix swagger codegen typings
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 137
- Forks
- 85
- PR merge metrics
- No merged PRs in 30d
Description
It seems the typescript-axios plugin does not generate correct typings, all the models have any type. The typescript-fetch plugin works as expected but is not immediately compatible with node without a "polyfill".
This get more important as we start to have more "custom" models. For example, the TaskProgress model is based off of rmf's TaskSummary message, with an additional field to indicate the current progress. These "custom" models are not reflected in rmf-models and must be imported from api-client. In the future, dashboard and react-component might not use rmf-models directly anymore, all model definitions will come from api-client.
We can either switch to typescript-fetch or attempt to fix typescript-axios upstream. Note that swagger codegen is a java project so that requires a different set of expertise.
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
Inspect the generated models from the swagger codegen typescript-axios plugin and compare them with typescript-fetch output, focusing on the TaskProgress and TaskSummary examples. Determine whether switching plugins or addressing the typescript-axios generation issue is appropriate; done means custom models receive correct TypeScript typings while remaining usable in Node without an incompatible polyfill.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100