forked from loafle/openapi-generator-original
Add input flag for Gradle openApiGenerate task (#5966)
This commit is contained in:
parent
e8f486ba7f
commit
0e276bef19
@ -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
|
||||
@ -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
|
||||
*/
|
||||
@ -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.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user