blob: f02810ed442377f74bd61277eed63c212bc81a3a [file] [log] [blame]
-- list.yaml --
type: object
properties:
foo:
type: array
items:
type: string
tuple:
type: array
items:
- type: string
- type: integer
- const: 2
has:
type: array
contains:
const: 3
size:
type: array
minItems: 3
maxItems: 9
uniqueItems: true
additionalProperties: false
-- out.cue --
import "list"
Schema :: {
foo?: [...string]
tuple?: [string, int, 2]
has?: list.Contains(3)
size?: list.MinItems(3) & list.MaxItems(9) & list.UniqueItems()
}