From e956515c2df48ff652000249d3c0265375b5b481 Mon Sep 17 00:00:00 2001 From: Olivia Kotsopoulos Date: Wed, 4 Sep 2024 15:11:44 -0400 Subject: [PATCH] [DCJ-400-gradle] Upgrade io.swagger.codegen.v3 deps 3.0.61 -> 3.0.62 (#1801) * [DCJ-400-gradle] Upgrade io.swagger.codegen.v3 deps 3.0.61 -> 3.0.62 This patch upgrade without changing configuration caused compilation of Swagger generated code to fail with the following errors: ``` /github/workspace/build/generated-src/swagger/src/main/java/bio/terra/model/ResourcePolicyModel.java:10: error: package io.swagger.configuration does not exist import io.swagger.configuration.NotUndefined; ^ /github/workspace/build/generated-src/swagger/src/main/java/bio/terra/model/ResourcePolicyModel.java:21: error: cannot find symbol @NotUndefined ^ ``` For now, setting `validationMode=legacy` but think this might be another bug in swagger-codegen-generators. * Don't include io.swagger.codegen.v3 deps in our grouped Dependabot PRs Patch upgrades have lately included breaking changes. But, we do want to keep swagger-codegen and swagger-codegen-cli versions in sync with each other, so introduce a new dependency grouping for them. --- .github/dependabot.yml | 5 +++++ build.gradle | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 1beeac2244..e35484e556 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -19,9 +19,14 @@ updates: - "*" exclude-patterns: - "com.diffplug.spotless" # likely to require reformatting of code + - "io.swagger.codegen.v3" # patch upgrades have lately included breaking changes update-types: - "minor" - "patch" + # We want Swagger codegen dep versions to stay in sync with each other, and be PRed together. + io.swagger.codegen.v3: + patterns: + - "io.swagger.codegen.v3" schedule: interval: "weekly" time: "06:00" diff --git a/build.gradle b/build.gradle index 039bf5f4a2..b6e4df7de6 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ buildscript { mavenCentral() } dependencies { - classpath('io.swagger.codegen.v3:swagger-codegen:3.0.61') + classpath('io.swagger.codegen.v3:swagger-codegen:3.0.62') // Required for gradle liquibase plugin classpath ('org.liquibase:liquibase-core:4.29.1') } @@ -66,7 +66,7 @@ allprojects { } dependencies { dependency 'io.swagger.core.v3:swagger-annotations:2.2.23' - dependency 'io.swagger.codegen.v3:swagger-codegen-cli:3.0.61' + dependency 'io.swagger.codegen.v3:swagger-codegen-cli:3.0.62' } } } @@ -316,8 +316,8 @@ swaggerSources { "useTags=true," + "dateLibrary=java8," + "jakarta=true," + - // https://github.com/swagger-api/swagger-codegen-generators/issues/1295#issuecomment-2203238201 - "useNullableForNotNull=false" + // https://github.com/swagger-api/swagger-codegen-generators/pull/1308 + "validationMode=legacy" ] } }