Define & Validate APIsValidation RulesetsData Rulesets

YAML Data Semantic Validation

Semantic validation checks performed on provided YAML data to check its conformance to standards.

PropertyValue
Ruleset IDyaml-semantic-validation
Code prefixYAMLSEMANTIC_V
TypeValidation
Default severityBlocking
Rule systemSemantic
Rules7

Mapping Values

CodeRuleSeverityWhat it checks
YAMLSEMANTIC_V001valid-block-mapping-keyBlockingA block mapping is a series of entries consisting of key-value pairs. Key and value of a pair must be separated by a colon : and a space. There must be no other content between the key and the value.
YAMLSEMANTIC_V002valid-flow-mappingBlockingA flow mapping is a series of entries consisting of key-value pairs. A flow mapping is surrounded by curly braces { and } respectively while the key-value pair entries are separated by a comma ,. Key and value of a pair must be separated by a colon : and a space. There must be no other content between the key and the value.

Arrays/Sequences

CodeRuleSeverityWhat it checks
YAMLSEMANTIC_V050valid-block-sequence-itemBlockingA block sequence is simply a series of nodes, each denoted by a leading - indicator. The - indicator must be separated from the node by white space.
YAMLSEMANTIC_V051valid-flow-sequenceBlockingA flow sequence is simply a series of nodes, each denoted by a leading - indicator. The flow sequence is surrounded by square braces [ and ] respectively while the node entries inside it must be separated by a comma ,. The - indicator must be separated from the node entry value by a white-space.

Directives

CodeRuleSeverityWhat it checks
YAMLSEMANTIC_V100compatible-yaml-documentBlockingA YAML document compatibility is mostly verified through the YAML version number specified in the %YAML directive. The %YAML directive and the version number specified in this directive must be valid.
YAMLSEMANTIC_V101valid-yaml-document-startBlockingIf a YAML document begins with a %YAML directive, it must be followed in the next line by three dashes --- and no other content in it. In other words, the %YAML directive must be valid and separated correctly from the remaining YAML content.
YAMLSEMANTIC_V102single-yaml-directiveBlockingOnly one %YAML directive must exist per YAML file. More than one %YAML directives are not allowed.

Learn more

On this page