Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option name expected #254

Closed
pusponegorow opened this issue Oct 12, 2023 · 0 comments
Closed

Option name expected #254

pusponegorow opened this issue Oct 12, 2023 · 0 comments

Comments

@pusponegorow
Copy link

pusponegorow commented Oct 12, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant