Skip to content

Commit

Permalink
[Java][Retrofit2] deprecate RxJava 1.x (#6641)
Browse files Browse the repository at this point in the history
* deprecate rxjava1.x

* update samples
  • Loading branch information
wing328 authored Jun 13, 2020
1 parent 8fc65d0 commit a4e42e1
Show file tree
Hide file tree
Showing 195 changed files with 9 additions and 20,978 deletions.
9 changes: 0 additions & 9 deletions bin/configs/java-retrofit2rx.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion docs/generators/java.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ If false: the 'additionalProperties' implementation is compliant with the OAS an
|usePlayWS|Use Play! Async HTTP client (Play WS API)| |false|
|useReflectionEqualsHashCode|Use org.apache.commons.lang3.builder for equals and hashCode in the models. WARNING: This will fail under a security manager, unless the appropriate permissions are set up correctly and also there's potential performance impact.| |false|
|useRuntimeException|Use RuntimeException instead of Exception| |false|
|useRxJava|Whether to use the RxJava adapter with the retrofit2 library.| |false|
|useRxJava|Whether to use the RxJava adapter with the retrofit2 library. IMPORTANT: this option has been deprecated and will be removed in the 5.x release.| |false|
|useRxJava2|Whether to use the RxJava2 adapter with the retrofit2 library.| |false|
|useRxJava3|Whether to use the RxJava3 adapter with the retrofit2 library.| |false|
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public JavaClientCodegen() {

modelTestTemplateFiles.put("model_test.mustache", ".java");

cliOptions.add(CliOption.newBoolean(USE_RX_JAVA, "Whether to use the RxJava adapter with the retrofit2 library."));
cliOptions.add(CliOption.newBoolean(USE_RX_JAVA, "Whether to use the RxJava adapter with the retrofit2 library. IMPORTANT: this option has been deprecated and will be removed in the 5.x release."));
cliOptions.add(CliOption.newBoolean(USE_RX_JAVA2, "Whether to use the RxJava2 adapter with the retrofit2 library."));
cliOptions.add(CliOption.newBoolean(USE_RX_JAVA3, "Whether to use the RxJava3 adapter with the retrofit2 library."));
cliOptions.add(CliOption.newBoolean(PARCELABLE_MODEL, "Whether to generate models for Android that implement Parcelable with the okhttp-gson library."));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,11 @@ public class ApiClient {
.baseUrl(baseUrl)
{{#useRxJava}}
.addCallAdapterFactory(RxJavaCallAdapterFactory.create())
{{/useRxJava}}{{#useRxJava2}}
{{/useRxJava}}
{{#useRxJava2}}
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
{{/useRxJava2}}{{#useRxJava3}}
{{/useRxJava2}}
{{#useRxJava3}}
.addCallAdapterFactory(RxJava3CallAdapterFactory.create())
{{/useRxJava3}}
.addConverterFactory(ScalarsConverterFactory.create())
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1228,7 +1228,8 @@
<module>samples/openapi3/client/petstore/java/jersey2-java8</module>
<module>samples/client/petstore/java/okhttp-gson</module>
<module>samples/client/petstore/java/retrofit2</module>
<module>samples/client/petstore/java/retrofit2rx</module>
<module>samples/client/petstore/java/retrofit2rx2</module>
<module>samples/client/petstore/java/retrofit2rx3</module>
<module>samples/client/petstore/java/retrofit2-play25</module>
<module>samples/client/petstore/java/retrofit2-play26</module>
<module>samples/client/petstore/jaxrs-cxf-client</module>
Expand Down Expand Up @@ -1316,7 +1317,6 @@
<module>samples/client/petstore/java/jersey1</module>
<module>samples/client/petstore/java/okhttp-gson</module>
<module>samples/client/petstore/java/retrofit2</module>
<module>samples/client/petstore/java/retrofit2rx</module>
<module>samples/client/petstore/jaxrs-cxf-client</module>
<module>samples/client/petstore/java/resttemplate</module>
<module>samples/client/petstore/java/resttemplate-withXml</module>
Expand Down
21 changes: 0 additions & 21 deletions samples/client/petstore/java/retrofit2rx/.gitignore

This file was deleted.

23 changes: 0 additions & 23 deletions samples/client/petstore/java/retrofit2rx/.openapi-generator-ignore

This file was deleted.

131 changes: 0 additions & 131 deletions samples/client/petstore/java/retrofit2rx/.openapi-generator/FILES

This file was deleted.

This file was deleted.

22 changes: 0 additions & 22 deletions samples/client/petstore/java/retrofit2rx/.travis.yml

This file was deleted.

39 changes: 0 additions & 39 deletions samples/client/petstore/java/retrofit2rx/README.md

This file was deleted.

Loading

0 comments on commit a4e42e1

Please sign in to comment.