forked from loafle/openapi-generator-original
Update ApiClient.mustache for retrofit2 + rxJava3 support to use official square implementation of rxJava3 adapter (#19266)
This commit is contained in:
parent
16b28118cc
commit
753502c255
@ -22,7 +22,7 @@ import retrofit2.Retrofit;
|
||||
import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory;
|
||||
{{/useRxJava2}}
|
||||
{{#useRxJava3}}
|
||||
import hu.akarnokd.rxjava3.retrofit.RxJava3CallAdapterFactory;
|
||||
import retrofit2.adapter.rxjava3.RxJava3CallAdapterFactory;
|
||||
{{/useRxJava3}}
|
||||
{{#gson}}
|
||||
import retrofit2.converter.gson.GsonConverterFactory;
|
||||
|
@ -98,7 +98,7 @@ if(hasProperty('target') && target == 'android') {
|
||||
|
||||
ext {
|
||||
oltu_version = "1.0.1"
|
||||
retrofit_version = "2.3.0"
|
||||
retrofit_version = "2.11.0"
|
||||
{{#jackson}}
|
||||
jackson_version = "2.17.1"
|
||||
jackson_databind_version = "2.17.1"
|
||||
@ -134,7 +134,7 @@ dependencies {
|
||||
implementation "io.reactivex.rxjava2:rxjava:$rx_java_version"
|
||||
{{/useRxJava2}}
|
||||
{{#useRxJava3}}
|
||||
implementation 'com.github.akarnokd:rxjava3-retrofit-adapter:3.0.0'
|
||||
implementation 'com.squareup.retrofit2:adapter-rxjava3:$$retrofit_version'
|
||||
implementation "io.reactivex.rxjava3:rxjava:$rx_java_version"
|
||||
{{/useRxJava3}}
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
|
@ -9,25 +9,25 @@ lazy val root = (project in file(".")).
|
||||
publishArtifact in (Compile, packageDoc) := false,
|
||||
resolvers += Resolver.mavenLocal,
|
||||
libraryDependencies ++= Seq(
|
||||
"com.squareup.retrofit2" % "retrofit" % "2.3.0" % "compile",
|
||||
"com.squareup.retrofit2" % "converter-scalars" % "2.3.0" % "compile",
|
||||
"com.squareup.retrofit2" % "retrofit" % "2.11.0" % "compile",
|
||||
"com.squareup.retrofit2" % "converter-scalars" % "2.11.0" % "compile",
|
||||
{{^usePlayWS}}
|
||||
"com.squareup.retrofit2" % "converter-gson" % "2.3.0" % "compile",
|
||||
"com.squareup.retrofit2" % "converter-gson" % "2.11.0" % "compile",
|
||||
{{/usePlayWS}}
|
||||
{{#usePlayWS}}
|
||||
"com.typesafe.play" % "play-ahc-ws_2.12" % "2.6.7" % "compile",
|
||||
"jakarta.validation" % "jakarta.validation-api" % "3.0.2" % "compile",
|
||||
"com.squareup.retrofit2" % "converter-jackson" % "2.3.0" % "compile",
|
||||
"com.squareup.retrofit2" % "converter-jackson" % "2.11.0" % "compile",
|
||||
"com.fasterxml.jackson.core" % "jackson-core" % "2.17.1" % "compile",
|
||||
"com.fasterxml.jackson.core" % "jackson-annotations" % "2.17.1" % "compile",
|
||||
"com.fasterxml.jackson.core" % "jackson-databind" % "2.17.1" % "compile",
|
||||
{{/usePlayWS}}
|
||||
{{#useRxJava2}}
|
||||
"com.squareup.retrofit2" % "adapter-rxjava2" % "2.3.0" % "compile",
|
||||
"com.squareup.retrofit2" % "adapter-rxjava2" % "2.11.0" % "compile",
|
||||
"io.reactivex.rxjava2" % "rxjava" % "2.1.1" % "compile",
|
||||
{{/useRxJava2}}
|
||||
{{#useRxJava3}}
|
||||
"com.github.akarnokd" % "rxjava3-retrofit-adapter" % "3.0.0" % "compile",
|
||||
"com.squareup.retrofit2" % "adapter-rxjava3" % "2.11.0" % "compile",
|
||||
"io.reactivex.rxjava3" % "rxjava" % "3.0.4" % "compile",
|
||||
{{/useRxJava3}}
|
||||
"io.swagger" % "swagger-annotations" % "1.5.21" % "compile",
|
||||
|
@ -278,9 +278,9 @@
|
||||
<version>${rxjava-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.akarnokd</groupId>
|
||||
<artifactId>rxjava3-retrofit-adapter</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<groupId>com.squareup.retrofit2</groupId>
|
||||
<artifactId>adapter-rxjava3</artifactId>
|
||||
<version>${retrofit-version}</version>
|
||||
</dependency>
|
||||
{{/useRxJava3}}
|
||||
{{#jackson}}
|
||||
@ -393,7 +393,7 @@
|
||||
{{#usePlayWS}}
|
||||
<play-version>2.6.7</play-version>
|
||||
{{/usePlayWS}}
|
||||
<retrofit-version>2.5.0</retrofit-version>
|
||||
<retrofit-version>2.11.0</retrofit-version>
|
||||
{{#useRxJava2}}
|
||||
<rxjava-version>2.1.1</rxjava-version>
|
||||
{{/useRxJava2}}
|
||||
|
@ -98,7 +98,7 @@ if(hasProperty('target') && target == 'android') {
|
||||
|
||||
ext {
|
||||
oltu_version = "1.0.1"
|
||||
retrofit_version = "2.3.0"
|
||||
retrofit_version = "2.11.0"
|
||||
jackson_version = "2.17.1"
|
||||
jackson_databind_version = "2.17.1"
|
||||
javax_ws_rs_api_version = "2.1.1"
|
||||
|
@ -9,11 +9,11 @@ lazy val root = (project in file(".")).
|
||||
publishArtifact in (Compile, packageDoc) := false,
|
||||
resolvers += Resolver.mavenLocal,
|
||||
libraryDependencies ++= Seq(
|
||||
"com.squareup.retrofit2" % "retrofit" % "2.3.0" % "compile",
|
||||
"com.squareup.retrofit2" % "converter-scalars" % "2.3.0" % "compile",
|
||||
"com.squareup.retrofit2" % "retrofit" % "2.11.0" % "compile",
|
||||
"com.squareup.retrofit2" % "converter-scalars" % "2.11.0" % "compile",
|
||||
"com.typesafe.play" % "play-ahc-ws_2.12" % "2.6.7" % "compile",
|
||||
"jakarta.validation" % "jakarta.validation-api" % "3.0.2" % "compile",
|
||||
"com.squareup.retrofit2" % "converter-jackson" % "2.3.0" % "compile",
|
||||
"com.squareup.retrofit2" % "converter-jackson" % "2.11.0" % "compile",
|
||||
"com.fasterxml.jackson.core" % "jackson-core" % "2.17.1" % "compile",
|
||||
"com.fasterxml.jackson.core" % "jackson-annotations" % "2.17.1" % "compile",
|
||||
"com.fasterxml.jackson.core" % "jackson-databind" % "2.17.1" % "compile",
|
||||
|
@ -307,7 +307,7 @@
|
||||
<jackson-databind-nullable-version>0.2.6</jackson-databind-nullable-version>
|
||||
<javax.ws.rs-api-version>2.1.1</javax.ws.rs-api-version>
|
||||
<play-version>2.6.7</play-version>
|
||||
<retrofit-version>2.5.0</retrofit-version>
|
||||
<retrofit-version>2.11.0</retrofit-version>
|
||||
<jakarta-annotation-version>2.1.1</jakarta-annotation-version>
|
||||
<beanvalidation-version>3.0.2</beanvalidation-version>
|
||||
<oltu-version>1.0.1</oltu-version>
|
||||
|
@ -98,7 +98,7 @@ if(hasProperty('target') && target == 'android') {
|
||||
|
||||
ext {
|
||||
oltu_version = "1.0.1"
|
||||
retrofit_version = "2.3.0"
|
||||
retrofit_version = "2.11.0"
|
||||
jakarta_annotation_version = "1.3.5"
|
||||
swagger_annotations_version = "1.5.22"
|
||||
junit_version = "5.10.3"
|
||||
|
@ -9,9 +9,9 @@ lazy val root = (project in file(".")).
|
||||
publishArtifact in (Compile, packageDoc) := false,
|
||||
resolvers += Resolver.mavenLocal,
|
||||
libraryDependencies ++= Seq(
|
||||
"com.squareup.retrofit2" % "retrofit" % "2.3.0" % "compile",
|
||||
"com.squareup.retrofit2" % "converter-scalars" % "2.3.0" % "compile",
|
||||
"com.squareup.retrofit2" % "converter-gson" % "2.3.0" % "compile",
|
||||
"com.squareup.retrofit2" % "retrofit" % "2.11.0" % "compile",
|
||||
"com.squareup.retrofit2" % "converter-scalars" % "2.11.0" % "compile",
|
||||
"com.squareup.retrofit2" % "converter-gson" % "2.11.0" % "compile",
|
||||
"io.swagger" % "swagger-annotations" % "1.5.21" % "compile",
|
||||
"org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile",
|
||||
"io.gsonfire" % "gson-fire" % "1.9.0" % "compile",
|
||||
|
@ -262,7 +262,7 @@
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<gson-fire-version>1.9.0</gson-fire-version>
|
||||
<swagger-annotations-version>1.6.3</swagger-annotations-version>
|
||||
<retrofit-version>2.5.0</retrofit-version>
|
||||
<retrofit-version>2.11.0</retrofit-version>
|
||||
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
|
||||
<oltu-version>1.0.1</oltu-version>
|
||||
<junit-version>5.10.3</junit-version>
|
||||
|
@ -98,7 +98,7 @@ if(hasProperty('target') && target == 'android') {
|
||||
|
||||
ext {
|
||||
oltu_version = "1.0.1"
|
||||
retrofit_version = "2.3.0"
|
||||
retrofit_version = "2.11.0"
|
||||
jakarta_annotation_version = "1.3.5"
|
||||
swagger_annotations_version = "1.5.22"
|
||||
junit_version = "5.10.3"
|
||||
|
@ -9,10 +9,10 @@ lazy val root = (project in file(".")).
|
||||
publishArtifact in (Compile, packageDoc) := false,
|
||||
resolvers += Resolver.mavenLocal,
|
||||
libraryDependencies ++= Seq(
|
||||
"com.squareup.retrofit2" % "retrofit" % "2.3.0" % "compile",
|
||||
"com.squareup.retrofit2" % "converter-scalars" % "2.3.0" % "compile",
|
||||
"com.squareup.retrofit2" % "converter-gson" % "2.3.0" % "compile",
|
||||
"com.squareup.retrofit2" % "adapter-rxjava2" % "2.3.0" % "compile",
|
||||
"com.squareup.retrofit2" % "retrofit" % "2.11.0" % "compile",
|
||||
"com.squareup.retrofit2" % "converter-scalars" % "2.11.0" % "compile",
|
||||
"com.squareup.retrofit2" % "converter-gson" % "2.11.0" % "compile",
|
||||
"com.squareup.retrofit2" % "adapter-rxjava2" % "2.11.0" % "compile",
|
||||
"io.reactivex.rxjava2" % "rxjava" % "2.1.1" % "compile",
|
||||
"io.swagger" % "swagger-annotations" % "1.5.21" % "compile",
|
||||
"org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile",
|
||||
|
@ -272,7 +272,7 @@
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<gson-fire-version>1.9.0</gson-fire-version>
|
||||
<swagger-annotations-version>1.6.3</swagger-annotations-version>
|
||||
<retrofit-version>2.5.0</retrofit-version>
|
||||
<retrofit-version>2.11.0</retrofit-version>
|
||||
<rxjava-version>2.1.1</rxjava-version>
|
||||
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
|
||||
<oltu-version>1.0.1</oltu-version>
|
||||
|
@ -98,7 +98,7 @@ if(hasProperty('target') && target == 'android') {
|
||||
|
||||
ext {
|
||||
oltu_version = "1.0.1"
|
||||
retrofit_version = "2.3.0"
|
||||
retrofit_version = "2.11.0"
|
||||
jakarta_annotation_version = "1.3.5"
|
||||
swagger_annotations_version = "1.5.22"
|
||||
junit_version = "5.10.3"
|
||||
@ -110,7 +110,7 @@ dependencies {
|
||||
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
|
||||
implementation "com.squareup.retrofit2:converter-scalars:$retrofit_version"
|
||||
implementation "com.squareup.retrofit2:converter-gson:$retrofit_version"
|
||||
implementation 'com.github.akarnokd:rxjava3-retrofit-adapter:3.0.0'
|
||||
implementation 'com.squareup.retrofit2:adapter-rxjava3:$$retrofit_version'
|
||||
implementation "io.reactivex.rxjava3:rxjava:$rx_java_version"
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
|
@ -9,10 +9,10 @@ lazy val root = (project in file(".")).
|
||||
publishArtifact in (Compile, packageDoc) := false,
|
||||
resolvers += Resolver.mavenLocal,
|
||||
libraryDependencies ++= Seq(
|
||||
"com.squareup.retrofit2" % "retrofit" % "2.3.0" % "compile",
|
||||
"com.squareup.retrofit2" % "converter-scalars" % "2.3.0" % "compile",
|
||||
"com.squareup.retrofit2" % "converter-gson" % "2.3.0" % "compile",
|
||||
"com.github.akarnokd" % "rxjava3-retrofit-adapter" % "3.0.0" % "compile",
|
||||
"com.squareup.retrofit2" % "retrofit" % "2.11.0" % "compile",
|
||||
"com.squareup.retrofit2" % "converter-scalars" % "2.11.0" % "compile",
|
||||
"com.squareup.retrofit2" % "converter-gson" % "2.11.0" % "compile",
|
||||
"com.squareup.retrofit2" % "adapter-rxjava3" % "2.11.0" % "compile",
|
||||
"io.reactivex.rxjava3" % "rxjava" % "3.0.4" % "compile",
|
||||
"io.swagger" % "swagger-annotations" % "1.5.21" % "compile",
|
||||
"org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile",
|
||||
|
@ -247,9 +247,9 @@
|
||||
<version>${rxjava-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.akarnokd</groupId>
|
||||
<artifactId>rxjava3-retrofit-adapter</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<groupId>com.squareup.retrofit2</groupId>
|
||||
<artifactId>adapter-rxjava3</artifactId>
|
||||
<version>${retrofit-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.annotation</groupId>
|
||||
@ -272,7 +272,7 @@
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<gson-fire-version>1.9.0</gson-fire-version>
|
||||
<swagger-annotations-version>1.6.3</swagger-annotations-version>
|
||||
<retrofit-version>2.5.0</retrofit-version>
|
||||
<retrofit-version>2.11.0</retrofit-version>
|
||||
<rxjava-version>3.0.4</rxjava-version>
|
||||
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
|
||||
<oltu-version>1.0.1</oltu-version>
|
||||
|
@ -11,7 +11,7 @@ import org.apache.oltu.oauth2.client.request.OAuthClientRequest.AuthenticationRe
|
||||
import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder;
|
||||
import retrofit2.Converter;
|
||||
import retrofit2.Retrofit;
|
||||
import hu.akarnokd.rxjava3.retrofit.RxJava3CallAdapterFactory;
|
||||
import retrofit2.adapter.rxjava3.RxJava3CallAdapterFactory;
|
||||
import retrofit2.converter.gson.GsonConverterFactory;
|
||||
import retrofit2.converter.scalars.ScalarsConverterFactory;
|
||||
import org.openapitools.client.auth.HttpBasicAuth;
|
||||
|
Loading…
x
Reference in New Issue
Block a user