swagger-api / swagger-api/swagger-codegen
[typescript-angular] Support rxjs 6
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
The import of Observable in rxjs 6 is changed from previous versions. The typescript-angular generator should support the new version
Swagger-codegen version
3.0.2
Suggest a fix/enhancement
Taking any definition, the created services imports rxjs in this way:
import { Observable } from 'rxjs/Observable';
With rxjs 6, the correct way to import Observable is:
import { Observable } from 'rxjs';
This should be supported with a specific configuration flag, or when ngVersion is greater than 6.
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
The issue points to generated TypeScript Angular services and their Observable imports; inspect the typescript-angular generator templates and configuration handling first. Generate a client with RxJS 6 and ngVersion 6, then verify imports use rxjs while preserving the expected behavior for older versions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100