starwing / lua-protobuf

A Lua module to work with Google protobuf
MIT License
1.71k stars 388 forks source link

Option name expected #254

Closed pusponegorow closed 9 months ago

pusponegorow commented 9 months ago

hi, i'm using protoc-gen-openapiv2 in my proto:

import "protoc-gen-openapiv2/options/annotations.proto";

service VendorService{
  rpc GetList(GetListRequest) returns (GetListResponse){
    option (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
      parameters: {
        headers: {
          name: "Authorization";
          description: "Bearer token";
          type: STRING,
          required: true;
        };
      };
    };
  }
}

but i got error

/usr/local/share/lua/5.1/protoc.lua:271 Option name expected

i realized the dot is caused an error. i'm using '.' in the beginning of option is rpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation doesnt resolve correctly, so the protoc tell us the using '.' to get openapiv2_operation from an outer scope of package.

can you support '.' in the beginning of option name?