Skip to content

Potential parsing bug against service options #520

@paralin

Description

@paralin
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions