Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: default HTTPClient uses HttpClientConfiguration passed in from client config #705

Merged
merged 1 commit into from
May 9, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,6 @@ public class DefaultAuthSchemeResolver: AuthSchemeResolver {
return DefaultAuthSchemeResolverParameters(operation: opName)
}
}

public typealias ClientConfigurationDefaults
= DefaultSDKRuntimeConfiguration<DefaultRetryStrategy, DefaultRetryErrorInfoProvider>
2 changes: 1 addition & 1 deletion Sources/WeatherSDK/WeatherClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ extension WeatherClient {
}

public convenience init(telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: ClientRuntime.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: ClientRuntime.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ClientRuntime.AuthSchemeResolver? = nil) throws {
self.init(telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, retryStrategyOptions ?? DefaultSDKRuntimeConfiguration<DefaultRetryStrategy, DefaultRetryErrorInfoProvider>.defaultRetryStrategyOptions, clientLogMode ?? DefaultSDKRuntimeConfiguration<DefaultRetryStrategy, DefaultRetryErrorInfoProvider>.defaultClientLogMode, endpoint, idempotencyTokenGenerator ?? DefaultSDKRuntimeConfiguration<DefaultRetryStrategy, DefaultRetryErrorInfoProvider>.defaultIdempotencyTokenGenerator, httpClientEngine ?? DefaultSDKRuntimeConfiguration<DefaultRetryStrategy, DefaultRetryErrorInfoProvider>.makeClient(), httpClientConfiguration ?? DefaultSDKRuntimeConfiguration<DefaultRetryStrategy, DefaultRetryErrorInfoProvider>.defaultHttpClientConfiguration, authSchemes, authSchemeResolver ?? DefaultSDKRuntimeConfiguration<DefaultRetryStrategy, DefaultRetryErrorInfoProvider>.defaultAuthSchemeResolver)
self.init(telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, retryStrategyOptions ?? ClientConfigurationDefaults.defaultRetryStrategyOptions, clientLogMode ?? ClientConfigurationDefaults.defaultClientLogMode, endpoint, idempotencyTokenGenerator ?? ClientConfigurationDefaults.defaultIdempotencyTokenGenerator, httpClientEngine ?? ClientConfigurationDefaults.makeClient(httpClientConfiguration: httpClientConfiguration ?? ClientConfigurationDefaults.defaultHttpClientConfiguration), httpClientConfiguration ?? ClientConfigurationDefaults.defaultHttpClientConfiguration, authSchemes, authSchemeResolver ?? ClientConfigurationDefaults.defaultAuthSchemeResolver)
}

