-
Notifications
You must be signed in to change notification settings - Fork 654
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2711 from n0v1/feat/method-options
grpc-loader: Expose method options
- Loading branch information
Showing
4 changed files
with
150 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
syntax = "proto3"; | ||
|
||
import "google/api/annotations.proto"; | ||
import "google/api/client.proto"; | ||
import "google/api/httpbody.proto"; | ||
|
||
message Empty {} | ||
|
||
message MethodSignature { | ||
repeated string method_signature = 1; | ||
} | ||
|
||
service Hello { | ||
rpc Hello (Empty) returns (Empty) { | ||
option deprecated = true; | ||
option idempotency_level = NO_SIDE_EFFECTS; | ||
option uninterpreted_option = { | ||
name: { | ||
name_part: 'foo' | ||
is_extension: false | ||
} | ||
identifier_value: 'bar' | ||
positive_int_value: 9007199254740991 | ||
negative_int_value: -9007199254740991 | ||
double_value: 1.2345 | ||
string_value: 'foobar' | ||
aggregate_value: 'foobar' | ||
}; | ||
option (google.api.http) = { | ||
post: "/hello" | ||
body: "*" | ||
response_body: "*" | ||
additional_bindings: {} | ||
}; | ||
option (google.api.method_signature) = 'bar'; | ||
} | ||
rpc HelloWithoutOptions (Empty) returns (Empty) {} | ||
rpc HelloWithSomeOptions (Empty) returns (Empty) { | ||
option deprecated = true; | ||
option (google.api.http) = { | ||
get: "/hello" | ||
additional_bindings: { | ||
get: "/hello-world" | ||
body: "*" | ||
} | ||
}; | ||
} | ||
} |