evolution-gaming / derivation   0.2.0

MIT License GitHub

Configured derivation library for scala 3

Scala versions: 3.x


License: MIT Maven Central Sonatype Nexus (Snapshots) badge Build

A derivation library for scala 3 with annotation based configuration.


This library os being published to the macen central. Add library to your project as

libraryDependencies += "com.evolution" %% "derivation-circe" % "{version}"

Finally, define your own type, which derives circe instances

import evo.derivation.*
import evo.derivation.circe.*
import evo.derivation.config.Config
import java.util.UUID

enum User derives Config, EvoCodec:
    case AuthorizedClient(@Rename("client_id") id: UUID, name: String)
    case Anonymous

Annotation reference


Transforms all the constructor and\or field names to the snake case

@Discriminator(name: String)

Defines discriminator field for serialization of sealed trait or enum

@Rename(name: String)

Renames single case class field or enum constructor


Write\Reads all inner fields of some field on the upper level during serialization