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

Potential parsing bug against service options #520

Closed
paralin opened this issue Dec 7, 2016 · 1 comment
Closed

Potential parsing bug against service options #520

paralin opened this issue Dec 7, 2016 · 1 comment
Labels

Comments

@paralin
Copy link

paralin commented Dec 7, 2016

syntax = "proto3";
package myservice;

message DoSomethingRequest {
}

message DoSomethingResponse {
}

service MyService {
  rpc DoSomething(DoSomethingRequest) returns (DoSomethingResponse) {
    option (google.api.http) = {
      get: "/v1/dosomething"
    };
  };
}

Running:

pbjs -t json ./my-service.proto

Error:

Error: illegal token '}', ';' expected (line 15)

I've tried a variety of combinations of } and ; and it doesn't seem to work. The official compiler compiles this fine, though.

@paralin
Copy link
Author

paralin commented Dec 7, 2016

Doing this fixes it:

    option (google.api.http) = {
      get: "/v1/dosomething"
    };;

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

No branches or pull requests

2 participants