From 473857f5ede7d86400e8c074b3d9b1fce024cec3 Mon Sep 17 00:00:00 2001 From: Honza Dvorsky Date: Fri, 12 May 2023 17:50:43 +0200 Subject: [PATCH] Add a missing protocol conformance to ClientTransport --- Sources/OpenAPIURLSession/URLSessionTransport.swift | 2 +- Tests/OpenAPIURLSessionTests/URLSessionTransportTests.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/OpenAPIURLSession/URLSessionTransport.swift b/Sources/OpenAPIURLSession/URLSessionTransport.swift index bf10e5b..eadddb6 100644 --- a/Sources/OpenAPIURLSession/URLSessionTransport.swift +++ b/Sources/OpenAPIURLSession/URLSessionTransport.swift @@ -52,7 +52,7 @@ import Foundation /// The ``URLSessionTransport/Configuration-swift.struct`` type allows you to /// provide a custom URLSession and tweak behaviors such as the default /// timeouts, authentication challenges, and more. -public struct URLSessionTransport { +public struct URLSessionTransport: ClientTransport { /// A set of configuration values for the URLSession transport. public struct Configuration: Sendable { diff --git a/Tests/OpenAPIURLSessionTests/URLSessionTransportTests.swift b/Tests/OpenAPIURLSessionTests/URLSessionTransportTests.swift index faf0891..8b9d2bd 100644 --- a/Tests/OpenAPIURLSessionTests/URLSessionTransportTests.swift +++ b/Tests/OpenAPIURLSessionTests/URLSessionTransportTests.swift @@ -59,7 +59,7 @@ class URLSessionTransportTests: XCTestCase { body: Data("👋".utf8) ) ) - let transport = URLSessionTransport( + let transport: ClientTransport = URLSessionTransport( configuration: .init(session: MockURLProtocol.mockURLSession) ) let request = OpenAPIRuntime.Request(