Bug Report Checklist
Description
When using the Gradle plugin to generation Kotlin code under the jvm-retrofit2 library type, ApiKeyAuth doesn't generate causing compilation to fail. The class is referenced in ApiClient here:
constructor(
baseUrl: String = defaultBasePath,
okHttpClientBuilder: OkHttpClient.Builder? = null,
serializerBuilder: Moshi.Builder = Serializer.moshiBuilder,
authNames: Array<String>
) : this(baseUrl, okHttpClientBuilder, serializerBuilder) {
authNames.forEach { authName ->
val auth = when (authName) {
"TokenAuth" -> ApiKeyAuth("header", "Authorization")
else -> throw RuntimeException("auth name $authName not found in available auth names")
}
addAuthorization(authName, auth);
}
}
openapi-generator version
I've tested this on plugin versions 5.1.1, 5.2.1, and 5.3.0.
OpenAPI declaration file content or url
The spec I'm using can be found here.
Generation Details
generatorName: kotlin
outputDir: out
library: jvm-retrofit2
inputSpec: modrinth.yaml
Steps to reproduce
I've attached a minimal project that reproduces the bug:
OpenAPIBugReproduction.zip
Related issues/PRs
Might be related to this issue #8147.
Bug Report Checklist
Description
When using the Gradle plugin to generation Kotlin code under the jvm-retrofit2 library type, ApiKeyAuth doesn't generate causing compilation to fail. The class is referenced in ApiClient here:
openapi-generator version
I've tested this on plugin versions 5.1.1, 5.2.1, and 5.3.0.
OpenAPI declaration file content or url
The spec I'm using can be found here.
Generation Details
Steps to reproduce
I've attached a minimal project that reproduces the bug:
OpenAPIBugReproduction.zip
Related issues/PRs
Might be related to this issue #8147.