konf v0.23.0 Release Notes

Release Date: 2020-10-12 // over 2 years ago
  • Major Features and Improvements

    • 🔋 feature: support to load keys as little camel case by default
    • 🔋 feature: support empty YAML/JSON files
    • 🔋 feature: support to interpolate Byte/Short/Int/Long/BigInteger/Char
    • 🔋 feature: support to merge sources with different features
    • 🔋 feature: support to aggregate sources from different layers
    • 🛠 fix: support for non-map based StdSerializer
    • 🛠 fix: discover all official providers automatically

    💥 Breaking Changes

    • All keys in sources are loaded as little camel case by default, e.g., tcpPort and tcp_port in the source are treated as the same key. You can use config.disable(Feature.LOAD_KEYS_AS_LITTLE_CAMEL_CASE) to disable this change.

    🗄 Deprecated

    • 🚚 fromXXX APIs on providers are removed use the new shorter APIs instead. E.g., you can use file instead of fromFile.

Previous changes from v0.22.0

    🔋 feature: support flatten env source (#41)

    If you have the following environment variables:

    DATABASE=foo.example.com DATABASE\_USER=john DATABASE\_PASS=doe
    

    You can load them without any name conversion by using config.from.env(nested=false):

    object Root : ConfigSpec("") { val DATABASE by required\<String\>() val DATABASE\_USER by required\<String\>() val DATABASE\_PASS by required\<String\>() }Config { addSpec(Root) }.from.env(nested=false)
    

    🛠 fix: support numeric keys in source

    Now you can use numeric keys in source (use YAML as example):

    tree: 1: myVal: true