Nested reusable fields
A schema field can be referenced from another schema.Supported schema field types
Schemas support the full type system. Common options:- Primitive:
string,number,float,boolean,null - Any object:
object - Arrays:
[string], fixed length[string; 3] - Tuples:
(string, number) - Objects:
{ title: string, score: number } - Enums:
enum { draft, ready, published } - Unions:
string | number - Nullable values:
maybe string - Schema references:
schema.shared.status - Variants (tagged unions):
variant kind { ... }
Variants
Usevariant when a value can be one of multiple structured cases, each identified by a discriminator field.
type is the discriminator and each case defines its own object shape.