A derivation library for scala 3 with annotation based configuration.
add library to your project as
libraryDependencies += "com.evolution" %% "evo-derivation-circe" % "{version}"
Then define your own type, deriving circe instances
import evo.derivation.*
import evo.derivation.circe.*
@SnakeCase
@Discriminator("type")
enum User derives Config, EvoCodec:
case AuthorizedClient(@Rename("client_id") id: UUID, name: String)
case Anonymous
Transforms all the constructor and\or field names to the snake case
Defines discriminator field for serialization of sealed trait
or enum
Renames single case class
field or enum
constructor
Write\Reads all inner fields of some field on the upper level during serialization