From 83adc064a475e65cd35acc85d5938043af6cf317 Mon Sep 17 00:00:00 2001 From: Toby Murray <65908556+toby-murray-snow-software@users.noreply.github.com> Date: Wed, 28 Apr 2021 04:55:12 -0400 Subject: [PATCH] Fixes #9151: Bump OkHTTP dependency to latest (#9353) In 5.0.1 the generated line in `ApiClient` was: ``` return RequestBody.create(MediaType.parse(contentType), (byte[]) obj); ``` in 5.1.0 it is: ``` return RequestBody.create((byte[]) obj, MediaType.parse(contentType)); ``` Looks like this change was introduced in #8969, and requires a more recent version of OkHttp to compile in some (all?) circumstances. --- .../Java/libraries/okhttp-gson/build.gradle.mustache | 4 ++-- .../petstore/java/okhttp-gson-dynamicOperations/build.gradle | 4 ++-- .../petstore/java/okhttp-gson-parcelableModel/build.gradle | 4 ++-- samples/client/petstore/java/okhttp-gson/build.gradle | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache index 0bd85e8b2da..7e3d97298ea 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache @@ -104,8 +104,8 @@ if(hasProperty('target') && target == 'android') { dependencies { implementation 'io.swagger:swagger-annotations:1.5.24' implementation "com.google.code.findbugs:jsr305:3.0.2" - implementation 'com.squareup.okhttp3:okhttp:3.14.7' - implementation 'com.squareup.okhttp3:logging-interceptor:3.14.7' + implementation 'com.squareup.okhttp3:okhttp:4.9.1' + implementation 'com.squareup.okhttp3:logging-interceptor:4.9.1' implementation 'com.google.code.gson:gson:2.8.6' implementation 'io.gsonfire:gson-fire:1.8.4' {{#hasOAuthMethods}} diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/build.gradle b/samples/client/petstore/java/okhttp-gson-dynamicOperations/build.gradle index f21bac4c229..9daaafc5661 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/build.gradle +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/build.gradle @@ -100,8 +100,8 @@ if(hasProperty('target') && target == 'android') { dependencies { implementation 'io.swagger:swagger-annotations:1.5.24' implementation "com.google.code.findbugs:jsr305:3.0.2" - implementation 'com.squareup.okhttp3:okhttp:3.14.7' - implementation 'com.squareup.okhttp3:logging-interceptor:3.14.7' + implementation 'com.squareup.okhttp3:okhttp:4.9.1' + implementation 'com.squareup.okhttp3:logging-interceptor:4.9.1' implementation 'com.google.code.gson:gson:2.8.6' implementation 'io.gsonfire:gson-fire:1.8.4' implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.1' diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle b/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle index f0e701eea22..5809e790fce 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle @@ -100,8 +100,8 @@ if(hasProperty('target') && target == 'android') { dependencies { implementation 'io.swagger:swagger-annotations:1.5.24' implementation "com.google.code.findbugs:jsr305:3.0.2" - implementation 'com.squareup.okhttp3:okhttp:3.14.7' - implementation 'com.squareup.okhttp3:logging-interceptor:3.14.7' + implementation 'com.squareup.okhttp3:okhttp:4.9.1' + implementation 'com.squareup.okhttp3:logging-interceptor:4.9.1' implementation 'com.google.code.gson:gson:2.8.6' implementation 'io.gsonfire:gson-fire:1.8.4' implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.1' diff --git a/samples/client/petstore/java/okhttp-gson/build.gradle b/samples/client/petstore/java/okhttp-gson/build.gradle index 8db6d52554d..3488028c466 100644 --- a/samples/client/petstore/java/okhttp-gson/build.gradle +++ b/samples/client/petstore/java/okhttp-gson/build.gradle @@ -100,8 +100,8 @@ if(hasProperty('target') && target == 'android') { dependencies { implementation 'io.swagger:swagger-annotations:1.5.24' implementation "com.google.code.findbugs:jsr305:3.0.2" - implementation 'com.squareup.okhttp3:okhttp:3.14.7' - implementation 'com.squareup.okhttp3:logging-interceptor:3.14.7' + implementation 'com.squareup.okhttp3:okhttp:4.9.1' + implementation 'com.squareup.okhttp3:logging-interceptor:4.9.1' implementation 'com.google.code.gson:gson:2.8.6' implementation 'io.gsonfire:gson-fire:1.8.4' implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.1'