Skip to content

Commit

Permalink
chore(rapid): Remove Rapid Logic for 2023-01-17 Release and Upgrade C…
Browse files Browse the repository at this point in the history
…ore Version

Remove Rapid logic for 2023-01-17 release and upgrade core version
  • Loading branch information
osama-salman99 committed Jan 17, 2023
1 parent f305158 commit a165f3a
Show file tree
Hide file tree
Showing 20 changed files with 18 additions and 589 deletions.
5 changes: 2 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<artifactId>openworld-java-sdk-core</artifactId>
<name>EG Open World SDK :: Core</name>
<description>Core Modules of EG Travel SDK</description>
<version>0.6.0</version>
<version>0.7.0</version>
<inceptionYear>2022</inceptionYear>
<url>https://github.com/ExpediaGroup/openworld-sdk-java-core</url>

Expand Down Expand Up @@ -413,15 +413,13 @@
<exclude>**/constant/**</exclude>

<exclude>**/client/openapi/OpenApiStub*</exclude>
<exclude>**/client/openapi/RapidOpenApiStub*</exclude>
<exclude>**/client/Client*</exclude>
<exclude>**/client/openapi/OpenApiStub*</exclude>
<exclude>**/client/Client*</exclude>

<exclude>**/configuration/NetworkConfiguration*</exclude>
<exclude>**/configuration/LoggingConfiguration*</exclude>
<exclude>**/configuration/ClientConfiguration$Companion*</exclude>
<exclude>**/configuration/RapidClientConfiguration$Companion*</exclude>
<exclude>**/config/provider/ConfigurationData*</exclude>
<exclude>**/configuration/NetworkConfiguration*</exclude>
<exclude>**/configuration/LoggingConfiguration*</exclude>
Expand All @@ -437,6 +435,7 @@
<exclude>**/authentication/AuthenticationConfiguration*</exclude>
<exclude>**/authentication/AuthenticationPlugin*</exclude>
<exclude>**/authentication/strategy/bearer/TokenResponse*</exclude>
<exclude>**/authentication/strategy/AuthenticationStrategy*</exclude>
<exclude>**/authentication/TokenResponse*</exclude>
<exclude>**/authentication/AuthenticationConfiguration*</exclude>
<exclude>**/authentication/AuthenticationHook*</exclude>
Expand Down
14 changes: 4 additions & 10 deletions src/main/kotlin/com/expediagroup/sdk/core/client/Client.kt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import com.expediagroup.sdk.core.plugin.Hooks
import com.expediagroup.sdk.core.plugin.authentication.AuthenticationConfiguration
import com.expediagroup.sdk.core.plugin.authentication.AuthenticationHook
import com.expediagroup.sdk.core.plugin.authentication.AuthenticationPlugin
import com.expediagroup.sdk.core.plugin.authentication.strategy.AuthenticationStrategy.AuthenticationType
import com.expediagroup.sdk.core.plugin.encoding.EncodingConfiguration
import com.expediagroup.sdk.core.plugin.encoding.EncodingPlugin
import com.expediagroup.sdk.core.plugin.hooks
Expand All @@ -46,12 +45,10 @@ import io.ktor.client.engine.HttpClientEngine
*
* @param httpClientEngine The HTTP client engine to use.
* @param clientConfiguration The configuration for the client.
* @param isRapid If the client is RapidApi
*/
class Client private constructor(
httpClientEngine: HttpClientEngine,
clientConfiguration: ClientConfiguration,
isRapid: Boolean
clientConfiguration: ClientConfiguration
) {
/**
* The HTTP client to perform requests with.
Expand All @@ -69,8 +66,7 @@ class Client private constructor(
val authenticationConfiguration = AuthenticationConfiguration.from(
this,
Credentials.from(configurationCollector.key, configurationCollector.secret),
configurationCollector.authEndpoint,
AuthenticationType.from(isRapid)
configurationCollector.authEndpoint
)

plugins {
Expand All @@ -95,15 +91,13 @@ class Client private constructor(
*
* @param httpClientEngine The HttpClientEngine to use.
* @param clientConfiguration The ClientConfiguration to use.
* @param isRapid If the client is RapidApi
* @return A Client.
*/
@JvmOverloads
fun from(
httpClientEngine: HttpClientEngine,
clientConfiguration: ClientConfiguration = ClientConfiguration.EMPTY,
isRapid: Boolean
): Client = Client(httpClientEngine, clientConfiguration, isRapid)
clientConfiguration: ClientConfiguration = ClientConfiguration.EMPTY
): Client = Client(httpClientEngine, clientConfiguration)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ abstract class OpenApiStub(
/**
* Create a new [Client] instance to be used by the generated OpenAPI APIs.
*/
protected open fun createClient(): Client = Client.from(OkHttp.create(), clientConfiguration, false)
protected open fun createClient(): Client = Client.from(OkHttp.create(), clientConfiguration)

protected fun collectionDelimiter(format: String): String {
return when (format) {
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit a165f3a

Please sign in to comment.