cue-lang/docs-and-content

docs/howto: use the builtin function "matchN"

Opened this issue · 0 comments

https://cuelang.org/cl/1198922 introduced the new builtin matchN(), which will allow (at least!) JSONSchema constraints such oneOf, anyOf, and atLeast to be expressed idiomatically.

Let's write a how-to guide that demonstrates matchN() using a tip version of the cue command. https://cuelang.org/cl/1198922/6/cue/testdata/builtins/matchn.txtar contains several examples that we can either steal or adapt.