Iβm trying to construct a Postman GRPC message which has a field that is of type google.protobuf.Value
to encode raw json. The protobuf looks like this:
message PayloadRequest {
google.protobuf.Value payload = 1;
}
When I generate an example message for this in Postman, it sees that this field is a OneOf type and generates this sample message:
{
"payload": {
"bool_value": false,
"list_value": {
"values": []
},
"null_value": 0,
"number_value": "Infinity",
"string_value": "Lorem dolor minim",
"struct_value": {
"fields": [
{
"key": "cupidatat ipsum reprehenderit commodo"
},
{
"key": "aliquip commodo"
},
{
"key": "veniam minim est sint"
},
{
"key": "mollit pariatur"
}
]
}
}
}
The problem Iβm having with this OneOf is if I omit the other fields and only include the type Iβm wanting to send for any of the type it works except for struct_value. If I attempt to supply the struct_value
as the OneOf value in this message I always get this error in Postman:
proto: google.protobuf.Value: none of the oneof fields is set