[BUG] [kotlin-spring] interfaceOnly doesn't work as expected
Created by: mariusstokseth
Bug Report Checklist
-
Have you provided a full/minimal spec to reproduce the issue? -
Have you validated the input using an OpenAPI validator (example)? -
What's the version of OpenAPI Generator used? -
Have you search for related issues/PRs? -
What's the actual output vs expected output? -
[Optional] Bounty to sponsor the fix (example)
Description
Using the openapi-gradle plugin i setup a task to generate code for the Petstore example [YAML] (https://github.com/OAI/OpenAPI-Specification/blob/master/examples/v3.0/petstore.yaml). I have created the following task:
task buildKotlinClient(type: org.openapitools.generator.gradle.plugin.tasks.GenerateTask){
generatorName = "kotlin-spring"
inputSpec = "$rootDir/pet.yaml".toString()
outputDir = "$rootDir/generated-sources/".toString()
apiPackage = "sandbox.api"
modelPackage = "sandbox.model"
configOptions = [
dateLibrary: "java8",
swaggerAnnotations: "true",
interfaceOnly: "true",
]
systemProperties = [
modelDocs: "false",
generateSupportingFiles: "false",
]
}
From what I understand only the PetAPI and the objects Error and Pet should be generated. Instead the task also generates Application.kt, build.gradle.kts, pom.xml, README.m, settings.gradle and application.yaml
openapi-generator version 4.2.2
gradle version 6.1.1
OpenAPI declaration file content or url
URL: https://github.com/OAI/OpenAPI-Specification/blob/master/examples/v3.0/petstore.yaml
Steps to reproduce
- Download Petstore Example YAML
- Run code generation task using the Gradle Plugin
- Navigate to the genearted-sources folder