-
Notifications
You must be signed in to change notification settings - Fork 2.3k
/
Copy pathopenapi_merge_b.proto
44 lines (38 loc) · 1.18 KB
/
openapi_merge_b.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
syntax = "proto3";
option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb";
// Merging Services
//
// This is an example of merging two proto files.
package grpc.gateway.examples.internal.examplepb;
import "google/api/annotations.proto";
// InMessageB represents a message to ServiceB.
message InMessageB {
// Here is the explanation about InMessageB.values
string value = 1;
}
// OutMessageB represents a message returned from ServiceB.
message OutMessageB {
// Here is the explanation about OutMessageB.value
repeated string values = 1;
}
// ServiceB service responds to incoming merge requests.
service ServiceB {
// ServiceB.MethodOne receives InMessageB and returns OutMessageB
//
// Here is the detail explanation about ServiceB.MethodOne.
rpc MethodOne(InMessageB) returns (OutMessageB) {
option (google.api.http) = {
post: "/v1/example/b/1"
body: "*"
};
}
// ServiceB.MethodTwo receives OutMessageB and returns InMessageB
//
// Here is the detail explanation about ServiceB.MethodTwo.
rpc MethodTwo(OutMessageB) returns (InMessageB) {
option (google.api.http) = {
post: "/v1/example/b/2"
body: "*"
};
}
}