[typescript-rxjs] add rxjs 7 support#9958
[typescript-rxjs] add rxjs 7 support#9958macjohnny merged 9 commits intoOpenAPITools:masterfrom denyo:feature/rxjs-7
Conversation
|
@denyo thanks for your contribution. would there be a possibility to support RxJS 7 in a backwards compatible way? maybe introduce an option or version flag, similar to ? |
|
@denyo ping |
|
@macjohnny I won't get the chance to make it backwards compatible. |
|
@wing328 what is your opinion here? should we break the existing rxjs generator, or should we create a new rxjs7 generator? |
# Conflicts: # modules/openapi-generator/src/main/resources/typescript-rxjs/apis.mustache # modules/openapi-generator/src/main/resources/typescript-rxjs/runtime.mustache # samples/client/petstore/typescript-rxjs/builds/default/runtime.ts # samples/client/petstore/typescript-rxjs/builds/es6-target/runtime.ts # samples/client/petstore/typescript-rxjs/builds/with-npm-version/runtime.ts # samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/runtime.ts
|
Quick question: Why does this PR affect 4,359 files? Looks like some unrelated commits have been included. |
|
@TiFu I guess this is because of the changed target branch |
|
Any update on this PR ? Rxjs 7 support would be very useful |
|
@macjohnny would it possible to release this as is and let people stuck with rxjs 6 (rxjs 8 is coming) just point to an old version of the generator by themselves? |
|
Following 👀 |
|
According to https://github.com/OpenAPITools/openapi-generator#11---compatibility, we can have breaking changes only for a major release. |
|
@denyo can you rebase onto the 6.0 branch to avoid the unrelated changes? |
|
I opened a new PR fixing this one #11364 :
|
|
@macjohnny done. For everyone else waiting, this is the docker image built from this branch: denyo/openapi-generator-cli:6.0.0-test |
|
I would suggest to close this PR in favor of #11364, which we could have in 5.4, and thus avoid merge conflicts in the future. |
The only concern I have is that complexity will increase in the generator with every new version of rxjs, especially within templates, e.g. by adding a toggle or extending the flag for every version and at the same time users need to update their flags/toggles, too. From a user's perspective I would expect to get the latest version by default and have an opt-in for older versions if I really wanna be backwards compatible. At least this is what I am used to. However the philosophy of this project might be different. |
|
@denyo we can remove the rxjs<7 support for the 6.0 release, which is an easy thing to do an removes the complexity in the template |
|
since the next release will be 6.0.0, lets merge this PR |
This PR adds support for rxjs 7 (https://github.com/ReactiveX/rxjs/blob/master/CHANGELOG.md) which introduces some breaking interface changes but brings both better minification and improved performance.
Also type imports are refactored to type-only imports.
PR checklist
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*.For Windows users, please run the script in Git BASH.
master,5.3.x,6.0.x@TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @topce (2018/10) @akehir (2019/07) @petejohansonxo (2019/11) @amakhrov (2020/02)