From 7a7e500dcb37f84d2a32d621a4a875beae35f1a4 Mon Sep 17 00:00:00 2001 From: Patrik Nordwall Date: Thu, 15 Mar 2018 19:05:41 +0100 Subject: [PATCH] minor formatting adjustment of templates --- .../templates/ScalaServer/ApiTrait.scala.txt | 7 ++----- .../twirl/templates/ScalaServer/Client.scala.txt | 16 ++++------------ 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/codegen/src/main/twirl/templates/ScalaServer/ApiTrait.scala.txt b/codegen/src/main/twirl/templates/ScalaServer/ApiTrait.scala.txt index 7764c23f6..e4881b447 100644 --- a/codegen/src/main/twirl/templates/ScalaServer/ApiTrait.scala.txt +++ b/codegen/src/main/twirl/templates/ScalaServer/ApiTrait.scala.txt @@ -9,10 +9,7 @@ import akka.stream.scaladsl.Source trait @{service.name} { @for(method <- service.methods) { - def @{method.name}( - in: @method.parameterType - ): - @method.returnType + def @{method.name}(in: @method.parameterType): @method.returnType } } @@ -25,4 +22,4 @@ object @{service.name} { val @serializer.name = @serializer.init } } -} \ No newline at end of file +} diff --git a/codegen/src/main/twirl/templates/ScalaServer/Client.scala.txt b/codegen/src/main/twirl/templates/ScalaServer/Client.scala.txt index 126bdd164..ac1932109 100644 --- a/codegen/src/main/twirl/templates/ScalaServer/Client.scala.txt +++ b/codegen/src/main/twirl/templates/ScalaServer/Client.scala.txt @@ -72,18 +72,10 @@ class @{service.name}Client(channel: Channel, options: CallOptions)(implicit mat } @mapMethodType(methodType: akka.http.grpc.MethodType) = { - @if(methodType == akka.http.grpc.Unary) { - MethodDescriptor.MethodType.UNARY - } - @if(methodType == akka.http.grpc.ClientStreaming) { - MethodDescriptor.MethodType.CLIENT_STREAMING - } - @if(methodType == akka.http.grpc.ServerStreaming) { - MethodDescriptor.MethodType.SERVER_STREAMING - } - @if(methodType == akka.http.grpc.BidiStreaming) { - MethodDescriptor.MethodType.BIDI_STREAMING - } + @if(methodType == akka.http.grpc.Unary) { MethodDescriptor.MethodType.UNARY } + @if(methodType == akka.http.grpc.ClientStreaming) {MethodDescriptor.MethodType.CLIENT_STREAMING } + @if(methodType == akka.http.grpc.ServerStreaming) { MethodDescriptor.MethodType.SERVER_STREAMING } + @if(methodType == akka.http.grpc.BidiStreaming) {MethodDescriptor.MethodType.BIDI_STREAMING } } object @{service.name}Client {