Transparent conversion of case classes


#1

Hi,

do you know if there is some library that allows transparent conversion of two different case classes with same fields? Say, I have some data class case class thrift.Result(value: String) of Thrift-based microservice, that I’d like to pass to case class graphql.Result(value: String) GraphQL microservice. All I’d like to do is call a method copy[thrift.Result, graphql.Result](instance: thrift.Result): graphql.Result. I guess this should be some kind of macro under the hood.


#2

I have just come across this one: https://github.com/scalalandio/chimney
There are probably others, probably all of them using Shapeless.