YAMLSchema Cheat Sheet¶
The compact forms used most often when writing .ysd.yaml files.
Fields¶
The key mirrors the data key.
Add ? only when the field is optional.
Built-in types¶
JSON Schema formats¶
Numeric ranges¶
Strings and patterns¶
~"..." matches the complete string.
~~"..." searches within it.
Constants and enums¶
Lists¶
Mapping shapes¶
Shaped mappings are closed by default.
Open mappings¶
Definitions¶
References¶
Nullability¶
? controls presence.
~ permits a null value.
Dependencies¶
If postOfficeBox is present, streetAddress must also be present.
Combinators¶
Annotations¶
File forms¶
.ysd is authored. .ysdc is canonical. JSON Schema is interchange.