Closed mdibaiee closed 3 years ago
yes, that doesn't look very intuitive.
Thanks for reporting and the praise :-)
just released 2021.3, you can now do this
// build.gradle.kts
openapiProcessor {
apiPath("${projectDir}/src/api/openapi.yaml")
process("spring") {
processor("io.openapiprocessor:openapi-processor-spring:<version>")
targetDir("${projectDir}/build/openapi")
prop("mapping", "${projectDir}/src/api/mapping.yaml")
}
process("json") {
processor("io.openapiprocessor:openapi-processor-json:<version>")
targetDir("${buildDir}/json")
}
}
.. unfortunately this does NOT seem to work (the integration test fails) with gradle older than 6.5. Which is strange because I can use the new methods in a groovy dsl and versions older than 6.5.
Thank you @hauner !
Hello!
While trying to integrate your project (it's wonderful by the way! great job!), we realised that it's not easy to integrate it with a Kotlin gradle DSL.
In order to add a processor, I had to do this:
Apparently the
methodMissing
method that you have does not work properly in Kotlin DSL, and using aspring { processor }
does not work unfortunately.