{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/cloudcannon-configuration/latest.json",
  "description": "Delegates to other schemas based on version.",
  "x-lintel": {
    "source": "https://github.com/cloudcannon/configuration-types/releases/latest/download/cloudcannon-config.schema.json",
    "sourceSha256": "65231c70a0a7bfd4bc9a832f9c300b36d8280c205e626b21ef50c008874c78cf",
    "fileMatch": [
      "cloudcannon.config.yml",
      "cloudcannon.config.yaml",
      "cloudcannon.config.json",
      "*.cloudcannon.config.yml",
      "*.cloudcannon.config.yaml",
      "*.cloudcannon.config.json"
    ],
    "parsers": [
      "json",
      "yaml"
    ]
  },
  "type": "object",
  "properties": {
    "version": {
      "enum": [
        "legacy-hugo",
        "legacy-jekyll",
        "legacy-eleventy",
        "legacy-reader",
        "latest"
      ]
    }
  },
  "allOf": [
    {
      "if": {
        "properties": {
          "version": {
            "not": {
              "enum": [
                "legacy-hugo",
                "legacy-jekyll",
                "legacy-eleventy",
                "legacy-reader"
              ]
            }
          }
        }
      },
      "then": {
        "$ref": "https://catalog.lintel.tools/schemas/schemastore/cloudcannon-configuration/_shared/latest--cloudcannon-config.latest.schema.json"
      }
    },
    {
      "if": {
        "properties": {
          "version": {
            "const": "legacy-hugo"
          }
        },
        "required": [
          "version"
        ],
        "type": "object"
      },
      "then": {
        "$ref": "https://catalog.lintel.tools/schemas/schemastore/cloudcannon-configuration/_shared/latest--cloudcannon-config.legacy-hugo.schema.json"
      }
    },
    {
      "if": {
        "properties": {
          "version": {
            "const": "legacy-jekyll"
          }
        },
        "required": [
          "version"
        ],
        "type": "object"
      },
      "then": {
        "$ref": "https://catalog.lintel.tools/schemas/schemastore/cloudcannon-configuration/_shared/latest--cloudcannon-config.legacy-jekyll.schema.json"
      }
    },
    {
      "if": {
        "properties": {
          "version": {
            "const": "legacy-eleventy"
          }
        },
        "required": [
          "version"
        ],
        "type": "object"
      },
      "then": {
        "$ref": "https://catalog.lintel.tools/schemas/schemastore/cloudcannon-configuration/_shared/latest--cloudcannon-config.legacy-eleventy.schema.json"
      }
    },
    {
      "if": {
        "properties": {
          "version": {
            "const": "legacy-reader"
          }
        },
        "required": [
          "version"
        ],
        "type": "object"
      },
      "then": {
        "$ref": "https://catalog.lintel.tools/schemas/schemastore/cloudcannon-configuration/_shared/latest--cloudcannon-config.legacy-reader.schema.json"
      }
    }
  ]
}
