Closed Alex009 closed 3 years ago
configuration spec should be changed to:
mokoNetwork { spec("petstore") { inputSpec = file("src/swagger") packageName = "com.icerockdev.library" isInternal = false isOpen = true configureTask { // here block that will be called at creating of generate task inputSpec.set(file("src/profile_openapi.yaml").path) generatorName.set("kotlin-ktor-client") } } spec("profile") { inputSpec = file("src/profile_openapi.yaml") packageName = "com.icerockdev.library.d2" isInternal = false isOpen = true } }
inside plugin we should generate task by:
tasks.create("profileOpenApiGenerate", org.openapitools.generator.gradle.plugin.tasks.GenerateTask::class.java) { group = "openapi" inputSpec.set(file("src/profile_openapi.yaml").path) generatorName.set("kotlin-ktor-client") }
configuration spec should be changed to:
inside plugin we should generate task by: