{
  "$defs": {
    "basic": {
      "$ref": "#/$defs/outputUnit"
    },
    "detailed": {
      "$ref": "#/$defs/outputUnit"
    },
    "flag": {
      "properties": {
        "valid": {
          "type": "boolean"
        }
      },
      "required": [
        "valid"
      ]
    },
    "outputUnit": {
      "allOf": [
        {
          "if": {
            "properties": {
              "valid": {
                "const": false
              }
            }
          },
          "then": {
            "anyOf": [
              {
                "required": [
                  "error"
                ]
              },
              {
                "required": [
                  "errors"
                ]
              }
            ]
          }
        },
        {
          "if": {
            "anyOf": [
              {
                "properties": {
                  "keywordLocation": {
                    "pattern": "/\\$ref/"
                  }
                }
              },
              {
                "properties": {
                  "keywordLocation": {
                    "pattern": "/\\$recursiveRef/"
                  }
                }
              }
            ]
          },
          "then": {
            "required": [
              "absoluteKeywordLocation"
            ]
          }
        }
      ],
      "properties": {
        "absoluteKeywordLocation": {
          "format": "uri",
          "type": "string"
        },
        "annotations": {
          "$ref": "#/$defs/outputUnitArray"
        },
        "error": {
          "type": "string"
        },
        "errors": {
          "$ref": "#/$defs/outputUnitArray"
        },
        "instanceLocation": {
          "format": "json-pointer",
          "type": "string"
        },
        "keywordLocation": {
          "format": "json-pointer",
          "type": "string"
        },
        "valid": {
          "type": "boolean"
        }
      },
      "required": [
        "valid",
        "keywordLocation",
        "instanceLocation"
      ]
    },
    "outputUnitArray": {
      "items": {
        "$ref": "#/$defs/outputUnit"
      },
      "type": "array"
    },
    "verbose": {
      "$ref": "#/$defs/outputUnit"
    }
  },
  "$id": "https://json-schema.org/draft/2019-09/output/schema",
  "$schema": "https://json-schema.org/draft/2019-09/schema",
  "anyOf": [
    {
      "$ref": "#/$defs/flag"
    },
    {
      "$ref": "#/$defs/basic"
    },
    {
      "$ref": "#/$defs/detailed"
    },
    {
      "$ref": "#/$defs/verbose"
    }
  ],
  "description": "A schema that validates the minimum requirements for validation output"
}