Skip to content

Commit 753502c

Browse files
Update ApiClient.mustache for retrofit2 + rxJava3 support to use official square implementation of rxJava3 adapter (#19266)
1 parent 16b2811 commit 753502c

File tree

17 files changed

+40
-40
lines changed

17 files changed

+40
-40
lines changed

modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import retrofit2.Retrofit;
2222
import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory;
2323
{{/useRxJava2}}
2424
{{#useRxJava3}}
25-
import hu.akarnokd.rxjava3.retrofit.RxJava3CallAdapterFactory;
25+
import retrofit2.adapter.rxjava3.RxJava3CallAdapterFactory;
2626
{{/useRxJava3}}
2727
{{#gson}}
2828
import retrofit2.converter.gson.GsonConverterFactory;

modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ if(hasProperty('target') && target == 'android') {
9898

9999
ext {
100100
oltu_version = "1.0.1"
101-
retrofit_version = "2.3.0"
101+
retrofit_version = "2.11.0"
102102
{{#jackson}}
103103
jackson_version = "2.17.1"
104104
jackson_databind_version = "2.17.1"
@@ -134,7 +134,7 @@ dependencies {
134134
implementation "io.reactivex.rxjava2:rxjava:$rx_java_version"
135135
{{/useRxJava2}}
136136
{{#useRxJava3}}
137-
implementation 'com.github.akarnokd:rxjava3-retrofit-adapter:3.0.0'
137+
implementation 'com.squareup.retrofit2:adapter-rxjava3:$$retrofit_version'
138138
implementation "io.reactivex.rxjava3:rxjava:$rx_java_version"
139139
{{/useRxJava3}}
140140
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"

modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.sbt.mustache

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,25 @@ lazy val root = (project in file(".")).
99
publishArtifact in (Compile, packageDoc) := false,
1010
resolvers += Resolver.mavenLocal,
1111
libraryDependencies ++= Seq(
12-
"com.squareup.retrofit2" % "retrofit" % "2.3.0" % "compile",
13-
"com.squareup.retrofit2" % "converter-scalars" % "2.3.0" % "compile",
12+
"com.squareup.retrofit2" % "retrofit" % "2.11.0" % "compile",
13+
"com.squareup.retrofit2" % "converter-scalars" % "2.11.0" % "compile",
1414
{{^usePlayWS}}
15-
"com.squareup.retrofit2" % "converter-gson" % "2.3.0" % "compile",
15+
"com.squareup.retrofit2" % "converter-gson" % "2.11.0" % "compile",
1616
{{/usePlayWS}}
1717
{{#usePlayWS}}
1818
"com.typesafe.play" % "play-ahc-ws_2.12" % "2.6.7" % "compile",
1919
"jakarta.validation" % "jakarta.validation-api" % "3.0.2" % "compile",
20-
"com.squareup.retrofit2" % "converter-jackson" % "2.3.0" % "compile",
20+
"com.squareup.retrofit2" % "converter-jackson" % "2.11.0" % "compile",
2121
"com.fasterxml.jackson.core" % "jackson-core" % "2.17.1" % "compile",
2222
"com.fasterxml.jackson.core" % "jackson-annotations" % "2.17.1" % "compile",
2323
"com.fasterxml.jackson.core" % "jackson-databind" % "2.17.1" % "compile",
2424
{{/usePlayWS}}
2525
{{#useRxJava2}}
26-
"com.squareup.retrofit2" % "adapter-rxjava2" % "2.3.0" % "compile",
26+
"com.squareup.retrofit2" % "adapter-rxjava2" % "2.11.0" % "compile",
2727
"io.reactivex.rxjava2" % "rxjava" % "2.1.1" % "compile",
2828
{{/useRxJava2}}
2929
{{#useRxJava3}}
30-
"com.github.akarnokd" % "rxjava3-retrofit-adapter" % "3.0.0" % "compile",
30+
"com.squareup.retrofit2" % "adapter-rxjava3" % "2.11.0" % "compile",
3131
"io.reactivex.rxjava3" % "rxjava" % "3.0.4" % "compile",
3232
{{/useRxJava3}}
3333
"io.swagger" % "swagger-annotations" % "1.5.21" % "compile",

modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/pom.mustache

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,9 @@
278278
<version>${rxjava-version}</version>
279279
</dependency>
280280
<dependency>
281-
<groupId>com.github.akarnokd</groupId>
282-
<artifactId>rxjava3-retrofit-adapter</artifactId>
283-
<version>3.0.0</version>
281+
<groupId>com.squareup.retrofit2</groupId>
282+
<artifactId>adapter-rxjava3</artifactId>
283+
<version>${retrofit-version}</version>
284284
</dependency>
285285
{{/useRxJava3}}
286286
{{#jackson}}
@@ -393,7 +393,7 @@
393393
{{#usePlayWS}}
394394
<play-version>2.6.7</play-version>
395395
{{/usePlayWS}}
396-
<retrofit-version>2.5.0</retrofit-version>
396+
<retrofit-version>2.11.0</retrofit-version>
397397
{{#useRxJava2}}
398398
<rxjava-version>2.1.1</rxjava-version>
399399
{{/useRxJava2}}

samples/client/petstore/java/retrofit2-play26/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ if(hasProperty('target') && target == 'android') {
9898

9999
ext {
100100
oltu_version = "1.0.1"
101-
retrofit_version = "2.3.0"
101+
retrofit_version = "2.11.0"
102102
jackson_version = "2.17.1"
103103
jackson_databind_version = "2.17.1"
104104
javax_ws_rs_api_version = "2.1.1"

samples/client/petstore/java/retrofit2-play26/build.sbt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ lazy val root = (project in file(".")).
99
publishArtifact in (Compile, packageDoc) := false,
1010
resolvers += Resolver.mavenLocal,
1111
libraryDependencies ++= Seq(
12-
"com.squareup.retrofit2" % "retrofit" % "2.3.0" % "compile",
13-
"com.squareup.retrofit2" % "converter-scalars" % "2.3.0" % "compile",
12+
"com.squareup.retrofit2" % "retrofit" % "2.11.0" % "compile",
13+
"com.squareup.retrofit2" % "converter-scalars" % "2.11.0" % "compile",
1414
"com.typesafe.play" % "play-ahc-ws_2.12" % "2.6.7" % "compile",
1515
"jakarta.validation" % "jakarta.validation-api" % "3.0.2" % "compile",
16-
"com.squareup.retrofit2" % "converter-jackson" % "2.3.0" % "compile",
16+
"com.squareup.retrofit2" % "converter-jackson" % "2.11.0" % "compile",
1717
"com.fasterxml.jackson.core" % "jackson-core" % "2.17.1" % "compile",
1818
"com.fasterxml.jackson.core" % "jackson-annotations" % "2.17.1" % "compile",
1919
"com.fasterxml.jackson.core" % "jackson-databind" % "2.17.1" % "compile",

samples/client/petstore/java/retrofit2-play26/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@
307307
<jackson-databind-nullable-version>0.2.6</jackson-databind-nullable-version>
308308
<javax.ws.rs-api-version>2.1.1</javax.ws.rs-api-version>
309309
<play-version>2.6.7</play-version>
310-
<retrofit-version>2.5.0</retrofit-version>
310+
<retrofit-version>2.11.0</retrofit-version>
311311
<jakarta-annotation-version>2.1.1</jakarta-annotation-version>
312312
<beanvalidation-version>3.0.2</beanvalidation-version>
313313
<oltu-version>1.0.1</oltu-version>

samples/client/petstore/java/retrofit2/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ if(hasProperty('target') && target == 'android') {
9898

9999
ext {
100100
oltu_version = "1.0.1"
101-
retrofit_version = "2.3.0"
101+
retrofit_version = "2.11.0"
102102
jakarta_annotation_version = "1.3.5"
103103
swagger_annotations_version = "1.5.22"
104104
junit_version = "5.10.3"

samples/client/petstore/java/retrofit2/build.sbt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ lazy val root = (project in file(".")).
99
publishArtifact in (Compile, packageDoc) := false,
1010
resolvers += Resolver.mavenLocal,
1111
libraryDependencies ++= Seq(
12-
"com.squareup.retrofit2" % "retrofit" % "2.3.0" % "compile",
13-
"com.squareup.retrofit2" % "converter-scalars" % "2.3.0" % "compile",
14-
"com.squareup.retrofit2" % "converter-gson" % "2.3.0" % "compile",
12+
"com.squareup.retrofit2" % "retrofit" % "2.11.0" % "compile",
13+
"com.squareup.retrofit2" % "converter-scalars" % "2.11.0" % "compile",
14+
"com.squareup.retrofit2" % "converter-gson" % "2.11.0" % "compile",
1515
"io.swagger" % "swagger-annotations" % "1.5.21" % "compile",
1616
"org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile",
1717
"io.gsonfire" % "gson-fire" % "1.9.0" % "compile",

samples/client/petstore/java/retrofit2/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@
262262
<maven.compiler.target>${java.version}</maven.compiler.target>
263263
<gson-fire-version>1.9.0</gson-fire-version>
264264
<swagger-annotations-version>1.6.3</swagger-annotations-version>
265-
<retrofit-version>2.5.0</retrofit-version>
265+
<retrofit-version>2.11.0</retrofit-version>
266266
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
267267
<oltu-version>1.0.1</oltu-version>
268268
<junit-version>5.10.3</junit-version>

0 commit comments

Comments
 (0)