swagger-api / swagger-codegen

swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.
http://swagger.io
Apache License 2.0
16.94k stars 6.03k forks source link

Retrofit2 with RxJava2 should generate Singles, not Observables #6895

Open tir38 opened 6 years ago

tir38 commented 6 years ago

Right now if i generate for Java with retrofit2 and rxjava2, the output Retrofit service class will generate methods that return Observables. See example here.

However, I think it should generate methods that return RxJava2's Single. It looks like the Java/Vert.X already does this. See example here.

cbornet commented 6 years ago

Totally agree. Can you do a PR ?

tir38 commented 6 years ago

Sorry I don't have the time to devote to that.