From 4efda58de0b288179865bb64b3b7670eb48abe52 Mon Sep 17 00:00:00 2001 From: dsridhar Date: Thu, 5 Oct 2023 15:19:50 +0530 Subject: [PATCH 1/3] bugfix: added schema location property --- .../generator/gradle/plugin/tasks/GenerateTask.kt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt index 3eeb5955a74b..b57f917ff8d4 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt @@ -80,6 +80,15 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac @Input val generatorName = project.objects.property() + /** + * This is the configuration for reference paths where schemas for openapi generation are stored + * The schema target directory into which code will be generated + */ + @Optional + @InputDirectory + @PathSensitive(PathSensitivity.ABSOLUTE) + val schemaLocation = project.objects.property() + /** * The output target directory into which code will be generated. */ From 509c475f65dc397357b2c54449f45f77c7cc48ed Mon Sep 17 00:00:00 2001 From: dsridhar Date: Thu, 5 Oct 2023 15:19:50 +0530 Subject: [PATCH 2/3] fix: #16723 open api schema refresh issue --- .../generator/gradle/plugin/tasks/GenerateTask.kt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt index 3eeb5955a74b..b57f917ff8d4 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt @@ -80,6 +80,15 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac @Input val generatorName = project.objects.property() + /** + * This is the configuration for reference paths where schemas for openapi generation are stored + * The schema target directory into which code will be generated + */ + @Optional + @InputDirectory + @PathSensitive(PathSensitivity.ABSOLUTE) + val schemaLocation = project.objects.property() + /** * The output target directory into which code will be generated. */ From c6450522451887e24d4f5d1d797e4a76445108b6 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 16 Sep 2024 16:58:01 +0800 Subject: [PATCH 3/3] Update modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt Co-authored-by: David Morris --- .../openapitools/generator/gradle/plugin/tasks/GenerateTask.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt index b57f917ff8d4..28a5339c7327 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt @@ -82,7 +82,7 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac /** * This is the configuration for reference paths where schemas for openapi generation are stored - * The schema target directory into which code will be generated + * The directory which contains the additional schema files */ @Optional @InputDirectory