Skip to content

Commit

Permalink
[DCJ-400-gradle] Upgrade io.swagger.codegen.v3 deps 3.0.61 -> 3.0.62 (#…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
okotsopoulos authored Sep 4, 2024
1 parent 12af811 commit e956515
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}
Expand Down Expand Up @@ -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'
}
}
}
Expand Down Expand Up @@ -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"
]
}
}
Expand Down

0 comments on commit e956515

Please sign in to comment.