CUE + Jsonnet
import "time"
#Schema: {
// Basic schema
firstName: string
lastName: string
age: int
birthday: string
// Refine as needed
#Title: =~"^[A-Z]" | error("must start with an uppercase letter")
firstName: #Title
lastName: #Title
age: >0
birthday: time.Format("01/02/2006")
// Defaults
gopher: bool | *true
}
// Apply the schema to root
#Schema
{
firstName: 'Jim',
lastName: 'Jimbly',
age: 45,
birthday: '01/02/2003',
}