Bug Report Checklist
Description
The generator Gradle plugin seems to be broken after updating to 7.22.0.
I am using the Gradle plugin in my setup and the configuration looks like this:
openApiGenerate {
generatorName = "kotlin"
inputSpec = openApiSpecFile.map { it.asFile.path }
templateDir = "${rootDir.absolutePath}/.openapi/templates"
outputDir = layout.buildDirectory.dir("generated/openapi")
.map { it.asFile.path }
typeMappings.putAll(
mapOf(
"kotlinx.datetime.Instant" to "kotlin.time.Instant",
"number+decimal" to "Deci",
"string+timePeriod" to "TimePeriod"
)
)
importMappings.putAll(
mapOf(
"kotlinx.datetime.Instant" to "kotlin.time.Instant",
"Deci" to "org.kimplify.deci.Deci",
"TimePeriod" to "$appId.domain.model.type.TimePeriod"
)
)
packageName = "${appId}.openapi"
generateModelTests = false
generateApiTests = false
// cleanupOutput = true
configOptions = mapOf(
"dateLibrary" to "kotlinx-datetime",
// "enumPropertyNaming" to "UPPERCASE", currently bugged in Generator
"library" to "multiplatform",
"omitGradlePluginVersions" to "true",
"omitGradleWrapper" to "true",
// currently bugged, produces double serializable annotations, automatically set with "library" to "multiplatform"
// https://github.com/OpenAPITools/openapi-generator/issues/18904
// "serializationLibrary" to "kotlinx_serialization",
"sourceFolder" to "commonMain/kotlin"
)
}
The Gradle file uses the Kotlin DSL. After updating, the project Gradle sync fails because values can no longer be applied to the OpenApiGenerate configuration block. Here is the full log:
https://gist.github.com/rlnt/a9262e1b451f1bd034bf52bf6d5a03b3
openapi-generator version
7.22.0
OpenAPI declaration file content or url
/
Generation Details
Generation is invoked via the Gradle plugin by a Gradle task.
Related issues/PRs
Didn't find any.
Bug Report Checklist
Description
The generator Gradle plugin seems to be broken after updating to
7.22.0.I am using the Gradle plugin in my setup and the configuration looks like this:
openApiGenerate { generatorName = "kotlin" inputSpec = openApiSpecFile.map { it.asFile.path } templateDir = "${rootDir.absolutePath}/.openapi/templates" outputDir = layout.buildDirectory.dir("generated/openapi") .map { it.asFile.path } typeMappings.putAll( mapOf( "kotlinx.datetime.Instant" to "kotlin.time.Instant", "number+decimal" to "Deci", "string+timePeriod" to "TimePeriod" ) ) importMappings.putAll( mapOf( "kotlinx.datetime.Instant" to "kotlin.time.Instant", "Deci" to "org.kimplify.deci.Deci", "TimePeriod" to "$appId.domain.model.type.TimePeriod" ) ) packageName = "${appId}.openapi" generateModelTests = false generateApiTests = false // cleanupOutput = true configOptions = mapOf( "dateLibrary" to "kotlinx-datetime", // "enumPropertyNaming" to "UPPERCASE", currently bugged in Generator "library" to "multiplatform", "omitGradlePluginVersions" to "true", "omitGradleWrapper" to "true", // currently bugged, produces double serializable annotations, automatically set with "library" to "multiplatform" // https://github.com/OpenAPITools/openapi-generator/issues/18904 // "serializationLibrary" to "kotlinx_serialization", "sourceFolder" to "commonMain/kotlin" ) }The Gradle file uses the Kotlin DSL. After updating, the project Gradle sync fails because values can no longer be applied to the OpenApiGenerate configuration block. Here is the full log:
https://gist.github.com/rlnt/a9262e1b451f1bd034bf52bf6d5a03b3
openapi-generator version
7.22.0
OpenAPI declaration file content or url
/
Generation Details
Generation is invoked via the Gradle plugin by a Gradle task.
Related issues/PRs
Didn't find any.