public convenience required init() async throws {
Expand Down
2 changes: 1 addition & 1 deletion Sources/WeatherSDK/models/Baz.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import ClientRuntime

extension WeatherClientTypes {
public struct Baz: Swift.Equatable {
public struct Baz {
public var bar: Swift.String?
public var baz: Swift.String?

Expand Down
2 changes: 1 addition & 1 deletion Sources/WeatherSDK/models/CityCoordinates.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import ClientRuntime

extension WeatherClientTypes {
public struct CityCoordinates: Swift.Equatable {
public struct CityCoordinates {
/// This member is required.
public var latitude: Swift.Float?
/// This member is required.
Expand Down
2 changes: 1 addition & 1 deletion Sources/WeatherSDK/models/CitySummary.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import ClientRuntime

extension WeatherClientTypes {
public struct CitySummary: Swift.Equatable {
public struct CitySummary {
public var `case`: Swift.String?
/// This member is required.
public var cityId: Swift.String?
Expand Down
2 changes: 1 addition & 1 deletion Sources/WeatherSDK/models/CreateCityInput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ClientRuntime

public struct CreateCityInput: Swift.Equatable {
public struct CreateCityInput {
public var city: WeatherClientTypes.CitySummary?
/// This member is required.
public var coordinates: WeatherClientTypes.CityCoordinates?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ClientRuntime

struct CreateCityInputBody: Swift.Equatable {
struct CreateCityInputBody {
let name: Swift.String?
let coordinates: WeatherClientTypes.CityCoordinates?
let city: WeatherClientTypes.CitySummary?
Expand Down
2 changes: 1 addition & 1 deletion Sources/WeatherSDK/models/CreateCityOutput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ClientRuntime

public struct CreateCityOutput: Swift.Equatable {
public struct CreateCityOutput {
/// This member is required.
public var cityId: Swift.String?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ClientRuntime

struct CreateCityOutputBody: Swift.Equatable {
struct CreateCityOutputBody {
let cityId: Swift.String?
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/WeatherSDK/models/Foo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import ClientRuntime

extension WeatherClientTypes {
public struct Foo: Swift.Equatable {
public struct Foo {
public var bar: Swift.String?
public var baz: Swift.String?

Expand Down
2 changes: 1 addition & 1 deletion Sources/WeatherSDK/models/GetCityAnnouncementsInput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ClientRuntime

public struct GetCityAnnouncementsInput: Swift.Equatable {
public struct GetCityAnnouncementsInput {
/// This member is required.
public var cityId: Swift.String?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ClientRuntime

struct GetCityAnnouncementsInputBody: Swift.Equatable {
struct GetCityAnnouncementsInputBody {
}

extension GetCityAnnouncementsInputBody: Swift.Decodable {
Expand Down
2 changes: 1 addition & 1 deletion Sources/WeatherSDK/models/GetCityAnnouncementsOutput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ClientRuntime

public struct GetCityAnnouncementsOutput: Swift.Equatable {
public struct GetCityAnnouncementsOutput {
public var lastUpdated: ClientRuntime.Date?

public init(
Expand Down
2 changes: 1 addition & 1 deletion Sources/WeatherSDK/models/GetCityImageInput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ClientRuntime

public struct GetCityImageInput: Swift.Equatable {
public struct GetCityImageInput {
/// This member is required.
public var cityId: Swift.String?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ClientRuntime

struct GetCityImageInputBody: Swift.Equatable {
struct GetCityImageInputBody {
}

extension GetCityImageInputBody: Swift.Decodable {
Expand Down
2 changes: 1 addition & 1 deletion Sources/WeatherSDK/models/GetCityImageOutput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ClientRuntime

public struct GetCityImageOutput: Swift.Equatable {
public struct GetCityImageOutput {
/// This member is required.
public var image: ClientRuntime.ByteStream?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ClientRuntime

struct GetCityImageOutputBody: Swift.Equatable {
struct GetCityImageOutputBody {
let image: ClientRuntime.ByteStream?
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/WeatherSDK/models/GetCityInput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import ClientRuntime

/// The input used to get a city.
public struct GetCityInput: Swift.Equatable {
public struct GetCityInput {
/// This member is required.
public var cityId: Swift.String?

Expand Down
2 changes: 1 addition & 1 deletion Sources/WeatherSDK/models/GetCityInputBody+Decodable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ClientRuntime

struct GetCityInputBody: Swift.Equatable {
struct GetCityInputBody {
}

extension GetCityInputBody: Swift.Decodable {
Expand Down
2 changes: 1 addition & 1 deletion Sources/WeatherSDK/models/GetCityOutput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ClientRuntime

public struct GetCityOutput: Swift.Equatable {
public struct GetCityOutput {
public var city: WeatherClientTypes.CitySummary?
/// This member is required.
public var coordinates: WeatherClientTypes.CityCoordinates?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ClientRuntime

struct GetCityOutputBody: Swift.Equatable {
struct GetCityOutputBody {
let name: Swift.String?
let coordinates: WeatherClientTypes.CityCoordinates?
let city: WeatherClientTypes.CitySummary?
Expand Down
2 changes: 1 addition & 1 deletion Sources/WeatherSDK/models/GetCurrentTimeInput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@



public struct GetCurrentTimeInput: Swift.Equatable {
public struct GetCurrentTimeInput {

public init() { }
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ClientRuntime

struct GetCurrentTimeInputBody: Swift.Equatable {
struct GetCurrentTimeInputBody {
}

extension GetCurrentTimeInputBody: Swift.Decodable {
Expand Down
2 changes: 1 addition & 1 deletion Sources/WeatherSDK/models/GetCurrentTimeOutput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ClientRuntime

public struct GetCurrentTimeOutput: Swift.Equatable {
public struct GetCurrentTimeOutput {
/// This member is required.
public var time: ClientRuntime.Date?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ClientRuntime

struct GetCurrentTimeOutputBody: Swift.Equatable {
struct GetCurrentTimeOutputBody {
let time: ClientRuntime.Date?
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/WeatherSDK/models/GetForecastInput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ClientRuntime

public struct GetForecastInput: Swift.Equatable {
public struct GetForecastInput {
/// This member is required.
public var cityId: Swift.String?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ClientRuntime

struct GetForecastInputBody: Swift.Equatable {
struct GetForecastInputBody {
}

extension GetForecastInputBody: Swift.Decodable {
Expand Down
2 changes: 1 addition & 1 deletion Sources/WeatherSDK/models/GetForecastOutput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ClientRuntime

public struct GetForecastOutput: Swift.Equatable {
public struct GetForecastOutput {
public var chanceOfRain: Swift.Float?
public var precipitation: WeatherClientTypes.Precipitation?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ClientRuntime

struct GetForecastOutputBody: Swift.Equatable {
struct GetForecastOutputBody {
let chanceOfRain: Swift.Float?
let precipitation: WeatherClientTypes.Precipitation?
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/WeatherSDK/models/InvokeInput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ClientRuntime

public struct InvokeInput: Swift.Equatable {
public struct InvokeInput {
public var payload: ClientRuntime.Data?

public init(
Expand Down
2 changes: 1 addition & 1 deletion Sources/WeatherSDK/models/InvokeInputBody+Decodable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ClientRuntime

struct InvokeInputBody: Swift.Equatable {
struct InvokeInputBody {
let payload: ClientRuntime.Data?
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/WeatherSDK/models/InvokeOutput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ClientRuntime

public struct InvokeOutput: Swift.Equatable {
public struct InvokeOutput {
public var payload: ClientRuntime.Data?

public init(
Expand Down
2 changes: 1 addition & 1 deletion Sources/WeatherSDK/models/InvokeOutputBody+Decodable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ClientRuntime

struct InvokeOutputBody: Swift.Equatable {
struct InvokeOutputBody {
let payload: ClientRuntime.Data?
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/WeatherSDK/models/ListCitiesInput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ClientRuntime

public struct ListCitiesInput: Swift.Equatable {
public struct ListCitiesInput {
public var nextToken: Swift.String?
public var pageSize: Swift.Int?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ClientRuntime

struct ListCitiesInputBody: Swift.Equatable {
struct ListCitiesInputBody {
}

extension ListCitiesInputBody: Swift.Decodable {
Expand Down
2 changes: 1 addition & 1 deletion Sources/WeatherSDK/models/ListCitiesOutput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ClientRuntime

public struct ListCitiesOutput: Swift.Equatable {
public struct ListCitiesOutput {
/// This member is required.
public var items: [WeatherClientTypes.CitySummary]?
public var nextToken: Swift.String?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ClientRuntime

struct ListCitiesOutputBody: Swift.Equatable {
struct ListCitiesOutputBody {
let nextToken: Swift.String?
let items: [WeatherClientTypes.CitySummary]?
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ClientRuntime

struct NoSuchResourceBody: Swift.Equatable {
struct NoSuchResourceBody {
let resourceType: Swift.String?
let message: Swift.String?
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/WeatherSDK/models/OnlyFakeAuthInput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@



public struct OnlyFakeAuthInput: Swift.Equatable {
public struct OnlyFakeAuthInput {

public init() { }
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ClientRuntime

struct OnlyFakeAuthInputBody: Swift.Equatable {
struct OnlyFakeAuthInputBody {
}

extension OnlyFakeAuthInputBody: Swift.Decodable {
Expand Down
2 changes: 1 addition & 1 deletion Sources/WeatherSDK/models/OnlyFakeAuthOptionalInput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@



public struct OnlyFakeAuthOptionalInput: Swift.Equatable {
public struct OnlyFakeAuthOptionalInput {

public init() { }
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ClientRuntime

struct OnlyFakeAuthOptionalInputBody: Swift.Equatable {
struct OnlyFakeAuthOptionalInputBody {
}

extension OnlyFakeAuthOptionalInputBody: Swift.Decodable {
Expand Down
2 changes: 1 addition & 1 deletion Sources/WeatherSDK/models/OnlyFakeAuthOptionalOutput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@



public struct OnlyFakeAuthOptionalOutput: Swift.Equatable {
public struct OnlyFakeAuthOptionalOutput {

public init() { }
}
2 changes: 1 addition & 1 deletion Sources/WeatherSDK/models/OnlyFakeAuthOutput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@



public struct OnlyFakeAuthOutput: Swift.Equatable {
public struct OnlyFakeAuthOutput {

public init() { }
}
Loading
Loading