mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-18 22:47:12 +00:00
Fix null assignation to header/query param map (#3749)
Also regenerates the clients
This commit is contained in:
committed by
William Cheng
parent
dfb4c133d8
commit
1f5aa22f5c
@@ -74,10 +74,12 @@ open class ApiClient(val baseUrl: String) {
|
||||
|
||||
protected fun updateAuthParams(requestConfig: RequestConfig) {
|
||||
if (requestConfig.headers["api_key"].isNullOrEmpty()) {
|
||||
if (apiKeyPrefix["api_key"] != null) {
|
||||
requestConfig.headers["api_key"] = apiKeyPrefix["api_key"] + " " + apiKey["api_key"]
|
||||
} else {
|
||||
requestConfig.headers["api_key"] = apiKey["api_key"]
|
||||
if (apiKey["api_key"] != null) {
|
||||
if (apiKeyPrefix["api_key"] != null) {
|
||||
requestConfig.headers["api_key"] = apiKeyPrefix["api_key"]!! + " " + apiKey["api_key"]!!
|
||||
} else {
|
||||
requestConfig.headers["api_key"] = apiKey["api_key"]!!
|
||||
}
|
||||
}
|
||||
}
|
||||
if (requestConfig.headers[Authorization].isNullOrEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user