Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default value for List type #61

Open
crixal opened this issue May 6, 2020 · 1 comment
Open

Default value for List type #61

crixal opened this issue May 6, 2020 · 1 comment

Comments

@crixal
Copy link

crixal commented May 6, 2020

It's not available to create spec contains List type with default value.
For example, spec intParams = [int] generate list of integers.
But default value for list will be ignored intParams = [int] | [1,2,3]. As workaround optional annotation can be used with default value in the code.

@carueda
Copy link
Owner

carueda commented May 6, 2020

Thanks @crixal for your input. Correct, default value for list is not really implemented, in good part because of limitations arising from using Lightbend Config itself to parse the given spec, see #51 . To reiterate from there, no limitations in the Config library itself, but by the way we try to leverage it for parsing the spec input. (BTW, while quickly playing with the potential syntax intParams = [int] | [1,2,3], I ended up discovering and reporting lightbend/config#685 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants