{
  "$schema": "http://json-schema.org/draft-06/schema#",
  "$ref": "#/definitions/WorkspaceConfig",
  "definitions": {
    "WorkspaceConfig": {
      "type": "object",
      "additionalProperties": false,
      "description": "Workspace-level defaults for Regressify. Any value set here is used when neither the test suite nor the scenario overrides it.",
      "properties": {
        "urlReplacements": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/UrlReplacements"
          }
        },
        "hideSelectors": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "removeSelectors": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "useCssOverride": {
          "type": "boolean"
        },
        "cssOverridePath": {
          "type": "string"
        },
        "viewportsPath": {
          "type": "string"
        },
        "debug": {
          "type": "boolean"
        },
        "asyncCaptureLimit": {
          "type": "number"
        },
        "asyncCompareLimit": {
          "type": "number"
        },
        "browser": {
          "type": "string",
          "oneOf": [
            {
              "enum": [
                "chromium",
                "firefox",
                "webkit"
              ]
            }
          ]
        },
        "misMatchThreshold": {
          "type": "number"
        },
        "postInteractionWait": {
          "type": "number"
        },
        "viewportNames": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        },
        "bypassCsp": {
          "type": "boolean"
        },
        "ignoreSslErrors": {
          "type": "boolean"
        },
        "state": {
          "type": "string",
          "pattern": "^[a-z0-9_-]+$"
        },
        "delay": {
          "type": "number"
        },
        "cookiePath": {
          "type": "string"
        },
        "jsOnReadyPath": {
          "type": "string"
        },
        "noScrollTop": {
          "type": "boolean"
        },
        "requiredLogin": {
          "type": "boolean"
        },
        "basicAuth": {
          "$ref": "#/definitions/BasicAuthConfig"
        }
      },
      "title": "WorkspaceConfig"
    },
    "UrlReplacements": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "ref": {
          "type": "string"
        },
        "test": {
          "type": "string"
        },
        "regex": {
          "type": "boolean"
        },
        "flags": {
          "type": "string"
        }
      },
      "required": [
        "ref",
        "test"
      ],
      "title": "UrlReplacements"
    },
    "BasicAuthConfig": {
      "description": "HTTP Basic Authentication credentials. Provide a single entry to protect one origin, or an array of entries to protect several origins; the entry matching the scenario's origin is selected at runtime.",
      "oneOf": [
        {
          "$ref": "#/definitions/BasicAuth"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/definitions/BasicAuth"
          }
        }
      ]
    },
    "BasicAuth": {
      "type": "object",
      "additionalProperties": false,
      "description": "HTTP Basic Authentication credentials applied before navigation. Each value may reference an environment variable with ${VAR} or $VAR so secrets stay out of committed YAML. Origin must be the protected origin (scheme://host:port).",
      "properties": {
        "origin": {
          "type": "string",
          "description": "Protected origin (scheme://host:port). May contain ${VAR}/$VAR references (including embedded, e.g. https://${HOST}); it is expanded and normalized to an origin at runtime."
        },
        "username": {
          "type": "string"
        },
        "password": {
          "type": "string"
        }
      },
      "required": [
        "origin",
        "username",
        "password"
      ],
      "title": "BasicAuth"
    }
  }
}