Support for service / rpc options
See original GitHub issueIs your feature request related to a problem? Please describe. Currently, the protobuf plug-in doesn’t appear to understand options defined on either the service level or rpc (method) level.
Describe the solution you’d like The protobuf v3 spec allows for options defined at the service and rpc (method) level.
Additional context Example (using Google’s http.proto): https://github.com/googleapis/googleapis/blob/2a57c3158a97597941220e64a940760d6a738a69/google/api/http.proto#L129-L136
When using the plug-in today, I get various errors when using service or rpc options:
- When using a built-in option, I get an error regarding an unresolved reference (this reference should be found in the descriptor.proto file):
service MyService {
option idempotency_level = NO_SIDE_EFFECTS;
...
}
- When using a custom option, I get an error regarding extraneous input (after the semicolon in the option):
service MyService
option (company.grpc.custom_rule) = {
my_field: "abc"; // Error after semicolon here
my_list_field: ["a", "b", "c"];
};
...
}
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:18
Top Results From Across the Web
Support for service / rpc options · Issue #110
When using a built-in option, I get an error regarding an unresolved reference (this reference should be found in the descriptor.proto file):.
Read more >Configuring a gRPC service - Cloud Endpoints
To create a gRPC service—whether or not you are using Cloud Endpoints—you specify the interface definition in one or more proto files, which...
Read more >About RPC configuration options - TechDocs - Broadcom Inc.
Protocol-specific options for RPC describes the configuration options for RPC. A single Symantec Protection Engine can support multiple RPC ...
Read more >service.h | Protocol Buffers
The primary purpose of the controller is to provide a way to manipulate settings specific to the RPC implementation and to find out...
Read more >gRPC
gRPC is a modern open source high performance Remote Procedure Call (RPC) framework that can run in any environment. It can efficiently connect...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I wasn’t aware of this… thanks.
Still I have same problem that I get an error on the semi-colon (after
"go-ws-api";
) and on the next line on the first word (version
). The files compile without any issue.Code mostly take from: https://blog.csnet.me/blog/building-a-go-api-grpc-rest-and-openapi-swagger.1/
It would be great if this could be fixed in the plugin! 😄
I’ve just hit this wall as well and it’s really bugs me, since I have a valid file without any syntax highlighting because it’s considered invalid. 😢