I have created a .proto message and I'm exposing a rest service which looks like this
@Path("/test")
public interface test{
@POST
@Produces("application/x-protobuf")
@Consumes("application/x-protobuf")
public Response getProperties(TestRequest testrq);
}
Now TestRequest being the Java generated file of .protobuf how do i pass it in request body ?
this will be be the .proto file format
message TestRequest
{
string id = 1;
string name = 2;
enum TestType
{
Test=1
}
TestType testType = 3;
}