List of one or more elements? #835
-
I'd like to vet a schema that requires one or more elements in a list. My schema is:
and I want to guarantee that I am very new to CUE, so I may not be defining these correctly in the first place. Is there a language feature that can help me do this cleanly, or is this the same problem described in #401? I can accomplish this functionally with:
...but this does not result in a helpful error message. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Thankfully the world has moved on since that question/question, and the new evaluator which will land in
If you
|
Beta Was this translation helpful? Give feedback.
-
For minimum items in a list you can also express it like this:
Where |
Beta Was this translation helpful? Give feedback.
-
This discussion has been migrated to cue-lang/cue#835. For more details about CUE's migration to a new home, please see cue-lang/cue#1078. |
Beta Was this translation helpful? Give feedback.
For minimum items in a list you can also express it like this:
Where
l
should be a list of at least 2 string values.