Skip to content

Commit

Permalink
Add input flag for Gradle openApiGenerate task (#5966)
Browse files Browse the repository at this point in the history
  • Loading branch information
kierans authored Apr 25, 2020
1 parent e8f486b commit 0e276be
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import org.gradle.api.GradleException
import org.gradle.api.provider.Property
import org.gradle.api.tasks.Internal
import org.gradle.api.tasks.TaskAction
import org.gradle.api.tasks.options.Option
import org.gradle.internal.logging.text.StyledTextOutput
import org.gradle.internal.logging.text.StyledTextOutputFactory
import org.gradle.kotlin.dsl.listProperty
Expand All @@ -37,7 +38,7 @@ import org.openapitools.codegen.config.GlobalSettings
*
* Example (CLI):
*
* ./gradlew -q openApiGenerate
* ./gradlew -q openApiGenerate --input=/path/to/file
*
* @author Jim Schubert
*/
Expand Down Expand Up @@ -68,6 +69,14 @@ open class GenerateTask : DefaultTask() {
@get:Internal
val outputDir = project.objects.property<String>()

@Suppress("unused")
@get:Internal
@set:Option(option = "input", description = "The input specification.")
var input: String? = null
set(value) {
inputSpec.set(value)
}

/**
* The Open API 2.0/3.x specification location.
*/
Expand Down

0 comments on commit 0e276be

Please sign in to comment.