konf v0.23.0 Release Notes

Release Date: 2020-10-12 // over 3 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