Bug Report Checklist
Description
While trying to generate Kotlin Client code for cookie-based security schema with OpenAPI Spec version 3.0.0, the below lines were seen in the ApiClient.kt file.
constructor(
baseUrl: String = defaultBasePath,
okHttpClientBuilder: OkHttpClient.Builder? = null,
serializerBuilder: GsonBuilder = Serializer.gsonBuilder,
authNames: Array<String>
) : this(baseUrl, okHttpClientBuilder, serializerBuilder) {
authNames.forEach { authName ->
val auth = when (authName) {
"cookieAuth" -> ApiKeyAuth("cookie", "sess")
else -> throw RuntimeException("auth name $authName not found in available auth names")
}
addAuthorization(authName, auth);
}
}
But, the file ApiKeyAuth.kt was not found in the generated code.
openapi-generator version
5.2.0
OpenAPI declaration file content or url
https://gist.github.com/puneetugru/ec65183b4ad2da3ee8a7b43def2eea4a
Generation Details
openapi-generator generate -i TestCookieAuthInAPI.yaml -g kotlin -c config_android.json
Steps to reproduce
- Create a config file like below to put the Kotlin client code in a required directory and use some required libraries, called as config_android.json.
{
"packageName": "com.test",
"serializationLibrary": "gson",
"sourceFolder": "src/main/java",
"library": "jvm-retrofit2"
}
- Run the command, openapi-generator generate -i TestCookieAuthInAPI.yaml -g kotlin -c config_android.json
Related issues/PRs
None
Suggest a fix
None
Bug Report Checklist
Description
While trying to generate Kotlin Client code for cookie-based security schema with OpenAPI Spec version 3.0.0, the below lines were seen in the ApiClient.kt file.
But, the file ApiKeyAuth.kt was not found in the generated code.
openapi-generator version
5.2.0
OpenAPI declaration file content or url
https://gist.github.com/puneetugru/ec65183b4ad2da3ee8a7b43def2eea4a
Generation Details
openapi-generator generate -i TestCookieAuthInAPI.yaml -g kotlin -c config_android.json
Steps to reproduce
Related issues/PRs
None
Suggest a fix
None