Altova XMLSpy 2025 Professional Edition

YAML Schema View

Home Prev Top Next

A YAML instance document can be validated against a JSON schema. The JSON schema can be written in JSON format or YAML format. If a file is detected by XMLSpy to be a YAML schema—a JSON schema written in YAML format—then it is opened by default in YAML Schema View. A JSON schema will be opened in JSON Schema View.

 

A file will be detected as a YAML schema if it starts with a schema declaration in YAML format. Such a declaration uses the $schema keyword and references a permitted JSON schema dialect. For example:

 

$schema: http://json-schema.org/draft-07/schema#

 

Note that the syntax of a JSON schema declaration is slightly different from a YAML schema declaration.

 

View and edit YAML Schemas

Since YAML schemas are essentially JSON schemas, they are represented and edited in YAML Schema View in the same way as JSON schemas are edited in JSON Schema View. For a description of how to view and edit both types of schema in Schema View, see the section JSON Schema View.

 

Convert between JSON schema and YAML schema

To convert between the two schema formats, select the menu command Convert | Convert JSON to/from YAML. The active schema file will be converted into a schema file of the other format.

 

© 2018-2024 Altova GmbH