{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://difora.eu/schema/difora-config-v1.json",
  "title": "Difora snapshot configuration v1",
  "type": "object",
  "additionalProperties": false,
  "required": ["version", "rules"],
  "properties": {
    "$schema": {
      "type": "string"
    },
    "version": {
      "const": 1
    },
    "rules": {
      "type": "array",
      "maxItems": 200,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["match"],
        "properties": {
          "match": {
            "type": "string",
            "minLength": 1,
            "maxLength": 600,
            "description": "Case-sensitive glob: *, **, **/, ?. Escape only *, ? and backslash; no control characters."
          },
          "threshold": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "changeRatioThreshold": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "ignore": {
            "type": "array",
            "maxItems": 50,
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": ["x", "y", "width", "height"],
              "properties": {
                "x": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 30000000
                },
                "y": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 30000000
                },
                "width": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 30000000
                },
                "height": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 30000000
                }
              }
            }
          }
        }
      }
    }
  }
}
