Skip to content

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

@huan

Description

@huan

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions