Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
reenable kotlin client tests in shippable ci
  • Loading branch information
wing328 committed Aug 24, 2019
commit c995b7741ca042da834b49c99743ee0251276fcd
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1243,9 +1243,9 @@
<module>samples/client/petstore/elixir</module>
<module>samples/client/petstore/erlang-client</module>
<module>samples/client/petstore/erlang-proper</module>
<!--<module>samples/client/petstore/kotlin/</module>
<module>samples/client/petstore/kotlin/</module>
<module>samples/client/petstore/kotlin-threetenbp/</module>
<module>samples/client/petstore/kotlin-string/</module>-->
<module>samples/client/petstore/kotlin-string/</module>
<!-- servers -->
<module>samples/server/petstore/erlang-server</module>
<module>samples/server/petstore/jaxrs/jersey2</module>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down