Hello,

Trying to get some clarification on the HTTP to gRPC mapping as I would
like to do the following mapping when sending in resource ids:

- HTTP: PATCH /v1/keys/1234
- gRPC: patch_key(Data: UpdateKeyRequestData(UpdateKeyId: `1234`))


But seems that due to the HTTP body rules and how gRPC is mapped I can only
have the resource ID at the top level message, not replaced in a 
sub-message.

Am I correctly understanding this or is there a way to get the resource ID 
into a sub-message.

My code is below for reference and thanks in advance for any help.

Brad

------

// Defines the UpdateKeyRequestData message
message UpdateKeyRequestData {
// The key id
string UpdateKeyId = 1;
}

message PatchKeyRequest {
// The data needed to create a Key
UpdateKeyRequestData Data = 1;
}

//
// Patch a key
rpc patch_key(PatchKeyRequest) returns (KeyResponse) {
option (google.api.http) = {
patch: "/v1/keys/{PatchKeyId}"
body: "*"
};
}

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/4ada02f8-c630-4e69-9119-ebf5e74e672bn%40googlegroups.com.

Reply via email to