package codec
- Alphabetic
- Public
- Protected
Type Members
- sealed trait ConfigMetaBasicType extends AnyRef
- sealed trait ConfigMetaType extends AnyRef
- final case class ConfigMetaTypeId(owner: Option[String], short: String, typeArguments: Seq[ConfigMetaTypeId]) extends Product with Serializable
- trait DIConfigMeta[T] extends AnyRef
Type information for generated config codec, used to generate JSON Schemas for config in ConfigWriter role.
Type information for generated config codec, used to generate JSON Schemas for config in ConfigWriter role.
- trait DIConfigReader[A] extends AbstractDIConfigReader[A]
Config reader that uses a pureconfig.ConfigReader implicit instance for a type to decode it from Typesafe Config.
Config reader that uses a pureconfig.ConfigReader implicit instance for a type to decode it from Typesafe Config.
Always automatically derives a codec if it's not available.
Automatic derivation will use **
camelCase
** fields, NOTkebab-case
fields, as in default pureconfig. It also overrides pureconfig's defaulttype
field type discriminator for sealed traits, instead using acirce
-like format with a single-key object.Example:
sealed trait AorB final case class A(a: Int) extends AorB final case class B(b: String) extends AorB final case class Config(values: List[AorB])
In config:
config { values = [ { A { a = 123 } }, { B { b = cba } } ] }
Auto-derivation will work without importing
pureconfig.generic.auto._
and without any other importsYou may use izumi.distage.config.codec.PureconfigAutoDerive f you want to use
DIConfigReader
's deriving strategy to derive a standalonepureconfig
codec:final case class Abc(a: Duration, b: Regex, c: URL) object Abc { implicit val configReader: pureconfig.ConfigReader[Abc] = PureconfigAutoDerive[Abc] }
- sealed trait LowPriorityDIConfigMetaInstances extends AnyRef
- sealed trait LowPriorityDIConfigReaderInstances extends AnyRef
- final class MetaAutoDerive[A] extends AnyVal
- final class PureconfigAutoDerive[A] extends AnyVal
Derive
pureconfig.ConfigReader
for A and for its fields recursively withpureconfig-magnolia
Derive
pureconfig.ConfigReader
for A and for its fields recursively withpureconfig-magnolia
This differs from just using pureconfig.module.magnolia.auto.reader.exportReader by using different configuration, defined in PureconfigInstances, specifically:
1. Field name remapping is disabled,
camelCase
fields will remain camelCase, notkebab-case
2. Sealed traits are rendered as incirce
, using a wrapper object with a single field, instead of using atype
field. Example:sealed trait AorB final case class A(a: Int) extends AorB final case class B(b: String) extends AorB final case class Config(values: List[AorB])
in config:
config { values = [ { A { a = 123 } }, { B { b = cba } } ] }
Value Members
- object ConfigMetaBasicType
- object ConfigMetaType
- object DIConfigMeta extends LowPriorityDIConfigMetaInstances
- object DIConfigReader extends LowPriorityDIConfigReaderInstances
- object MetaAutoDerive
- object MetaInstances
- object PureconfigAutoDerive
- object PureconfigHints