We have a HTTP-PATCH-annotated RPC method:
rpc Baz(Bar) returns (Qux) {
option (google.api.http) = {
body: "foo"
};
option (google.api.method_signature) = "foo,update_mask";
}
message Bar {
Foo foo = 1 [(google.api.field_behavior) = REQUIRED];
google.protobuf.FieldMask update_mask = 2;
}
message Foo {
string name = 1;
}
The following payload is seemingly dropped/ignored because the method expects a Foo, rather than a Bar message (which contains foo):
The following payload is sent to our backend, but our question is: how do we pass in the updateMask field? Should endpoints be auto-populating the update_mask field somehow?
We are attempting changing the body to * instead of foo, as a workaround, but how do we make sense of the Google API style guidance?
rpc Baz(Bar) returns (Qux) {
option (google.api.http) = {
body: "*"
};
option (google.api.method_signature) = "foo,update_mask";
}
Thank you,
Tuan