Swagger-codegen: [Java] Retrofit2Rx2 code generation problem

Created on 4 Apr 2017  路  5Comments  路  Source: swagger-api/swagger-codegen

Description

Hi,

I noticed the petstore sample from petstore sample still uses RxJava 1 (rx.Observable).
I also tried generating an sdk using this swagger-codegen-cli-2.2.1.jar with this config.json

{ "sourceFolder": "src", "modelPackage": "com.gatebuzz.oxford.model", "apiPackage": "com.gatebuzz.oxford.api", "library": "retrofit2", "useRxJava2": true }

but still generates the same RxJava 1(rx.Observable).

Is this a bug or is this the expected result?

How can we generate the Retrofit code with RxJava2(io.reactive.Observable)?

Swagger-codegen version

swagger-codegen-cli-2.2.1.jar

Java Retrofit Bug

All 5 comments

Can you try the latest stable version 2.2.2 instead?

I also tried the 2.2.2 jar but still experience same problem. :(
Actually the sample petstore also shows the same issue. Both rxretrofit2 and rx2retrofit have the same reference to rxjava 1.

@steven0529 ok. I'll take a look...

Fixed via https://github.com/swagger-api/swagger-codegen/pull/5321 with useRxJava2

Please pull the latest master to give it a try.

Worked, thanks!

Was this page helpful?
0 / 5 - 0 ratings