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

Default to gRPC path if no mapping is provided #429

Open
Kryan90 opened this issue Feb 21, 2024 · 1 comment
Open

Default to gRPC path if no mapping is provided #429

Kryan90 opened this issue Feb 21, 2024 · 1 comment

Comments

@Kryan90
Copy link

Kryan90 commented Feb 21, 2024

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

@northsea4
Copy link

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?

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

2 participants