git://git.halfball.org
/
demo-grpc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bfa76b1
)
Add annotation for the REST gateway
author
Julien Andrieux
<julien@pantomath.io>
Fri, 6 Oct 2017 14:18:46 +0000
(16:18 +0200)
committer
Julien Andrieux
<julien@pantomath.io>
Fri, 6 Oct 2017 14:18:46 +0000
(16:18 +0200)
api/api.proto
patch
|
blob
|
history
diff --git
a/api/api.proto
b/api/api.proto
index
023ab49
..
148d134
100644
(file)
--- 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