{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://rehearse.kurvball.ca/schema/v1/validate.schema.json",
  "title": "Rehearse v1: rehearse validate --json",
  "description": "Whether a JSON or YAML file meets one of Rehearse's schemas, and what is wrong where.",
  "type": "object",
  "required": ["v", "ok", "schema", "errors"],
  "properties": {
    "v": {
      "$ref": "common.schema.json#/$defs/v"
    },
    "ok": {
      "type": "boolean"
    },
    "schema": {
      "type": "string"
    },
    "file": {
      "type": ["string", "null"]
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["at", "says"],
        "properties": {
          "at": {
            "type": "string"
          },
          "line": {
            "type": "integer"
          },
          "says": {
            "type": "string"
          }
        }
      }
    }
  }
}
