Add annotation for the REST gateway
authorJulien Andrieux <julien@pantomath.io>
Fri, 6 Oct 2017 14:18:46 +0000 (16:18 +0200)
committerJulien Andrieux <julien@pantomath.io>
Fri, 6 Oct 2017 14:18:46 +0000 (16:18 +0200)
api/api.proto

index 023ab49..148d134 100644 (file)
@@ -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