From: Julien Andrieux Date: Fri, 6 Oct 2017 14:18:46 +0000 (+0200) Subject: Add annotation for the REST gateway X-Git-Url: https://git.halfball.org/?a=commitdiff_plain;h=8b4a741c319e2d876ec87dc41664ed6d171ef720;p=demo-grpc.git Add annotation for the REST gateway --- diff --git a/api/api.proto b/api/api.proto index 023ab49..148d134 100644 --- a/api/api.proto +++ b/api/api.proto @@ -1,10 +1,18 @@ syntax = "proto3"; package api; +import "google/api/annotations.proto"; + message PingMessage { string greeting = 1; } service Ping { - rpc SayHello(PingMessage) returns (PingMessage) {} + rpc SayHello(PingMessage) returns (PingMessage) { + option (google.api.http) = { + post: "/1/ping" + body: "*" + }; + + } } \ No newline at end of file