I have this protobuf sample message:
message testMessage{ oneof oneOfTest{ string test2 = 2; int32 test3 = 3; } }
But it does not compile, saying:
[ERROR] protoc failed error: Expected "required", "optional", or "repeated". test.proto: Missing field number.
According to line numbers, he searches for the required / optional / repeated keyworkd before "oneof", and he complains about the desired field number after "oneOfTest". Isn't that the right way to use one? I am using java compiler for Protobuf.
source share