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
Type: Query/Clarification to understand if there is a better way to define multi-valued configs
Summary: Need to define a validated configuration for parameters that may take nested params, like-
[{:host "192.168.4.40" :port 9092}]
[6379 6380]
Currently, I am defining a type as :edn. Is there a better way to define such multi-valued parameters where constraint can be applied on each value, like- map keys in the first case and integers in the second case.
The text was updated successfully, but these errors were encountered:
From a logical standpoint, defining such values as :edn is probably the correct solution, because you are not giving a separate identity to each element of the collection. Perhaps, it would make sense to have something like :list-of, in addition to :nested, but that will create new complicated syntax and semantics for populating such values (e.g. --servers.0.host example.com). I will give it a thought.
Regarding the verification part, you can attach a :verifier to an EDN value and validate the types of the subelements manually. I know, it feels backward but this is the only solution available right now.
Thanks @alexander-yakushev - as you mentioned, we can still attach a :verifier, so this is not a blocker. Shall we close this issue or keep it open as a feature request to see if it gets more votes?
[{:host "192.168.4.40" :port 9092}]
[6379 6380]
Currently, I am defining a type as
:edn
. Is there a better way to define such multi-valued parameters where constraint can be applied on each value, like-map
keys in the first case andintegers
in the second case.The text was updated successfully, but these errors were encountered: