Features
This section documents validation and schema keywords supported by YAML Schema and the ys CLI. For the normative keyword set, see the published schema at yaml-schema.yaml.
Topics
- CLI — Command-line usage, instance
$schema, JSON errors - Basics — Empty schemas, boolean schemas, basic types
- Types — Strings (including Unicode length), numbers, arrays, objects, etc.
- String formats —
formatfor dates, times, email, URI, UUID, and custom labels - Validation — Enums,
const, descriptions, shared constraint examples - Composition —
allOf,anyOf,oneOf,not - Multiple types —
type: [string, number]style unions - Conditionals —
dependentRequired,dependentSchemas,if/then/else - Unevaluated keywords —
unevaluatedProperties,unevaluatedItems - References —
$defs,$ref, external resolution, circular refs
Type system
YAML Schema supports these types:
string— Text valuesnumber— Numeric values (integers and floats)integer— Whole numbersboolean— True/false valuesnull— Null valuesarray— Ordered listsobject— Key-value mappings
Types combine with validation keywords and composition to describe your YAML documents.