[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:
mustiikhalil
2020-07-20 20:38:50 +03:00
committed by GitHub
parent 2e48c8dd31
commit ff1b73128d
12 changed files with 75 additions and 26 deletions

View File

@@ -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.

View File

@@ -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)
}

View File

@@ -1,4 +1,5 @@
// automatically generated by the FlatBuffers compiler, do not modify
// swiftlint:disable all
import FlatBuffers