File tree Expand file tree Collapse file tree
kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure
kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure Expand file tree Collapse file tree Original file line number Diff line number Diff line change 12431243 <module >samples/client/petstore/elixir</module >
12441244 <module >samples/client/petstore/erlang-client</module >
12451245 <module >samples/client/petstore/erlang-proper</module >
1246- <!-- < module>samples/client/petstore/kotlin/</module>
1246+ <module >samples/client/petstore/kotlin/</module >
12471247 <module >samples/client/petstore/kotlin-threetenbp/</module >
1248- <module>samples/client/petstore/kotlin-string/</module>-->
1248+ <module >samples/client/petstore/kotlin-string/</module >
12491249 <!-- servers -->
12501250 <module >samples/server/petstore/erlang-server</module >
12511251 <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) {
7474
7575 protected fun updateAuthParams (requestConfig : RequestConfig ) {
7676 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+ }
8183 }
8284 }
8385 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) {
7474
7575 protected fun updateAuthParams (requestConfig : RequestConfig ) {
7676 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+ }
8183 }
8284 }
8385 if (requestConfig.headers[Authorization ].isNullOrEmpty()) {
You can’t perform that action at this time.
0 commit comments