Can you differentiate between an empty map vs field not provided? #552
Closed
Description
With this proto definition
message UpdateMessage {
string id = 1;
map[string]string my_map = 2;
}
service YourService {
rpc Echo(UpdateMessage) returns (StringMessage) {
option (google.api.http) = {
patch: "/update"
body: "*"
};
}
}
I'd like to send a request like
{"id":"myid","my_map":{}}
and set MyMap to an empty map.
Is this possible? Currently, when this field is provided, my service thinks this field is unset(MyMap==Nil). I'm working in golang.
Metadata
Assignees
Labels
No labels