{
  "$defs": {
    "CiMode": {
      "enum": [
        "review",
        "strict",
        "wait"
      ],
      "type": "string"
    },
    "PdfConfig": {
      "additionalProperties": false,
      "properties": {
        "dpi": {
          "description": "Render resolution, 36 to 600.",
          "format": "int32",
          "type": [
            "integer",
            "null"
          ]
        },
        "engine": {
          "anyOf": [
            {
              "$ref": "#/$defs/PdfEngine"
            },
            {
              "type": "null"
            }
          ],
          "description": "The render engine."
        }
      },
      "type": "object"
    },
    "PdfEngine": {
      "enum": [
        "pdfbox",
        "mutool"
      ],
      "type": "string"
    },
    "ScopedIgnoreRule": {
      "additionalProperties": false,
      "description": "An ignore rule for the snapshots whose names match a glob.",
      "properties": {
        "json_paths": {
          "description": "JSON paths whose values are ignored: `$.generated_at`, `$.items[*].id`, `$..request_id`.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "snapshots": {
          "description": "The snapshots this rule applies to, as a glob over snapshot names: `api/invoices/**`, `emails/*.html`.",
          "type": "string"
        },
        "text_patterns": {
          "description": "Regular expressions; matching text is ignored in every text format.",
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "snapshots"
      ],
      "type": "object"
    },
    "Threshold": {
      "anyOf": [
        {
          "description": "One threshold for every snapshot.",
          "format": "double",
          "type": "number"
        },
        {
          "additionalProperties": {
            "format": "double",
            "type": "number"
          },
          "description": "Thresholds by snapshot glob: `{ \"screenshots/**\": 0.1, \"pdfs/**\": 0 }`.",
          "type": "object"
        }
      ]
    },
    "Upload": {
      "additionalProperties": false,
      "description": "Files a bare `visualci upload` sends.",
      "properties": {
        "format": {
          "description": "How text files are compared: `text`, `json` or `html`.",
          "type": [
            "string",
            "null"
          ]
        },
        "from": {
          "description": "Read a test framework's snapshot files: `jest`, `vitest`, `insta`, `syrupy`, `rspec` or `auto`.",
          "type": [
            "string",
            "null"
          ]
        },
        "path": {
          "description": "A file or directory, relative to the file's directory.",
          "type": "string"
        },
        "prefix": {
          "description": "Added before every snapshot name from this path.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "path"
      ],
      "type": "object"
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "VisualCI settings for a repository. See https://visualci.com/docs/reference/config/",
  "properties": {
    "ci_mode": {
      "anyOf": [
        {
          "$ref": "#/$defs/CiMode"
        },
        {
          "type": "null"
        }
      ],
      "description": "What CI is told: `review` (pass, and hold the pull request's check until an agent approves), `strict` (fail on\nunapproved changes) or `wait` (`finalize --wait` waits for a decision)."
    },
    "ignore": {
      "description": "Values that change on every run, replaced with `[ignored]` before text snapshots are compared. Each rule names\nthe snapshots it applies to. When the file has `ignore`, the project's own rules aren't used.",
      "items": {
        "$ref": "#/$defs/ScopedIgnoreRule"
      },
      "type": [
        "array",
        "null"
      ]
    },
    "pdf": {
      "anyOf": [
        {
          "$ref": "#/$defs/PdfConfig"
        },
        {
          "type": "null"
        }
      ],
      "description": "How PDFs are rendered."
    },
    "project": {
      "description": "The project, as `organization/project`. Informational: the token decides the project, and the CLI warns when\nthey differ.",
      "type": [
        "string",
        "null"
      ]
    },
    "threshold": {
      "anyOf": [
        {
          "$ref": "#/$defs/Threshold"
        },
        {
          "type": "null"
        }
      ],
      "description": "The diff threshold, 0 to 1: 0 compares exactly; above 0 it's a perceptual colour threshold. One number for every\nsnapshot, or a map of snapshot globs to thresholds, where the longest matching glob wins."
    },
    "uploads": {
      "description": "What a bare `visualci upload` sends.",
      "items": {
        "$ref": "#/$defs/Upload"
      },
      "type": "array"
    }
  },
  "title": "visualci.yml",
  "type": "object"
}
