The goal of this project is to make it easier to map protobuf objects from/to (swagger) objects
Add the dependency to your project
<dependency>
<groupId>com.github.robert2411</groupId>
<artifactId>protobuf-swagger-mapper</artifactId>
</dependency>
ProtobufObjectMapper mapper = new ProtobufObjectMapper();
//to proto
ProtobufTest.Greeting greeting = mapper.map(testObject, ProtobufTest.Greeting::newBuilder);
//To object
TestObject out = mapper.map(greeting, TestObject.class);