Having a List of Strings in the Config does not create the List in the generated Class
Closed this issue · 1 comments
Describe the bug
Putting an Array of Strings in my application.conf throws an error, it seems that somehow the system cannot parse Arrays of Strings or any other kind.
To Reproduce
Steps to reproduce the behavior:
-
Here's the input config schema: ...
application {
{
validItems: ["de", "en", "fr"]
}
} -
Generate wrapper as follows: ...
mvn clean install -
See error
Using the generated class in my code an Exception is thrown: "No configuration setting found for key 'validItems'"
Expected behavior
I expect the generated class to contain a List of Strings coming from the validItems config e.g.
List validItems = Arrays.asList(new String[]{"de", "en", "fr"});
Target language(s):
- Java
Instantiating the generated class without passing a sub-path to the ConfigFactory's load method made it work :-)