File tree 3 files changed +14
-10
lines changed
kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure
kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure
3 files changed +14
-10
lines changed Original file line number Diff line number Diff line change 1243
1243
<module >samples/client/petstore/elixir</module >
1244
1244
<module >samples/client/petstore/erlang-client</module >
1245
1245
<module >samples/client/petstore/erlang-proper</module >
1246
- <!-- < module>samples/client/petstore/kotlin/</module>
1246
+ <module >samples/client/petstore/kotlin/</module >
1247
1247
<module >samples/client/petstore/kotlin-threetenbp/</module >
1248
- <module>samples/client/petstore/kotlin-string/</module>-->
1248
+ <module >samples/client/petstore/kotlin-string/</module >
1249
1249
<!-- servers -->
1250
1250
<module >samples/server/petstore/erlang-server</module >
1251
1251
<module >samples/server/petstore/jaxrs/jersey2</module >
Original file line number Diff line number Diff line change @@ -74,10 +74,12 @@ open class ApiClient(val baseUrl: String) {
74
74
75
75
protected fun updateAuthParams (requestConfig : RequestConfig ) {
76
76
if (requestConfig.headers[" api_key" ].isNullOrEmpty()) {
77
- if (apiKeyPrefix[" api_key" ] != null ) {
78
- requestConfig.headers[" api_key" ] = apiKeyPrefix[" api_key" ] + " " + apiKey[" api_key" ]
79
- } else {
80
- requestConfig.headers[" api_key" ] = apiKey[" api_key" ]
77
+ if (apiKey[" api_key" ] != null ) {
78
+ if (apiKeyPrefix[" api_key" ] != null ) {
79
+ requestConfig.headers[" api_key" ] = apiKeyPrefix[" api_key" ]!! + " " + apiKey[" api_key" ]!!
80
+ } else {
81
+ requestConfig.headers[" api_key" ] = apiKey[" api_key" ]!!
82
+ }
81
83
}
82
84
}
83
85
if (requestConfig.headers[Authorization ].isNullOrEmpty()) {
Original file line number Diff line number Diff line change @@ -74,10 +74,12 @@ open class ApiClient(val baseUrl: String) {
74
74
75
75
protected fun updateAuthParams (requestConfig : RequestConfig ) {
76
76
if (requestConfig.headers[" api_key" ].isNullOrEmpty()) {
77
- if (apiKeyPrefix[" api_key" ] != null ) {
78
- requestConfig.headers[" api_key" ] = apiKeyPrefix[" api_key" ] + " " + apiKey[" api_key" ]
79
- } else {
80
- requestConfig.headers[" api_key" ] = apiKey[" api_key" ]
77
+ if (apiKey[" api_key" ] != null ) {
78
+ if (apiKeyPrefix[" api_key" ] != null ) {
79
+ requestConfig.headers[" api_key" ] = apiKeyPrefix[" api_key" ]!! + " " + apiKey[" api_key" ]!!
80
+ } else {
81
+ requestConfig.headers[" api_key" ] = apiKey[" api_key" ]!!
82
+ }
81
83
}
82
84
}
83
85
if (requestConfig.headers[Authorization ].isNullOrEmpty()) {
You can’t perform that action at this time.
0 commit comments