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

Comments

Projects
None yet
2 participants
@paralin

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

This comment has been minimized.

paralin commented Dec 7, 2016

Doing this fixes it:

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

@dcodeIO dcodeIO added the bug label Dec 7, 2016

@dcodeIO dcodeIO closed this in 38d867f Dec 7, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment