You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
prefix1.prefixA.name.keyA.key1 = value
prefix1.prefixA.name.keyA.key2 = value
prefix1.prefixA.name.keyB.key1 = value
prefix1.prefixA.name.keyB.key2 = value
prefix1.prefixB.name.keyA.key1 = value
prefix1.prefixB.name.keyA.key2 = value
prefix1.prefixB.name.keyB.key1 = value
prefix1.prefixB.name.keyB.key2 = value
If I use this such as via
val conf = Config().from.properties.resource("config/application.defaults.properties")
Should I be able to test if a given sub-path exists?
conf.contains("prefix1.prefixB.name")
As of right now, this always returns false for me.
Per the Properties, children of the Path exist. I use the Spec as follows and successfully so, despite the contains returning false
object SomeSpec: ConfigSpec("") {
val keyA1 by optional("NOT_SET", "keyA.key1")
val keyA2 by optional("NOT_SET", "keyA.key1")
val keyB1 by optional("NOT_SET", "keyB.key2")
val keyB2 by optional("NOT_SET", "keyB.key2")
}
val prefixb = conf.withLayer("child.prefixB").also {
it.addSpec(SomeSpec.withPrefix("prefix1.prefixB.name"))
}
println("keyB2: ${prefixb[SomeSpex.keyB2]}")
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 30 days if no further activity occurs, but feel free to re-open a closed issue if needed.
Sample Properties file
If I use this such as via
Should I be able to test if a given sub-path exists?
As of right now, this always returns
false
for me.Per the Properties, children of the Path exist. I use the Spec as follows and successfully so, despite the
contains
returningfalse
The text was updated successfully, but these errors were encountered: