-
Notifications
You must be signed in to change notification settings - Fork 132
/
service-annotated.proto
52 lines (36 loc) · 987 Bytes
/
service-annotated.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
syntax = "proto3";
package spec;
import "google/api/annotations.proto";
import "google/protobuf/descriptor.proto";
extend google.protobuf.MethodOptions {
bool rpc_foo = 777777;
string rpc_bar = 888888;
fixed32 rpc_baz = 999999;
uint32 rpc_bay = 101010;
}
extend google.protobuf.ServiceOptions {
bool service_foo = 777777;
}
service AnnotatedService {
option (spec.service_foo) = true;
rpc Get (AnnoGetRequest) returns (AnnoGetResponse) {
option idempotency_level = NO_SIDE_EFFECTS;
option (spec.rpc_foo) = true;
option (spec.rpc_bar) = "hello";
option (spec.rpc_baz) = 9;
option (spec.rpc_bay) = 10;
option (google.api.http) = {
get: "/v1/{name=messages/*}"
additional_bindings {
get: "xxx"
}
additional_bindings {
get: "yyy"
}
};
};
}
message AnnoGetRequest {
}
message AnnoGetResponse {
}