|
|
@@ -46,21 +46,21 @@ final class ClientCodeTranslatorSnippetBasedTests: XCTestCase {
|
|
|
public protocol NamespaceA_ServiceAClientProtocol: Sendable {
|
|
|
/// Documentation for MethodA
|
|
|
func methodA<R>(
|
|
|
- request: ClientRequest.Single<NamespaceA.ServiceA.Methods.MethodA.Input>,
|
|
|
- serializer: some MessageSerializer<NamespaceA.ServiceA.Methods.MethodA.Input>,
|
|
|
- deserializer: some MessageDeserializer<NamespaceA.ServiceA.Methods.MethodA.Output>,
|
|
|
- _ body: @Sendable @escaping (ClientResponse.Single<NamespaceA.ServiceA.Methods.MethodA.Output>) async throws -> R
|
|
|
+ request: ClientRequest.Single<NamespaceA.ServiceA.Method.MethodA.Input>,
|
|
|
+ serializer: some MessageSerializer<NamespaceA.ServiceA.Method.MethodA.Input>,
|
|
|
+ deserializer: some MessageDeserializer<NamespaceA.ServiceA.Method.MethodA.Output>,
|
|
|
+ _ body: @Sendable @escaping (ClientResponse.Single<NamespaceA.ServiceA.Method.MethodA.Output>) async throws -> R
|
|
|
) async throws -> R where R: Sendable
|
|
|
}
|
|
|
extension NamespaceA.ServiceA.ClientProtocol {
|
|
|
public func methodA<R>(
|
|
|
- request: ClientRequest.Single<NamespaceA.ServiceA.Methods.MethodA.Input>,
|
|
|
- _ body: @Sendable @escaping (ClientResponse.Single<NamespaceA.ServiceA.Methods.MethodA.Output>) async throws -> R
|
|
|
+ request: ClientRequest.Single<NamespaceA.ServiceA.Method.MethodA.Input>,
|
|
|
+ _ body: @Sendable @escaping (ClientResponse.Single<NamespaceA.ServiceA.Method.MethodA.Output>) async throws -> R
|
|
|
) async throws -> R where R: Sendable {
|
|
|
try await self.methodA(
|
|
|
request: request,
|
|
|
- serializer: ProtobufSerializer<NamespaceA.ServiceA.Methods.MethodA.Input>(),
|
|
|
- deserializer: ProtobufDeserializer<NamespaceA.ServiceA.Methods.MethodA.Output>(),
|
|
|
+ serializer: ProtobufSerializer<NamespaceA.ServiceA.Method.MethodA.Input>(),
|
|
|
+ deserializer: ProtobufDeserializer<NamespaceA.ServiceA.Method.MethodA.Output>(),
|
|
|
body
|
|
|
)
|
|
|
}
|
|
|
@@ -75,14 +75,14 @@ final class ClientCodeTranslatorSnippetBasedTests: XCTestCase {
|
|
|
|
|
|
/// Documentation for MethodA
|
|
|
public func methodA<R>(
|
|
|
- request: ClientRequest.Single<NamespaceA.ServiceA.Methods.MethodA.Input>,
|
|
|
- serializer: some MessageSerializer<NamespaceA.ServiceA.Methods.MethodA.Input>,
|
|
|
- deserializer: some MessageDeserializer<NamespaceA.ServiceA.Methods.MethodA.Output>,
|
|
|
- _ body: @Sendable @escaping (ClientResponse.Single<NamespaceA.ServiceA.Methods.MethodA.Output>) async throws -> R
|
|
|
+ request: ClientRequest.Single<NamespaceA.ServiceA.Method.MethodA.Input>,
|
|
|
+ serializer: some MessageSerializer<NamespaceA.ServiceA.Method.MethodA.Input>,
|
|
|
+ deserializer: some MessageDeserializer<NamespaceA.ServiceA.Method.MethodA.Output>,
|
|
|
+ _ body: @Sendable @escaping (ClientResponse.Single<NamespaceA.ServiceA.Method.MethodA.Output>) async throws -> R
|
|
|
) async throws -> R where R: Sendable {
|
|
|
try await self.client.unary(
|
|
|
request: request,
|
|
|
- descriptor: NamespaceA.ServiceA.Methods.MethodA.descriptor,
|
|
|
+ descriptor: NamespaceA.ServiceA.Method.MethodA.descriptor,
|
|
|
serializer: serializer,
|
|
|
deserializer: deserializer,
|
|
|
handler: body
|
|
|
@@ -119,21 +119,21 @@ final class ClientCodeTranslatorSnippetBasedTests: XCTestCase {
|
|
|
public protocol NamespaceA_ServiceAClientProtocol: Sendable {
|
|
|
/// Documentation for MethodA
|
|
|
func methodA<R>(
|
|
|
- request: ClientRequest.Stream<NamespaceA.ServiceA.Methods.MethodA.Input>,
|
|
|
- serializer: some MessageSerializer<NamespaceA.ServiceA.Methods.MethodA.Input>,
|
|
|
- deserializer: some MessageDeserializer<NamespaceA.ServiceA.Methods.MethodA.Output>,
|
|
|
- _ body: @Sendable @escaping (ClientResponse.Single<NamespaceA.ServiceA.Methods.MethodA.Output>) async throws -> R
|
|
|
+ request: ClientRequest.Stream<NamespaceA.ServiceA.Method.MethodA.Input>,
|
|
|
+ serializer: some MessageSerializer<NamespaceA.ServiceA.Method.MethodA.Input>,
|
|
|
+ deserializer: some MessageDeserializer<NamespaceA.ServiceA.Method.MethodA.Output>,
|
|
|
+ _ body: @Sendable @escaping (ClientResponse.Single<NamespaceA.ServiceA.Method.MethodA.Output>) async throws -> R
|
|
|
) async throws -> R where R: Sendable
|
|
|
}
|
|
|
extension NamespaceA.ServiceA.ClientProtocol {
|
|
|
public func methodA<R>(
|
|
|
- request: ClientRequest.Stream<NamespaceA.ServiceA.Methods.MethodA.Input>,
|
|
|
- _ body: @Sendable @escaping (ClientResponse.Single<NamespaceA.ServiceA.Methods.MethodA.Output>) async throws -> R
|
|
|
+ request: ClientRequest.Stream<NamespaceA.ServiceA.Method.MethodA.Input>,
|
|
|
+ _ body: @Sendable @escaping (ClientResponse.Single<NamespaceA.ServiceA.Method.MethodA.Output>) async throws -> R
|
|
|
) async throws -> R where R: Sendable {
|
|
|
try await self.methodA(
|
|
|
request: request,
|
|
|
- serializer: ProtobufSerializer<NamespaceA.ServiceA.Methods.MethodA.Input>(),
|
|
|
- deserializer: ProtobufDeserializer<NamespaceA.ServiceA.Methods.MethodA.Output>(),
|
|
|
+ serializer: ProtobufSerializer<NamespaceA.ServiceA.Method.MethodA.Input>(),
|
|
|
+ deserializer: ProtobufDeserializer<NamespaceA.ServiceA.Method.MethodA.Output>(),
|
|
|
body
|
|
|
)
|
|
|
}
|
|
|
@@ -148,14 +148,14 @@ final class ClientCodeTranslatorSnippetBasedTests: XCTestCase {
|
|
|
|
|
|
/// Documentation for MethodA
|
|
|
public func methodA<R>(
|
|
|
- request: ClientRequest.Stream<NamespaceA.ServiceA.Methods.MethodA.Input>,
|
|
|
- serializer: some MessageSerializer<NamespaceA.ServiceA.Methods.MethodA.Input>,
|
|
|
- deserializer: some MessageDeserializer<NamespaceA.ServiceA.Methods.MethodA.Output>,
|
|
|
- _ body: @Sendable @escaping (ClientResponse.Single<NamespaceA.ServiceA.Methods.MethodA.Output>) async throws -> R
|
|
|
+ request: ClientRequest.Stream<NamespaceA.ServiceA.Method.MethodA.Input>,
|
|
|
+ serializer: some MessageSerializer<NamespaceA.ServiceA.Method.MethodA.Input>,
|
|
|
+ deserializer: some MessageDeserializer<NamespaceA.ServiceA.Method.MethodA.Output>,
|
|
|
+ _ body: @Sendable @escaping (ClientResponse.Single<NamespaceA.ServiceA.Method.MethodA.Output>) async throws -> R
|
|
|
) async throws -> R where R: Sendable {
|
|
|
try await self.client.clientStreaming(
|
|
|
request: request,
|
|
|
- descriptor: NamespaceA.ServiceA.Methods.MethodA.descriptor,
|
|
|
+ descriptor: NamespaceA.ServiceA.Method.MethodA.descriptor,
|
|
|
serializer: serializer,
|
|
|
deserializer: deserializer,
|
|
|
handler: body
|
|
|
@@ -192,21 +192,21 @@ final class ClientCodeTranslatorSnippetBasedTests: XCTestCase {
|
|
|
public protocol NamespaceA_ServiceAClientProtocol: Sendable {
|
|
|
/// Documentation for MethodA
|
|
|
func methodA<R>(
|
|
|
- request: ClientRequest.Single<NamespaceA.ServiceA.Methods.MethodA.Input>,
|
|
|
- serializer: some MessageSerializer<NamespaceA.ServiceA.Methods.MethodA.Input>,
|
|
|
- deserializer: some MessageDeserializer<NamespaceA.ServiceA.Methods.MethodA.Output>,
|
|
|
- _ body: @Sendable @escaping (ClientResponse.Stream<NamespaceA.ServiceA.Methods.MethodA.Output>) async throws -> R
|
|
|
+ request: ClientRequest.Single<NamespaceA.ServiceA.Method.MethodA.Input>,
|
|
|
+ serializer: some MessageSerializer<NamespaceA.ServiceA.Method.MethodA.Input>,
|
|
|
+ deserializer: some MessageDeserializer<NamespaceA.ServiceA.Method.MethodA.Output>,
|
|
|
+ _ body: @Sendable @escaping (ClientResponse.Stream<NamespaceA.ServiceA.Method.MethodA.Output>) async throws -> R
|
|
|
) async throws -> R where R: Sendable
|
|
|
}
|
|
|
extension NamespaceA.ServiceA.ClientProtocol {
|
|
|
public func methodA<R>(
|
|
|
- request: ClientRequest.Single<NamespaceA.ServiceA.Methods.MethodA.Input>,
|
|
|
- _ body: @Sendable @escaping (ClientResponse.Stream<NamespaceA.ServiceA.Methods.MethodA.Output>) async throws -> R
|
|
|
+ request: ClientRequest.Single<NamespaceA.ServiceA.Method.MethodA.Input>,
|
|
|
+ _ body: @Sendable @escaping (ClientResponse.Stream<NamespaceA.ServiceA.Method.MethodA.Output>) async throws -> R
|
|
|
) async throws -> R where R: Sendable {
|
|
|
try await self.methodA(
|
|
|
request: request,
|
|
|
- serializer: ProtobufSerializer<NamespaceA.ServiceA.Methods.MethodA.Input>(),
|
|
|
- deserializer: ProtobufDeserializer<NamespaceA.ServiceA.Methods.MethodA.Output>(),
|
|
|
+ serializer: ProtobufSerializer<NamespaceA.ServiceA.Method.MethodA.Input>(),
|
|
|
+ deserializer: ProtobufDeserializer<NamespaceA.ServiceA.Method.MethodA.Output>(),
|
|
|
body
|
|
|
)
|
|
|
}
|
|
|
@@ -221,14 +221,14 @@ final class ClientCodeTranslatorSnippetBasedTests: XCTestCase {
|
|
|
|
|
|
/// Documentation for MethodA
|
|
|
public func methodA<R>(
|
|
|
- request: ClientRequest.Single<NamespaceA.ServiceA.Methods.MethodA.Input>,
|
|
|
- serializer: some MessageSerializer<NamespaceA.ServiceA.Methods.MethodA.Input>,
|
|
|
- deserializer: some MessageDeserializer<NamespaceA.ServiceA.Methods.MethodA.Output>,
|
|
|
- _ body: @Sendable @escaping (ClientResponse.Stream<NamespaceA.ServiceA.Methods.MethodA.Output>) async throws -> R
|
|
|
+ request: ClientRequest.Single<NamespaceA.ServiceA.Method.MethodA.Input>,
|
|
|
+ serializer: some MessageSerializer<NamespaceA.ServiceA.Method.MethodA.Input>,
|
|
|
+ deserializer: some MessageDeserializer<NamespaceA.ServiceA.Method.MethodA.Output>,
|
|
|
+ _ body: @Sendable @escaping (ClientResponse.Stream<NamespaceA.ServiceA.Method.MethodA.Output>) async throws -> R
|
|
|
) async throws -> R where R: Sendable {
|
|
|
try await self.client.serverStreaming(
|
|
|
request: request,
|
|
|
- descriptor: NamespaceA.ServiceA.Methods.MethodA.descriptor,
|
|
|
+ descriptor: NamespaceA.ServiceA.Method.MethodA.descriptor,
|
|
|
serializer: serializer,
|
|
|
deserializer: deserializer,
|
|
|
handler: body
|
|
|
@@ -265,21 +265,21 @@ final class ClientCodeTranslatorSnippetBasedTests: XCTestCase {
|
|
|
public protocol NamespaceA_ServiceAClientProtocol: Sendable {
|
|
|
/// Documentation for MethodA
|
|
|
func methodA<R>(
|
|
|
- request: ClientRequest.Stream<NamespaceA.ServiceA.Methods.MethodA.Input>,
|
|
|
- serializer: some MessageSerializer<NamespaceA.ServiceA.Methods.MethodA.Input>,
|
|
|
- deserializer: some MessageDeserializer<NamespaceA.ServiceA.Methods.MethodA.Output>,
|
|
|
- _ body: @Sendable @escaping (ClientResponse.Stream<NamespaceA.ServiceA.Methods.MethodA.Output>) async throws -> R
|
|
|
+ request: ClientRequest.Stream<NamespaceA.ServiceA.Method.MethodA.Input>,
|
|
|
+ serializer: some MessageSerializer<NamespaceA.ServiceA.Method.MethodA.Input>,
|
|
|
+ deserializer: some MessageDeserializer<NamespaceA.ServiceA.Method.MethodA.Output>,
|
|
|
+ _ body: @Sendable @escaping (ClientResponse.Stream<NamespaceA.ServiceA.Method.MethodA.Output>) async throws -> R
|
|
|
) async throws -> R where R: Sendable
|
|
|
}
|
|
|
extension NamespaceA.ServiceA.ClientProtocol {
|
|
|
public func methodA<R>(
|
|
|
- request: ClientRequest.Stream<NamespaceA.ServiceA.Methods.MethodA.Input>,
|
|
|
- _ body: @Sendable @escaping (ClientResponse.Stream<NamespaceA.ServiceA.Methods.MethodA.Output>) async throws -> R
|
|
|
+ request: ClientRequest.Stream<NamespaceA.ServiceA.Method.MethodA.Input>,
|
|
|
+ _ body: @Sendable @escaping (ClientResponse.Stream<NamespaceA.ServiceA.Method.MethodA.Output>) async throws -> R
|
|
|
) async throws -> R where R: Sendable {
|
|
|
try await self.methodA(
|
|
|
request: request,
|
|
|
- serializer: ProtobufSerializer<NamespaceA.ServiceA.Methods.MethodA.Input>(),
|
|
|
- deserializer: ProtobufDeserializer<NamespaceA.ServiceA.Methods.MethodA.Output>(),
|
|
|
+ serializer: ProtobufSerializer<NamespaceA.ServiceA.Method.MethodA.Input>(),
|
|
|
+ deserializer: ProtobufDeserializer<NamespaceA.ServiceA.Method.MethodA.Output>(),
|
|
|
body
|
|
|
)
|
|
|
}
|
|
|
@@ -294,14 +294,14 @@ final class ClientCodeTranslatorSnippetBasedTests: XCTestCase {
|
|
|
|
|
|
/// Documentation for MethodA
|
|
|
public func methodA<R>(
|
|
|
- request: ClientRequest.Stream<NamespaceA.ServiceA.Methods.MethodA.Input>,
|
|
|
- serializer: some MessageSerializer<NamespaceA.ServiceA.Methods.MethodA.Input>,
|
|
|
- deserializer: some MessageDeserializer<NamespaceA.ServiceA.Methods.MethodA.Output>,
|
|
|
- _ body: @Sendable @escaping (ClientResponse.Stream<NamespaceA.ServiceA.Methods.MethodA.Output>) async throws -> R
|
|
|
+ request: ClientRequest.Stream<NamespaceA.ServiceA.Method.MethodA.Input>,
|
|
|
+ serializer: some MessageSerializer<NamespaceA.ServiceA.Method.MethodA.Input>,
|
|
|
+ deserializer: some MessageDeserializer<NamespaceA.ServiceA.Method.MethodA.Output>,
|
|
|
+ _ body: @Sendable @escaping (ClientResponse.Stream<NamespaceA.ServiceA.Method.MethodA.Output>) async throws -> R
|
|
|
) async throws -> R where R: Sendable {
|
|
|
try await self.client.bidirectionalStreaming(
|
|
|
request: request,
|
|
|
- descriptor: NamespaceA.ServiceA.Methods.MethodA.descriptor,
|
|
|
+ descriptor: NamespaceA.ServiceA.Method.MethodA.descriptor,
|
|
|
serializer: serializer,
|
|
|
deserializer: deserializer,
|
|
|
handler: body
|
|
|
@@ -317,7 +317,7 @@ final class ClientCodeTranslatorSnippetBasedTests: XCTestCase {
|
|
|
)
|
|
|
}
|
|
|
|
|
|
- func testClientCodeTranslatorMultipleMethods() throws {
|
|
|
+ func testClientCodeTranslatorMultipleMethod() throws {
|
|
|
let methodA = MethodDescriptor(
|
|
|
documentation: "/// Documentation for MethodA",
|
|
|
name: Name(base: "MethodA", generatedUpperCase: "MethodA", generatedLowerCase: "methodA"),
|
|
|
@@ -346,41 +346,41 @@ final class ClientCodeTranslatorSnippetBasedTests: XCTestCase {
|
|
|
package protocol NamespaceA_ServiceAClientProtocol: Sendable {
|
|
|
/// Documentation for MethodA
|
|
|
func methodA<R>(
|
|
|
- request: ClientRequest.Stream<NamespaceA.ServiceA.Methods.MethodA.Input>,
|
|
|
- serializer: some MessageSerializer<NamespaceA.ServiceA.Methods.MethodA.Input>,
|
|
|
- deserializer: some MessageDeserializer<NamespaceA.ServiceA.Methods.MethodA.Output>,
|
|
|
- _ body: @Sendable @escaping (ClientResponse.Single<NamespaceA.ServiceA.Methods.MethodA.Output>) async throws -> R
|
|
|
+ request: ClientRequest.Stream<NamespaceA.ServiceA.Method.MethodA.Input>,
|
|
|
+ serializer: some MessageSerializer<NamespaceA.ServiceA.Method.MethodA.Input>,
|
|
|
+ deserializer: some MessageDeserializer<NamespaceA.ServiceA.Method.MethodA.Output>,
|
|
|
+ _ body: @Sendable @escaping (ClientResponse.Single<NamespaceA.ServiceA.Method.MethodA.Output>) async throws -> R
|
|
|
) async throws -> R where R: Sendable
|
|
|
|
|
|
/// Documentation for MethodB
|
|
|
func methodB<R>(
|
|
|
- request: ClientRequest.Single<NamespaceA.ServiceA.Methods.MethodB.Input>,
|
|
|
- serializer: some MessageSerializer<NamespaceA.ServiceA.Methods.MethodB.Input>,
|
|
|
- deserializer: some MessageDeserializer<NamespaceA.ServiceA.Methods.MethodB.Output>,
|
|
|
- _ body: @Sendable @escaping (ClientResponse.Stream<NamespaceA.ServiceA.Methods.MethodB.Output>) async throws -> R
|
|
|
+ request: ClientRequest.Single<NamespaceA.ServiceA.Method.MethodB.Input>,
|
|
|
+ serializer: some MessageSerializer<NamespaceA.ServiceA.Method.MethodB.Input>,
|
|
|
+ deserializer: some MessageDeserializer<NamespaceA.ServiceA.Method.MethodB.Output>,
|
|
|
+ _ body: @Sendable @escaping (ClientResponse.Stream<NamespaceA.ServiceA.Method.MethodB.Output>) async throws -> R
|
|
|
) async throws -> R where R: Sendable
|
|
|
}
|
|
|
extension NamespaceA.ServiceA.ClientProtocol {
|
|
|
package func methodA<R>(
|
|
|
- request: ClientRequest.Stream<NamespaceA.ServiceA.Methods.MethodA.Input>,
|
|
|
- _ body: @Sendable @escaping (ClientResponse.Single<NamespaceA.ServiceA.Methods.MethodA.Output>) async throws -> R
|
|
|
+ request: ClientRequest.Stream<NamespaceA.ServiceA.Method.MethodA.Input>,
|
|
|
+ _ body: @Sendable @escaping (ClientResponse.Single<NamespaceA.ServiceA.Method.MethodA.Output>) async throws -> R
|
|
|
) async throws -> R where R: Sendable {
|
|
|
try await self.methodA(
|
|
|
request: request,
|
|
|
- serializer: ProtobufSerializer<NamespaceA.ServiceA.Methods.MethodA.Input>(),
|
|
|
- deserializer: ProtobufDeserializer<NamespaceA.ServiceA.Methods.MethodA.Output>(),
|
|
|
+ serializer: ProtobufSerializer<NamespaceA.ServiceA.Method.MethodA.Input>(),
|
|
|
+ deserializer: ProtobufDeserializer<NamespaceA.ServiceA.Method.MethodA.Output>(),
|
|
|
body
|
|
|
)
|
|
|
}
|
|
|
|
|
|
package func methodB<R>(
|
|
|
- request: ClientRequest.Single<NamespaceA.ServiceA.Methods.MethodB.Input>,
|
|
|
- _ body: @Sendable @escaping (ClientResponse.Stream<NamespaceA.ServiceA.Methods.MethodB.Output>) async throws -> R
|
|
|
+ request: ClientRequest.Single<NamespaceA.ServiceA.Method.MethodB.Input>,
|
|
|
+ _ body: @Sendable @escaping (ClientResponse.Stream<NamespaceA.ServiceA.Method.MethodB.Output>) async throws -> R
|
|
|
) async throws -> R where R: Sendable {
|
|
|
try await self.methodB(
|
|
|
request: request,
|
|
|
- serializer: ProtobufSerializer<NamespaceA.ServiceA.Methods.MethodB.Input>(),
|
|
|
- deserializer: ProtobufDeserializer<NamespaceA.ServiceA.Methods.MethodB.Output>(),
|
|
|
+ serializer: ProtobufSerializer<NamespaceA.ServiceA.Method.MethodB.Input>(),
|
|
|
+ deserializer: ProtobufDeserializer<NamespaceA.ServiceA.Method.MethodB.Output>(),
|
|
|
body
|
|
|
)
|
|
|
}
|
|
|
@@ -395,14 +395,14 @@ final class ClientCodeTranslatorSnippetBasedTests: XCTestCase {
|
|
|
|
|
|
/// Documentation for MethodA
|
|
|
package func methodA<R>(
|
|
|
- request: ClientRequest.Stream<NamespaceA.ServiceA.Methods.MethodA.Input>,
|
|
|
- serializer: some MessageSerializer<NamespaceA.ServiceA.Methods.MethodA.Input>,
|
|
|
- deserializer: some MessageDeserializer<NamespaceA.ServiceA.Methods.MethodA.Output>,
|
|
|
- _ body: @Sendable @escaping (ClientResponse.Single<NamespaceA.ServiceA.Methods.MethodA.Output>) async throws -> R
|
|
|
+ request: ClientRequest.Stream<NamespaceA.ServiceA.Method.MethodA.Input>,
|
|
|
+ serializer: some MessageSerializer<NamespaceA.ServiceA.Method.MethodA.Input>,
|
|
|
+ deserializer: some MessageDeserializer<NamespaceA.ServiceA.Method.MethodA.Output>,
|
|
|
+ _ body: @Sendable @escaping (ClientResponse.Single<NamespaceA.ServiceA.Method.MethodA.Output>) async throws -> R
|
|
|
) async throws -> R where R: Sendable {
|
|
|
try await self.client.clientStreaming(
|
|
|
request: request,
|
|
|
- descriptor: NamespaceA.ServiceA.Methods.MethodA.descriptor,
|
|
|
+ descriptor: NamespaceA.ServiceA.Method.MethodA.descriptor,
|
|
|
serializer: serializer,
|
|
|
deserializer: deserializer,
|
|
|
handler: body
|
|
|
@@ -411,14 +411,14 @@ final class ClientCodeTranslatorSnippetBasedTests: XCTestCase {
|
|
|
|
|
|
/// Documentation for MethodB
|
|
|
package func methodB<R>(
|
|
|
- request: ClientRequest.Single<NamespaceA.ServiceA.Methods.MethodB.Input>,
|
|
|
- serializer: some MessageSerializer<NamespaceA.ServiceA.Methods.MethodB.Input>,
|
|
|
- deserializer: some MessageDeserializer<NamespaceA.ServiceA.Methods.MethodB.Output>,
|
|
|
- _ body: @Sendable @escaping (ClientResponse.Stream<NamespaceA.ServiceA.Methods.MethodB.Output>) async throws -> R
|
|
|
+ request: ClientRequest.Single<NamespaceA.ServiceA.Method.MethodB.Input>,
|
|
|
+ serializer: some MessageSerializer<NamespaceA.ServiceA.Method.MethodB.Input>,
|
|
|
+ deserializer: some MessageDeserializer<NamespaceA.ServiceA.Method.MethodB.Output>,
|
|
|
+ _ body: @Sendable @escaping (ClientResponse.Stream<NamespaceA.ServiceA.Method.MethodB.Output>) async throws -> R
|
|
|
) async throws -> R where R: Sendable {
|
|
|
try await self.client.serverStreaming(
|
|
|
request: request,
|
|
|
- descriptor: NamespaceA.ServiceA.Methods.MethodB.descriptor,
|
|
|
+ descriptor: NamespaceA.ServiceA.Method.MethodB.descriptor,
|
|
|
serializer: serializer,
|
|
|
deserializer: deserializer,
|
|
|
handler: body
|
|
|
@@ -455,21 +455,21 @@ final class ClientCodeTranslatorSnippetBasedTests: XCTestCase {
|
|
|
internal protocol ServiceAClientProtocol: Sendable {
|
|
|
/// Documentation for MethodA
|
|
|
func methodA<R>(
|
|
|
- request: ClientRequest.Single<ServiceA.Methods.MethodA.Input>,
|
|
|
- serializer: some MessageSerializer<ServiceA.Methods.MethodA.Input>,
|
|
|
- deserializer: some MessageDeserializer<ServiceA.Methods.MethodA.Output>,
|
|
|
- _ body: @Sendable @escaping (ClientResponse.Single<ServiceA.Methods.MethodA.Output>) async throws -> R
|
|
|
+ request: ClientRequest.Single<ServiceA.Method.MethodA.Input>,
|
|
|
+ serializer: some MessageSerializer<ServiceA.Method.MethodA.Input>,
|
|
|
+ deserializer: some MessageDeserializer<ServiceA.Method.MethodA.Output>,
|
|
|
+ _ body: @Sendable @escaping (ClientResponse.Single<ServiceA.Method.MethodA.Output>) async throws -> R
|
|
|
) async throws -> R where R: Sendable
|
|
|
}
|
|
|
extension ServiceA.ClientProtocol {
|
|
|
internal func methodA<R>(
|
|
|
- request: ClientRequest.Single<ServiceA.Methods.MethodA.Input>,
|
|
|
- _ body: @Sendable @escaping (ClientResponse.Single<ServiceA.Methods.MethodA.Output>) async throws -> R
|
|
|
+ request: ClientRequest.Single<ServiceA.Method.MethodA.Input>,
|
|
|
+ _ body: @Sendable @escaping (ClientResponse.Single<ServiceA.Method.MethodA.Output>) async throws -> R
|
|
|
) async throws -> R where R: Sendable {
|
|
|
try await self.methodA(
|
|
|
request: request,
|
|
|
- serializer: ProtobufSerializer<ServiceA.Methods.MethodA.Input>(),
|
|
|
- deserializer: ProtobufDeserializer<ServiceA.Methods.MethodA.Output>(),
|
|
|
+ serializer: ProtobufSerializer<ServiceA.Method.MethodA.Input>(),
|
|
|
+ deserializer: ProtobufDeserializer<ServiceA.Method.MethodA.Output>(),
|
|
|
body
|
|
|
)
|
|
|
}
|
|
|
@@ -484,14 +484,14 @@ final class ClientCodeTranslatorSnippetBasedTests: XCTestCase {
|
|
|
|
|
|
/// Documentation for MethodA
|
|
|
internal func methodA<R>(
|
|
|
- request: ClientRequest.Single<ServiceA.Methods.MethodA.Input>,
|
|
|
- serializer: some MessageSerializer<ServiceA.Methods.MethodA.Input>,
|
|
|
- deserializer: some MessageDeserializer<ServiceA.Methods.MethodA.Output>,
|
|
|
- _ body: @Sendable @escaping (ClientResponse.Single<ServiceA.Methods.MethodA.Output>) async throws -> R
|
|
|
+ request: ClientRequest.Single<ServiceA.Method.MethodA.Input>,
|
|
|
+ serializer: some MessageSerializer<ServiceA.Method.MethodA.Input>,
|
|
|
+ deserializer: some MessageDeserializer<ServiceA.Method.MethodA.Output>,
|
|
|
+ _ body: @Sendable @escaping (ClientResponse.Single<ServiceA.Method.MethodA.Output>) async throws -> R
|
|
|
) async throws -> R where R: Sendable {
|
|
|
try await self.client.unary(
|
|
|
request: request,
|
|
|
- descriptor: ServiceA.Methods.MethodA.descriptor,
|
|
|
+ descriptor: ServiceA.Method.MethodA.descriptor,
|
|
|
serializer: serializer,
|
|
|
deserializer: deserializer,
|
|
|
handler: body
|