swagger-codegen icon indicating copy to clipboard operation
swagger-codegen copied to clipboard

Angular Typescript rxjs import change

Open Matze5590 opened this issue 8 years ago • 8 comments

Description

angular v6 changed an rxjs import from import { Observable } from 'rxjs/Observable'; to import { Observable } from 'rxjs';

Swagger-codegen version

2.3.1

Matze5590 avatar Sep 28 '18 10:09 Matze5590

this has already been changed with 3.0.0 and https://github.com/OpenAPITools/openapi-generator, so this issue should be closed

macjohnny avatar Oct 01 '18 08:10 macjohnny

thanks for your suggestion @macjohnny. I think it's ok implement this change for 2.X too. @Matze5590 , i'm not so familiar with angular typescript. if you can guide me about what files should be changes to get the expected output i could help to solve this.

HugoMario avatar Oct 01 '18 12:10 HugoMario

@HugoMario this actually has been implemented for 2.4-SNAPSHOT, too, see https://github.com/swagger-api/swagger-codegen/pull/8155

macjohnny avatar Oct 01 '18 12:10 macjohnny

@macjohnny thanks for the info. as it is a snapshot... how can i get it? is there a new final version yet?

Matze5590 avatar Oct 25 '18 09:10 Matze5590

You could use https://github.com/OpenAPITools/openapi-generator/blob/master/README.md#table-of-contents, which is compatible with 2.4-SNAPSHOT, since I dont know of any place to download swagger codegen 2.4-SNAPSHOT (and I also wouldnt recommend using snapshot releases)

macjohnny avatar Oct 25 '18 10:10 macjohnny

Hi there, I'm running latest v3.0.4 and still have that problem. My DefaultService class is generated with:

import { Observable } from 'rxjs/Observable';

Is that supposed to happen?

micaelboucard avatar Feb 15 '19 06:02 micaelboucard

Hi there,

I just tested the new v3.0.9 and the wrong import is still there :-(

micaelboucard avatar Jul 09 '19 01:07 micaelboucard

same here with 3.0.8 :(

JosephKastier avatar May 20 '20 06:05 JosephKastier