Mapping values (key-value pairs) should only be used where the YAML specification allows it and the key-value pairs must start and terminate correctly.
YAMLSYNTAX_V002
required-mapping-value-colon-separation
Blocking
The key and value of a mapping (key-value pair) must be separated by a colon :. There must be a space between the colon : and the value.
YAMLSYNTAX_V003
no-reserved-keywords-in-unquoted-mapping-key
Blocking
The key content of the key-value pair (or mapping) must not use null unless it is intended to be a property name in which case it must be enclosed in quotes. Similarly, use of any other YAML reserved keywords must be avoided as key names unless they be enclosed in quotes.
A quoted scalar value must be escaped properly. A scalar value (like a number, string, etc.) can be quoted in two styles: single or double. The double-quoted style provides escape sequences. The single-quoted style is useful when escaping is not needed. If your scalar value needs escaping, use double quotes and appropriate escape sequences.
YAMLSYNTAX_V051
valid-quoted-scalar-termination
Blocking
A scalar value (like a number, string, etc.) can be quoted in two styles: single quotes or double quotes. Whatever style is picked for the scalar must be used consistently for it i.e. use either single quotes or double quotes but not both. There must be a quote before the value and after the value.
Directives are instructions to the YAML processor. They are identified by their name which is required and cannot be empty or null.
YAMLSYNTAX_V151
valid-yaml-directive-version-number
Blocking
The %YAML directive specifies the version of YAML the document conforms to. Documents explicitly specifying a YAML directive must only use a valid YAML version number after the directive name e.g. %YAML 1.2.
A node can be anchored using & followed by an anchor name. This anchored node can then be referenced by an alias node using * followed by the anchor name. The anchor name used by the alias node must be valid and an anchored node of that name must exist.