Skip to content

Commit 4d77c62

Browse files
Upgrade openapi plugin version from 7.7 to 7.11.
In version 7.7 generating documentation via the openApi gradle task results in the following misleading warning: "More than one inline schema specified in allOf:. Only the first one is recognized. All others are ignored." See comments on this [PR](OpenAPITools/openapi-generator#19646). In later versions of the plugin - and rather than fixing the issue - the severity of the warning has been reduced from [WARN to DEBUG](https://github.com/OpenAPITools/openapi-generator/pull/19646/files). Also set removeEnumValuePrefix = true since this is a new additional property added to more recent versions which removes the prefix for enum definitions. Previously in version 7.7 prefixes were removed automatically and the property didn't exist. Since it [defaults to false](OpenAPITools/openapi-generator#20452), we need to set it to true. Unfortunately this property isn't documented in the [README](OpenAPITools/openapi-generator#20452).
1 parent d7c4e49 commit 4d77c62

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

build.gradle.kts

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import org.apache.commons.io.FileUtils
33
plugins {
44
id("uk.gov.justice.hmpps.gradle-spring-boot") version "6.1.0"
55
kotlin("plugin.spring") version "2.0.20"
6-
id("org.openapi.generator") version "7.7.0"
6+
id("org.openapi.generator") version "7.11.0"
77
id("org.jetbrains.kotlin.plugin.jpa") version "1.9.22"
88
id("io.gatling.gradle") version "3.13.1"
99
id("io.gitlab.arturbosch.detekt") version "1.23.7"
@@ -239,6 +239,7 @@ openApiGenerate {
239239
typeMappings.put("DateTime", "Instant")
240240
importMappings.put("Instant", "java.time.Instant")
241241
templateDir.set("$rootDir/openapi")
242+
additionalProperties.put("removeEnumValuePrefix", "true")
242243
}
243244

244245
registerAdditionalOpenApiGenerateTask(

0 commit comments

Comments
 (0)