Skip to content

Commit f24e3a2

Browse files
authored
Merge pull request #1 from yixinguo-ssc/fix/grpc-gateway-proto3-optional
fix(grpc): Fix error "proto3 disallow 'optional' label"
2 parents 28a6183 + 03ef973 commit f24e3a2

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

kong/tools/grpc.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ function _M.new()
7777
protoc_instance:addpath(v)
7878
end
7979
protoc_instance.include_imports = true
80+
protoc_instance.proto3_optional = true
8081

8182
return setmetatable({
8283
protoc_instance = protoc_instance,

spec/fixtures/grpc/targetservice.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ service Bouncer {
5656

5757
message HelloRequest {
5858
string greeting = 1;
59-
bool boolean_test = 2;
59+
optional bool boolean_test = 2;
6060
}
6161

6262
message HelloResponse {

0 commit comments

Comments
 (0)