Home

cuesonnet @b55d8f76ac5a85758c2085c0c7feefca6dc4b9cf - refs - log -
-
https://git.jolheiser.com/cuesonnet.git
CUE + Jsonnet
cuesonnet / testdata / definitions / schema.cue
- raw -
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
#Name: {
	first: string
	last:  string
}

#Contact: {
	email?: =~"^[a-zA-Z0-9._%+\\-]+@[a-zA-Z0-9.\\-]+\\.[a-zA-Z]{2,}$"
	phone?: =~"^[0-9]{3}-[0-9]{3}-[0-9]{4}$"
}

#Person: {
	name:    #Name
	age:     int & >=0
	contact: #Contact
}

[...#Person]