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

How to specify a default value for parameters in gRPC google.api.http #2

Open
huan opened this issue Feb 19, 2021 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@huan
Copy link
Member

huan commented Feb 19, 2021

What I want to do is:

  rpc DirtyPayload (puppet.DirtyPayloadRequest) returns (puppet.DirtyPayloadResponse) {
    option (google.api.http) = {
      additional_bindings {
        put: "/message/{id}/dirty"
        default_value: type=PAYLOAD_TYPE_MESSAGE
      }
      additional_bindings {
        put: "/contacts/{id}/dirty
        default_value: type=PAYLOAD_TYPE_CONTACT
      }
  }

The default_value: type=PAYLOAD_TYPE_MESSAGE is what I want to do, but it seems there's not an easy way to do that.

I'm trying to use

put: "/message/{id}/dirty{type=PAYLOAD_TYPE_MESSAGE}"
put: "/contacts/{id}/dirty/{type=PAYLOAD_TYPE_CONTACT}"

now, but it seems to have other problems...

Related Issues

@huan huan added the enhancement New feature or request label Feb 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant