Default to gRPC path if no mapping is provided
I am using protoc-gen-openapi to generate api docs. The project is being built using connectrpc which uses GRPC_SERVICE_FULL_NAME/METHOD_NAME for paths.
We are currently adding this manually for each method, ie.
service MyService {
rpc Foo(FooRequest) returns (FooResponse) {
option (google.api.http) = {
post: "/my.package.v1.MyService/Foo"
body: "*"
};
}
}
Is there an existing way to use the GRPC_SERVICE_FULL_NAME/METHOD_NAME as a default? If not is that something you would consider adding? There is some precedence for this usage in Cloud Endpoints transcoding https://cloud.google.com/endpoints/docs/grpc/transcoding#where_to_configure_transcoding
Yes, in my opinion, the information corresponding to this option (google.api.http)... statement can theoretically be calculated automatically. If we don't have any special requirements, why should we spend a lot of effort to write it?