Fix null assignation to header/query param map (#3749)

Also regenerates the clients
This commit is contained in:
Armand Mégrot
2019-08-24 17:09:57 +02:00
committed by William Cheng
parent dfb4c133d8
commit 1f5aa22f5c
21 changed files with 253 additions and 134 deletions

View File

@@ -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()) {