This repository was archived by the owner on Aug 17, 2022. It is now read-only.

Description
I would be helpful if ArbitraryTypeReader offered a mode/setting that adds a runtime check that all keys for a Config object were mapped into the instantiation parameters successfully and that no keys were left un-mapped after instantiation. Current behavior silently ignores Config keys that don't match a parameter when that parameter is optional (Option or default value), allowing simple typo bugs that could be caught at instantiation time to slip into runtime.
Example:
case class Test(foo: String = "foo", bar: Option[String])
val cfg = ConfigFactory.parseString("""
test {
fooTypo: overrideFoo
barTypo: overrideBar
}
""")
val test = cfg.as[Test]("test")
//> test : worksheet.Test = Test(foo,None)
// note default values are not overridden