Skip to content

Latest commit

 

History

History
30 lines (25 loc) · 1.74 KB

README.md

File metadata and controls

30 lines (25 loc) · 1.74 KB

protobuf-object-mapper

Java CI with Maven Maven Central FOSSA Status Quality Gate Status Coverage

The goal of this project is to make it easier to map protobuf objects from/to (swagger) objects

Usage

Add the dependency to your project

<dependency>
    <groupId>com.github.robert2411</groupId>
    <artifactId>protobuf-swagger-mapper</artifactId>
</dependency>

Basic example

ProtobufObjectMapper mapper = new ProtobufObjectMapper();
//to proto
ProtobufTest.Greeting greeting = mapper.map(testObject, ProtobufTest.Greeting::newBuilder);
//To object
TestObject out = mapper.map(greeting, TestObject.class);

License

FOSSA Status