mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-25 01:06:11 +00:00
[Swift] Optional Scalars Preparation (#6028)
* Perpares swift to take optional scalars + adds optional string helper method + disables linters in generated code * Small fix for generated code * Update grpc support to alpha 17 for swift
This commit is contained in:
@@ -12,7 +12,7 @@ let package = Package(
|
||||
dependencies: [
|
||||
// Main SwiftNIO package
|
||||
.package(path: "../../swift"),
|
||||
.package(url: "https://github.com/grpc/grpc-swift.git", from: "1.0.0-alpha.9")
|
||||
.package(url: "https://github.com/grpc/grpc-swift.git", from: "1.0.0-alpha.17")
|
||||
],
|
||||
targets: [
|
||||
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
|
||||
|
||||
@@ -53,13 +53,13 @@ public extension GreeterProvider {
|
||||
func handleMethod(_ methodName: String, callHandlerContext: CallHandlerContext) -> GRPCCallHandler? {
|
||||
switch methodName {
|
||||
case "SayHello":
|
||||
return UnaryCallHandler(callHandlerContext: callHandlerContext) { context in
|
||||
return CallHandlerFactory.makeUnary(callHandlerContext: callHandlerContext) { context in
|
||||
return { request in
|
||||
self.SayHello(request, context: context)
|
||||
}
|
||||
}
|
||||
case "SayManyHellos":
|
||||
return ServerStreamingCallHandler(callHandlerContext: callHandlerContext) { context in
|
||||
return CallHandlerFactory.makeServerStreaming(callHandlerContext: callHandlerContext) { context in
|
||||
return { request in
|
||||
self.SayManyHellos(request: request, context: context)
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
// swiftlint:disable all
|
||||
|
||||
import FlatBuffers
|
||||
|
||||
|
||||
Reference in New Issue
Block a user