From 8b4a741c319e2d876ec87dc41664ed6d171ef720 Mon Sep 17 00:00:00 2001 From: Julien Andrieux Date: Fri, 6 Oct 2017 16:18:46 +0200 Subject: [PATCH] Add annotation for the REST gateway --- api/api.proto | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 -- 2.44.0