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

Syntax error when parsing complicated service rpc option #5

Open
liiri opened this issue May 11, 2020 · 1 comment
Open

Syntax error when parsing complicated service rpc option #5

liiri opened this issue May 11, 2020 · 1 comment

Comments

@liiri
Copy link

liiri commented May 11, 2020

My proto file:

syntax = "proto3";

package my.proto.v1;

import "google/api/annotations.proto";
import ...

service MyService {
    rpc Create (MyRequest) returns (MyResponse) {
        option (google.api.http).get = "/api/my";
        option (my.custom.option) = {
          value1: "A"
          value2: "B"
        };
    }
}

message MyRequest {
}

message MyResponse {
}

I'm getting syntax error on the custom option:

  message: `Expected "'", ".", "/*", "//", "0", "\\"", "false", "inf", "nan", "true", [ \\r\\n\\t], [0-9], [1-9], [A-Za-z], or [\\-+] but "{" found.`,
@liiri
Copy link
Author

liiri commented May 13, 2020

Also reproduced for less custom option, it seems to be with using an object under option

         option (google.api.http) = {
           patch: "/v1/messages/{message_id}"
           body: "message"
         };

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