Skip to content

Instantly share code, notes, and snippets.

@renaudmathieu
Created June 14, 2021 10:33
Show Gist options
  • Save renaudmathieu/8266514307011b6ab5e9351160c738c2 to your computer and use it in GitHub Desktop.
Save renaudmathieu/8266514307011b6ab5e9351160c738c2 to your computer and use it in GitHub Desktop.
openapi-code-generator
plugins {
id("org.openapi.generator") version "5.1.1"
}
openApiGenerate {
generatorName.set("kotlin")
inputSpec.set("./api-client.yml")
outputDir.set("$buildDir")
apiPackage.set("com.innovorder.data.api")
modelPackage.set("com.innovorder.data.models")
library.set("jvm-retrofit2")
configOptions.set(mapOf(
"java8" to "true",
"dateLibrary" to "java8",
"moshiCodeGen" to "true",
"useCoroutines" to "true",
"library" to "jvm-retrofit2"
))
}
openApiValidate {
inputSpec.set("./api-client.yml")
recommend.set(true)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment