Edit online

Validating YAML Documents

Automatic Validation

Oxygen XML Developer Eclipse plugin includes built-in validation engine for YAML documents to help you keep them well-formed. YAML documents are validated automatically as you type and the validation engine detects syntax errors (such as improper indentation or duplicate keys), based on the YAML specification. The built-in validation also works on files that consist of multiple YAML documents.

Manual Validation Actions

To manually validate the currently edited YAML document, use one of the following actions:

Validate
Available from the Validation drop-down menu on the toolbar, the YAML menu, or from the Validate submenu when invoking the contextual menu on one or more YAML documents in the Project Explorer view. The validation is done based on the YAML specification.
Validate with

Available from the Validation drop-down menu on the toolbar or the YAML menu. This action opens a dialog box that allows you to specify a JSON Schema for validating the current YAML document (it also works on files that consist of multiple YAML documents).

Check Well-Formedness (Alt + Shift + V, W (Command + Option + V, W on macOS))

Available from the Validation drop-down menu on the toolbar, the YAML menu, or from the Validate submenu when invoking the contextual menu in the Project Explorer view. This action checks the document for syntax errors to make sure it is well-formed.

Validate with Schema

Available from the Validate submenu when invoking the contextual menu on one or more YAML documents in the Project Explorer view. This action opens a dialog box that allows you to specify a JSON Schema to be used for the validation.

Batch Validation

The built-in validation engine can also be used to batch validation multiple YAML files at once by selecting multiple files in the Project Explorer view, right-click, and select Validate > Check Well-Formedness or Validate > Validate. This automatically validates the selected files using the built-in YAML validation engine, based on the YAML specification.