Forest33/warthog

gRPC input not sent when it has the default value

Closed this issue · 2 comments

I am trying to submit a request that has various input types (string, int32, Enum, bool).
Sending the request fails because of input validation errors, even though the input looks valid.
I face 2 problems:

  • For bool inputs, the GUI shows a switch button to set the input to false or true, but it seems the input is not sent if I let the button to its default 'not switched' position. As a result, the server tells me that the input is missing.
  • For int32 inputs, it seems the value is not sent if set to 0 in Warthog, because the server replies that "the input must be an integer". The input is accepted if I set it to 1 in Warthog, and if I set it to 0 from another CLI client (so it's not a fault validation on the server side).

Default values are not serialized and sent over the wire.
https://protobuf.dev/programming-guides/proto3/#default

Oh ok, I didn't know that! Thanks for the answer, I'll check with the server side why the message is not parsed as specified.