Skip to content

Commit e8494ae

Browse files
authored
[FFM-11459] - Downgrade OpenAPI plugin to allow broader range of SpringBoot compatibility (#191)
What Downgrade the OpenAPI plugin to 4.3.1 Why Newer 5.x.x plugins are generating code that use newer okhttp APIs. This makes it difficult for customers using older versions of SpringBoot to downgrade because older okhttp versions don't offer these methods. This causes a missing method exception on startup. Testing SDK smoke tested against the following SpringBoot releases 2.2.13.RELEASE 3.14.9 14-Jan-21 2.3.12.RELEASE 3.14.9 10-Jun-21 2.4.13 3.14.9 18-Nov-21 2.5.12 3.14.9 31-Mar-22 2.5.15 3.14.9 18-May-23 2.6.15 3.14.9 18-May-23 2.7.18 4.9.3 23-Nov-23 3.0.13 4.10.0 23-Nov-23 3.1.11 4.10.0 18-Apr-23 3.2.5 4.12.0 23-Nov-23 3.3.0-RC1 4.12.0 19-Apr-24
1 parent b1517e0 commit e8494ae

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

settings.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ dependencyResolutionManagement {
3232
library('harness.ff.sdk', 'io.harness', 'ff-java-server-sdk').versionRef('sdk')
3333

3434
// plugins
35-
version('openapi.generator', '5.4.0')
35+
// do not upgrade openapi, doing so will break compatibility with customers using SpringBoot 2.5.x
36+
// (newer 5.x.x generators use APIs not present in okhttp 3.14.9)
37+
version('openapi.generator', '4.3.1')
3638
version('spotless', '6.23.3')
3739
version('depsize', '0.2.0')
3840
version('spotbugs', '6.0.4')

src/main/java/io/harness/cf/client/connector/HarnessConnector.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ ApiClient makeApiClient(int retryBackOfDelay) {
9898
private Response reauthInterceptor(Interceptor.Chain chain) throws IOException {
9999
final Request request =
100100
chain.request().newBuilder().addHeader("X-Request-ID", getRequestID()).build();
101-
log.debug("403 interceptor check: requesting url {}", request.url().url());
101+
log.debug("Checking for 403 in interceptor: requesting url {}", request.url().url());
102102

103103
Response response = chain.proceed(request);
104104

0 commit comments

Comments
 (0)