swagger-api / swagger-api/swagger-codegen

[typescript-angular] Support rxjs 6

Open
#8,856 4 comments 10 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.