com.avsystem.commons.serialization
If you want your parameter to have _both_ a @whenAbsent
annotation and a Scala-level default value, you can
use this macro to avoid writing the default value twice:
If you want your parameter to have _both_ a @whenAbsent
annotation and a Scala-level default value, you can
use this macro to avoid writing the default value twice:
case class Record(@whenAbsent(0) i: Int = whenAbsent.value)
This is useful when you want the default value to be collectible by macros (e.g. OpenApiMetadata
for REST).
which is possible only with default value in annotation.