[BUG] Gradle Plugin - configOptions unclear / inconsistent
Created by: black-snow
Bug Report Checklist
x
Couldn't find a repo for the gradle plugin so I'm posting this here.
Description
The gradle plugin offers some configuration option. But it's not clear what has to go where. The docs have an example:
openApiGenerate {
generatorName = "kotlin"
inputSpec = "$rootDir/specs/petstore-v3.0.yaml".toString()
outputDir = "$buildDir/generated".toString()
apiPackage = "org.openapi.example.api"
invokerPackage = "org.openapi.example.invoker"
modelPackage = "org.openapi.example.model"
modelFilesConstrainedTo = [
"Error"
]
configOptions = [
dateLibrary: "java8"
]
}
Why is dateLibrary nested inside configOptions or regardingly, why isn't e.g. invokerPackage within configOptions, too? Both are listed in the same table [1] [2] captioned "config options". So I'd expect all those settings to live within configOptions or none.
openapi-generator version
4.x & 5.0.0-beta2
Suggest a fix
I didn't take a look at the other generators. Maybe I'm just blind and it's stated somewhere.
My first shot to fix this would be to unnest configOptions so that above example becomes:
openApiGenerate {
generatorName = "kotlin"
inputSpec = "$rootDir/specs/petstore-v3.0.yaml".toString()
outputDir = "$buildDir/generated".toString()
apiPackage = "org.openapi.example.api"
invokerPackage = "org.openapi.example.invoker"
modelPackage = "org.openapi.example.model"
modelFilesConstrainedTo = [
"Error"
]
dateLibrary = "java8"
}