wechaty/openapi

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

huan opened this issue · 0 comments

huan commented

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