Description
OpenAPI Gradle plug-in (underlying generator) adds an unnecessary import:
import org.apache.cxf.jaxrs.ext.multipart.*;
when the Java configuration option "library" is set to "microprofile". Such imports are not needed - manually deleting them cause no compile errors.
openapi-generator version
5.0.0-SNAPSHOT
OpenAPI declaration file content or url
https://raw.githubusercontent.com/ory/kratos-client-java/master/api/openapi.yaml
Generation Details
I use the Gradle plugin, but I beleive the problem is in the core generator itself :
plugins {
id 'org.openapi.generator'
}
openApiGenerate {
generatorName = "java"
inputSpec = "$rootDir/ory-kratos.yaml".toString() //get from the url above!
outputDir = "$rootDir".toString()
apiPackage = "kratos.api"
invokerPackage = "kratos.invoker"
modelPackage = "kratos.model"
configOptions = [
dateLibrary: "java8",
java8: "true",
library:"microprofile"
]
}
Steps to reproduce
generate source code with the above configuration, see file kratos.api.AdminApi.java - the problematic import is there.
Related issues/PRs
Suggest a fix
Manually deleting the necessary import after each generation .
Description
OpenAPI Gradle plug-in (underlying generator) adds an unnecessary import:
when the Java configuration option "library" is set to "microprofile". Such imports are not needed - manually deleting them cause no compile errors.
openapi-generator version
5.0.0-SNAPSHOT
OpenAPI declaration file content or url
https://raw.githubusercontent.com/ory/kratos-client-java/master/api/openapi.yaml
Generation Details
I use the Gradle plugin, but I beleive the problem is in the core generator itself :
Steps to reproduce
generate source code with the above configuration, see file kratos.api.AdminApi.java - the problematic import is there.
Related issues/PRs
Suggest a fix
Manually deleting the necessary import after each generation .