Skip to content

Commit 25486f2

Browse files
committed
Reformat
1 parent 9876965 commit 25486f2

File tree

6 files changed

+23
-22
lines changed

6 files changed

+23
-22
lines changed

Examples/logging-middleware-oslog-example/Sources/LoggingMiddleware/LoggingMiddleware.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ extension LoggingMiddleware: ServerMiddleware {
5959
body: OpenAPIRuntime.HTTPBody?,
6060
metadata: OpenAPIRuntime.ServerRequestMetadata,
6161
operationID: String,
62-
next: @Sendable (HTTPTypes.HTTPRequest, OpenAPIRuntime.HTTPBody?, OpenAPIRuntime.ServerRequestMetadata)
62+
next:
63+
@Sendable (HTTPTypes.HTTPRequest, OpenAPIRuntime.HTTPBody?, OpenAPIRuntime.ServerRequestMetadata)
6364
async throws -> (HTTPTypes.HTTPResponse, OpenAPIRuntime.HTTPBody?)
6465
) async throws -> (HTTPTypes.HTTPResponse, OpenAPIRuntime.HTTPBody?) {
6566
let (requestBodyToLog, requestBodyForNext) = try await bodyLoggingPolicy.process(body)

Examples/logging-middleware-swift-log-example/Sources/LoggingMiddleware/LoggingMiddleware.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ extension LoggingMiddleware: ServerMiddleware {
5656
body: OpenAPIRuntime.HTTPBody?,
5757
metadata: OpenAPIRuntime.ServerRequestMetadata,
5858
operationID: String,
59-
next: @Sendable (HTTPTypes.HTTPRequest, OpenAPIRuntime.HTTPBody?, OpenAPIRuntime.ServerRequestMetadata)
59+
next:
60+
@Sendable (HTTPTypes.HTTPRequest, OpenAPIRuntime.HTTPBody?, OpenAPIRuntime.ServerRequestMetadata)
6061
async throws -> (HTTPTypes.HTTPResponse, OpenAPIRuntime.HTTPBody?)
6162
) async throws -> (HTTPTypes.HTTPResponse, OpenAPIRuntime.HTTPBody?) {
6263
let (requestBodyToLog, requestBodyForNext) = try await bodyLoggingPolicy.process(body)

IntegrationTest/Sources/MockTransportServer/Server.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ actor SimpleAPIImpl: APIProtocol {
2424
}
2525

2626
class MockServerTransport: ServerTransport {
27-
typealias Handler = @Sendable (
28-
HTTPTypes.HTTPRequest, OpenAPIRuntime.HTTPBody?, OpenAPIRuntime.ServerRequestMetadata
29-
) async throws -> (HTTPTypes.HTTPResponse, OpenAPIRuntime.HTTPBody?)
27+
typealias Handler =
28+
@Sendable (HTTPTypes.HTTPRequest, OpenAPIRuntime.HTTPBody?, OpenAPIRuntime.ServerRequestMetadata) async throws
29+
-> (HTTPTypes.HTTPResponse, OpenAPIRuntime.HTTPBody?)
3030

3131
func register(_ handler: @escaping Handler, method: HTTPTypes.HTTPRequest.Method, path: String) throws {
3232
// noop.

Sources/PetstoreConsumerTestCore/TestClientTransport.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@ import HTTPTypes
3333
public struct TestClientTransport: ClientTransport {
3434

3535
/// A typealias representing a call handler closure for processing client requests.
36-
public typealias CallHandler = @Sendable (HTTPRequest, HTTPBody?, URL, String) async throws -> (
37-
HTTPResponse, HTTPBody?
38-
)
36+
public typealias CallHandler =
37+
@Sendable (HTTPRequest, HTTPBody?, URL, String) async throws -> (HTTPResponse, HTTPBody?)
3938

4039
/// The call handler responsible for processing client requests.
4140
public let callHandler: CallHandler

Sources/PetstoreConsumerTestCore/TestServerTransport.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,8 @@ public final class TestServerTransport: ServerTransport {
5050
}
5151

5252
/// A typealias representing a handler closure for processing server requests.
53-
public typealias Handler = @Sendable (HTTPRequest, HTTPBody?, ServerRequestMetadata) async throws -> (
54-
HTTPResponse, HTTPBody?
55-
)
53+
public typealias Handler =
54+
@Sendable (HTTPRequest, HTTPBody?, ServerRequestMetadata) async throws -> (HTTPResponse, HTTPBody?)
5655

5756
/// Represents an operation with its inputs and associated handler.
5857
public struct Operation {
@@ -86,9 +85,10 @@ public final class TestServerTransport: ServerTransport {
8685
/// - path: The path components of the operation.
8786
/// - Throws: An error if there's an issue registering the operation.
8887
public func register(
89-
_ handler: @Sendable @escaping (HTTPRequest, HTTPBody?, ServerRequestMetadata) async throws -> (
90-
HTTPResponse, HTTPBody?
91-
),
88+
_ handler:
89+
@Sendable @escaping (HTTPRequest, HTTPBody?, ServerRequestMetadata) async throws -> (
90+
HTTPResponse, HTTPBody?
91+
),
9292
method: HTTPRequest.Method,
9393
path: String
9494
) throws { registered.append(Operation(inputs: .init(method: method, path: path), closure: handler)) }

Tests/PetstoreConsumerTests/TestClient.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ struct TestClient: APIProtocol {
2929
return try await block(input)
3030
}
3131

32-
typealias CreatePetWithFormSignature = @Sendable (Operations.CreatePetWithForm.Input) async throws ->
33-
Operations.CreatePetWithForm.Output
32+
typealias CreatePetWithFormSignature =
33+
@Sendable (Operations.CreatePetWithForm.Input) async throws -> Operations.CreatePetWithForm.Output
3434
var createPetWithFormBlock: CreatePetWithFormSignature?
3535
func createPetWithForm(_ input: Operations.CreatePetWithForm.Input) async throws
3636
-> Operations.CreatePetWithForm.Output
@@ -67,26 +67,26 @@ struct TestClient: APIProtocol {
6767
return try await block(input)
6868
}
6969

70-
typealias UploadAvatarForPetSignature = @Sendable (Operations.UploadAvatarForPet.Input) async throws ->
71-
Operations.UploadAvatarForPet.Output
70+
typealias UploadAvatarForPetSignature =
71+
@Sendable (Operations.UploadAvatarForPet.Input) async throws -> Operations.UploadAvatarForPet.Output
7272
var uploadAvatarForPetBlock: UploadAvatarForPetSignature?
7373
func uploadAvatarForPet(_ input: Operations.UploadAvatarForPet.Input) async throws
7474
-> Operations.UploadAvatarForPet.Output
7575
{
7676
guard let block = uploadAvatarForPetBlock else { throw UnspecifiedBlockError() }
7777
return try await block(input)
7878
}
79-
typealias MultipartDownloadTypedSignature = @Sendable (Operations.MultipartDownloadTyped.Input) async throws ->
80-
Operations.MultipartDownloadTyped.Output
79+
typealias MultipartDownloadTypedSignature =
80+
@Sendable (Operations.MultipartDownloadTyped.Input) async throws -> Operations.MultipartDownloadTyped.Output
8181
var multipartDownloadTypedBlock: MultipartDownloadTypedSignature?
8282
func multipartDownloadTyped(_ input: Operations.MultipartDownloadTyped.Input) async throws
8383
-> Operations.MultipartDownloadTyped.Output
8484
{
8585
guard let block = multipartDownloadTypedBlock else { throw UnspecifiedBlockError() }
8686
return try await block(input)
8787
}
88-
typealias MultipartUploadTypedSignature = @Sendable (Operations.MultipartUploadTyped.Input) async throws ->
89-
Operations.MultipartUploadTyped.Output
88+
typealias MultipartUploadTypedSignature =
89+
@Sendable (Operations.MultipartUploadTyped.Input) async throws -> Operations.MultipartUploadTyped.Output
9090
var multipartUploadTypedBlock: MultipartUploadTypedSignature?
9191
func multipartUploadTyped(_ input: Operations.MultipartUploadTyped.Input) async throws
9292
-> Operations.MultipartUploadTyped.Output

0 commit comments

Comments
 (0)