Skip to main content
JSON Schema is probably the most popular schema language. With origins dating back to 2010, JSON Schema was initially built for API validation. Since then, it has found its way into configuration systems across web, cloud, and robotics infrastructure.

Example

Below is an example JSON Schema to give you a flavor of what JSON Schema looks like:
JSON Schema
Although many of JSON Schema’s capabilities are omitted in this example, you’ll find some of the most common keywords, including:
  • $schema - the JSON Schema draft version
  • type - the data type of a property
  • required - the property must exist
  • properties - the sub-fields of an object
  • default - the default value of a property
  • description - a human-readable description of a property
  • enum - a constrained list of values a property can take
  • minimum - the minimum value of a property
  • maximum - the maximum value of a property
For a comprehensive list of JSON Schema keywords, visit the official JSON Schema website. We also find the official test suite highly useful, as it contains a large number of simple JSON Schema examples.

Supported drafts

While JSON Schema has multiple drafts, only Draft 2020-12, the most recent stable draft, is supported. When specifying the $schema keyword in a schema, it must be set to the following value:
If the $schema keyword is omitted from a schema, the schema is automatically interpreted as Draft 2020-12.

File formats

While JSON Schema was originally built for JSON data, it is not exclusive to JSON. JSON Schema may be uploaded to Miru in the following formats:
  • JSON (.json)
  • YAML (.yaml, .yml)
The format of a schema does not need to match the format of the config instance it validates. For example, a YAML-formatted JSON Schema can validate a JSON-formatted config instance. JSON Schemas can validate config instances in the following formats:
  • JSON (.json)
  • YAML (.yaml, .yml)
YAML support requires Miru Agent v0.7.0 or newer
Last modified on July 21, 2026