Skip to content

Commit ee99576

Browse files
committed
fallback for string file path in kotlin syntax
1 parent ce4ed62 commit ee99576

4 files changed

Lines changed: 11 additions & 8 deletions

File tree

modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGenerateExtension.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,8 +434,9 @@ open class OpenApiGeneratorGenerateExtension(private val project: Project) {
434434
}
435435

436436
// ========================================================================
437-
// Backwards-compatibility bridge setters for Groovy/Kotlin DSL
438-
// These allow users to continue assigning paths as standard strings.
437+
// Backwards-compatibility bridge setters for Groovy DSL
438+
// These allow Groovy users to use assignment syntax: inputSpec = "path"
439+
// For Kotlin DSL, use the extension functions below instead.
439440
// ========================================================================
440441

441442
/** Backwards-compatibility bridge for outputDir */

modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGeneratorsExtension.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ open class OpenApiGeneratorGeneratorsExtension(project: Project) {
4646
}
4747

4848
// ========================================================================
49-
// Backwards-compatibility bridge setter for Groovy/Kotlin DSL
50-
// Allows users to continue assigning lists directly via `=`
49+
// Backwards-compatibility bridge setter for Groovy DSL
50+
// This allows Groovy users to use assignment syntax: include = ...
5151
// ========================================================================
5252
fun setInclude(items: Iterable<String>) {
5353
include.set(items)

modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorMetaExtension.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ open class OpenApiGeneratorMetaExtension(private val project: Project) {
5151
}
5252

5353
// ========================================================================
54-
// Backwards-compatibility bridge setter for Groovy/Kotlin DSL
55-
// Allows users to continue assigning paths as standard strings.
54+
// Backwards-compatibility bridge setter for Groovy DSL
55+
// This allows Groovy users to use assignment syntax: outputFolder = "path"
56+
// For Kotlin DSL, use the extension function below instead.
5657
// ========================================================================
5758

5859
/** Backwards-compatibility bridge for outputFolder */

modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorValidateExtension.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ open class OpenApiGeneratorValidateExtension(private val project: Project) {
4949
val treatWarningsAsErrors: Property<Boolean> = project.objects.property<Boolean>().convention(false)
5050

5151
// ========================================================================
52-
// Backwards-compatibility bridge setters for Groovy/Kotlin DSL
53-
// These allow users to continue assigning paths as standard strings.
52+
// Backwards-compatibility bridge setter for Groovy DSL
53+
// This allows Groovy users to use assignment syntax: inputSpec = "path"
54+
// For Kotlin DSL, use the extension function below instead.
5455
// ========================================================================
5556

5657
/** Backwards-compatibility bridge for inputSpec */

0 commit comments

Comments
 (0)