1

I am new to Scala. Developing my first scala App with Akka-grpc.

I have defined my proto as below :

 message ApiRequest {
   string email = 1;
   string phone_number = 2;
   int32 size = 3;
 }

I want to validate my request parameters as here only email is mandatory, rest are optional parameters.

proto2 was having option as required/optional.

So, with proto3 what could be a good and efficient solution to validate those parameters.

Can case class be considered or mapping parameters to Map() and then validating using loop?

RKP
  • 750
  • 2
  • 12
  • 23
  • Does this answer your question? [How to define an optional field in protobuf 3](https://stackoverflow.com/questions/42622015/how-to-define-an-optional-field-in-protobuf-3) – Felipe Jan 21 '21 at 15:54

0 Answers0