{
  "$defs": {
    "Case": {
      "additionalProperties": false,
      "properties": {
        "after": {
          "type": "string"
        },
        "afterExpect": {
          "anyOf": [
            {
              "$ref": "#/$defs/Expectations"
            },
            {
              "type": "null"
            }
          ]
        },
        "change": {
          "anyOf": [
            {
              "$ref": "#/$defs/ChangeExpectations"
            },
            {
              "type": "null"
            }
          ]
        },
        "expect": {
          "$ref": "#/$defs/Expectations"
        },
        "fix": {
          "anyOf": [
            {
              "$ref": "#/$defs/FixExpectations"
            },
            {
              "type": "null"
            }
          ]
        },
        "format": {
          "enum": [
            "auto",
            "json-schema",
            "fragment"
          ]
        },
        "id": {
          "minLength": 1,
          "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]*$",
          "type": "string"
        },
        "input": {
          "minLength": 1,
          "type": "string"
        },
        "rules": {
          "items": {
            "type": "string"
          },
          "type": [
            "array",
            "null"
          ],
          "uniqueItems": true
        }
      },
      "required": [
        "id",
        "input",
        "expect"
      ],
      "type": "object"
    },
    "ChangeExpectations": {
      "additionalProperties": false,
      "properties": {
        "added": {
          "items": {
            "$ref": "#/$defs/DiagnosticMatch"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "noNew": {
          "type": "boolean"
        },
        "removed": {
          "items": {
            "$ref": "#/$defs/DiagnosticMatch"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "unchanged": {
          "type": "boolean"
        }
      },
      "required": [
        "added",
        "removed"
      ],
      "type": "object"
    },
    "Count": {
      "additionalProperties": false,
      "anyOf": [
        {
          "properties": {
            "min": {
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "min"
          ]
        },
        {
          "properties": {
            "max": {
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "max"
          ]
        }
      ],
      "properties": {
        "max": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "min": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "type": "object"
    },
    "DiagnosticMatch": {
      "additionalProperties": false,
      "properties": {
        "column": {
          "type": "integer"
        },
        "line": {
          "type": "integer"
        },
        "message": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "path": {
          "type": "string"
        },
        "paths": {
          "items": {
            "type": "string"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "rule": {
          "minLength": 1,
          "type": "string"
        },
        "severity": {
          "enum": [
            "error",
            "warn",
            "info",
            "hint"
          ]
        },
        "source": {
          "type": "string"
        }
      },
      "required": [
        "rule"
      ],
      "type": "object"
    },
    "ExecutionMatch": {
      "additionalProperties": false,
      "properties": {
        "fixed": {
          "anyOf": [
            {
              "$ref": "#/$defs/Count"
            },
            {
              "type": "null"
            }
          ]
        },
        "ignored": {
          "anyOf": [
            {
              "$ref": "#/$defs/Count"
            },
            {
              "type": "null"
            }
          ]
        },
        "invocations": {
          "anyOf": [
            {
              "$ref": "#/$defs/Count"
            },
            {
              "type": "null"
            }
          ]
        },
        "matches": {
          "anyOf": [
            {
              "$ref": "#/$defs/Count"
            },
            {
              "type": "null"
            }
          ]
        },
        "status": {
          "enum": [
            "completed",
            "excluded"
          ]
        }
      },
      "required": [
        "status"
      ],
      "type": "object"
    },
    "Expectations": {
      "additionalProperties": false,
      "anyOf": [
        {
          "properties": {
            "diagnostics": {
              "type": "array"
            }
          },
          "required": [
            "diagnostics"
          ]
        },
        {
          "properties": {
            "execution": {
              "minProperties": 1
            }
          },
          "required": [
            "execution"
          ]
        }
      ],
      "properties": {
        "diagnostics": {
          "items": {
            "$ref": "#/$defs/DiagnosticMatch"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "execution": {
          "additionalProperties": {
            "$ref": "#/$defs/ExecutionMatch"
          },
          "type": "object"
        }
      },
      "type": "object"
    },
    "FixExpectations": {
      "additionalProperties": false,
      "properties": {
        "expect": {
          "$ref": "#/$defs/Expectations"
        },
        "output": {
          "type": "string"
        }
      },
      "required": [
        "output",
        "expect"
      ],
      "type": "object"
    },
    "Options": {
      "additionalProperties": false,
      "properties": {
        "lookupTimeoutMs": {
          "minimum": 0,
          "type": "integer"
        },
        "maxRuleConcurrency": {
          "minimum": 0,
          "type": "integer"
        },
        "nestedRefsDocContext": {
          "type": "boolean"
        },
        "remote": {
          "type": "boolean"
        },
        "resolveAllRefs": {
          "type": "boolean"
        },
        "runTimeoutMs": {
          "minimum": 0,
          "type": "integer"
        },
        "timeoutMs": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "type": "object"
    }
  },
  "$id": "https://quobix.com/vacuum/schemas/test-suite-v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "cases": {
      "items": {
        "$ref": "#/$defs/Case"
      },
      "minItems": 1,
      "type": "array"
    },
    "functions": {
      "type": "string"
    },
    "ignoreFile": {
      "type": "string"
    },
    "options": {
      "$ref": "#/$defs/Options"
    },
    "ruleset": {
      "minLength": 1,
      "type": "string"
    },
    "version": {
      "const": 1
    }
  },
  "required": [
    "version",
    "ruleset",
    "cases"
  ],
  "title": "vacuum test suite v1",
  "type": "object"
}
