|
|
@@ -60,12 +60,13 @@ final class ProtobufCodeGeneratorTests: XCTestCase {
|
|
|
import ExtraModule
|
|
|
|
|
|
internal enum Hello_World_Greeter {
|
|
|
+ internal static let descriptor = ServiceDescriptor.hello_world_Greeter
|
|
|
internal enum Method {
|
|
|
internal enum SayHello {
|
|
|
internal typealias Input = Hello_World_HelloRequest
|
|
|
internal typealias Output = Hello_World_HelloReply
|
|
|
internal static let descriptor = MethodDescriptor(
|
|
|
- service: "hello.world.Greeter",
|
|
|
+ service: Hello_World_Greeter.descriptor.fullyQualifiedService,
|
|
|
method: "SayHello"
|
|
|
)
|
|
|
}
|
|
|
@@ -79,6 +80,13 @@ final class ProtobufCodeGeneratorTests: XCTestCase {
|
|
|
internal typealias Client = Hello_World_GreeterClient
|
|
|
}
|
|
|
|
|
|
+ extension ServiceDescriptor {
|
|
|
+ internal static let hello_world_Greeter = Self(
|
|
|
+ package: "hello.world",
|
|
|
+ service: "Greeter"
|
|
|
+ )
|
|
|
+ }
|
|
|
+
|
|
|
/// The greeting service definition.
|
|
|
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
|
|
|
internal protocol Hello_World_GreeterClientProtocol: Sendable {
|
|
|
@@ -175,12 +183,13 @@ final class ProtobufCodeGeneratorTests: XCTestCase {
|
|
|
import ExtraModule
|
|
|
|
|
|
public enum Helloworld_Greeter {
|
|
|
+ public static let descriptor = ServiceDescriptor.helloworld_Greeter
|
|
|
public enum Method {
|
|
|
public enum SayHello {
|
|
|
public typealias Input = Helloworld_HelloRequest
|
|
|
public typealias Output = Helloworld_HelloReply
|
|
|
public static let descriptor = MethodDescriptor(
|
|
|
- service: "helloworld.Greeter",
|
|
|
+ service: Helloworld_Greeter.descriptor.fullyQualifiedService,
|
|
|
method: "SayHello"
|
|
|
)
|
|
|
}
|
|
|
@@ -194,6 +203,13 @@ final class ProtobufCodeGeneratorTests: XCTestCase {
|
|
|
public typealias ServiceProtocol = Helloworld_GreeterServiceProtocol
|
|
|
}
|
|
|
|
|
|
+ extension ServiceDescriptor {
|
|
|
+ public static let helloworld_Greeter = Self(
|
|
|
+ package: "helloworld",
|
|
|
+ service: "Greeter"
|
|
|
+ )
|
|
|
+ }
|
|
|
+
|
|
|
/// The greeting service definition.
|
|
|
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
|
|
|
public protocol Helloworld_GreeterStreamingServiceProtocol: GRPCCore.RegistrableRPCService {
|
|
|
@@ -270,12 +286,13 @@ final class ProtobufCodeGeneratorTests: XCTestCase {
|
|
|
import ExtraModule
|
|
|
|
|
|
package enum Greeter {
|
|
|
+ package static let descriptor = ServiceDescriptor.Greeter
|
|
|
package enum Method {
|
|
|
package enum SayHello {
|
|
|
package typealias Input = HelloRequest
|
|
|
package typealias Output = HelloReply
|
|
|
package static let descriptor = MethodDescriptor(
|
|
|
- service: "Greeter",
|
|
|
+ service: Greeter.descriptor.fullyQualifiedService,
|
|
|
method: "SayHello"
|
|
|
)
|
|
|
}
|
|
|
@@ -293,6 +310,13 @@ final class ProtobufCodeGeneratorTests: XCTestCase {
|
|
|
package typealias Client = GreeterClient
|
|
|
}
|
|
|
|
|
|
+ extension ServiceDescriptor {
|
|
|
+ package static let Greeter = Self(
|
|
|
+ package: "",
|
|
|
+ service: "Greeter"
|
|
|
+ )
|
|
|
+ }
|
|
|
+
|
|
|
/// The greeting service definition.
|
|
|
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
|
|
|
package protocol GreeterStreamingServiceProtocol: GRPCCore.RegistrableRPCService {
|