{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/cloudcannon-configuration-snippets-definitions/latest.json",
  "x-lintel": {
    "source": "https://github.com/cloudcannon/configuration-types/releases/latest/download/cloudcannon-snippets-definitions.schema.json",
    "sourceSha256": "f3dc60c37a69129c2873d49796ce8e367bb10b84016a03abb6ec4b312a1bd73f",
    "fileMatch": [
      "cloudcannon.snippets-definitions.yml",
      "cloudcannon.snippets-definitions.yaml",
      "cloudcannon.snippets-definitions.json",
      "*.cloudcannon.snippets-definitions.yml",
      "*.cloudcannon.snippets-definitions.yaml",
      "*.cloudcannon.snippets-definitions.json"
    ],
    "parsers": [
      "json",
      "yaml"
    ]
  },
  "type": "object",
  "additionalProperties": {
    "$ref": "#/$defs/type.snippet-definition-value"
  },
  "$defs": {
    "type.snippet-definition-value": {
      "anyOf": [
        {
          "$ref": "#/$defs/type.snippet-format"
        },
        {
          "$ref": "#/$defs/type.snippet-model"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/type.snippet-model"
          },
          "title": "Parser Model Array",
          "description": "An array of model configurations, typically used for positional_args or named_args.",
          "markdownDescription": "An array of model configurations, typically used for positional_args or named_args."
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/type.snippet-definition-select-value"
          },
          "title": "Select Values Array",
          "description": "An array of select options, typically used for language lists.",
          "markdownDescription": "An array of select options, typically used for language lists."
        },
        {
          "type": "string",
          "title": "String Value",
          "description": "A string value, commonly used for shortcode_name, tag_name, content_key, and similar definitions.",
          "markdownDescription": "A string value, commonly used for shortcode_name, tag_name, content_key, and similar definitions."
        },
        {
          "type": "number",
          "title": "Number Value",
          "description": "A numeric value.",
          "markdownDescription": "A numeric value."
        },
        {
          "type": "boolean",
          "title": "Boolean Value",
          "description": "A boolean value.",
          "markdownDescription": "A boolean value."
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          },
          "title": "String Array",
          "description": "An array of strings.",
          "markdownDescription": "An array of strings."
        }
      ],
      "title": "Snippet Definition Value",
      "description": "A reusable value that can be referenced in snippet templates via { ref: \"key\" } or { spread_ref: \"key\" }.",
      "markdownDescription": "A reusable value that can be referenced in snippet templates via { ref: \"key\" } or { spread_ref: \"key\" }."
    },
    "type.snippet-format": {
      "title": "Snippet Format",
      "type": "object",
      "properties": {
        "root_boundary": {
          "type": "object",
          "properties": {
            "start": {
              "default": "",
              "type": "string"
            },
            "end": {
              "default": "",
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "root_value_boundary": {
          "type": "object",
          "properties": {
            "start": {
              "default": "",
              "type": "string"
            },
            "end": {
              "default": "",
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "root_value_boundary_optional": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "boolean"
          }
        },
        "root_value_delimiter": {
          "type": "string"
        },
        "root_pair_delimiter": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "remove_empty_root_boundary": {
          "type": "boolean"
        },
        "object_boundary": {
          "type": "object",
          "properties": {
            "start": {
              "default": "",
              "type": "string"
            },
            "end": {
              "default": "",
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "object_value_delimiter": {
          "type": "string"
        },
        "object_pair_delimiter": {
          "type": "string"
        },
        "array_boundary": {
          "type": "object",
          "properties": {
            "start": {
              "default": "",
              "type": "string"
            },
            "end": {
              "default": "",
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "array_delimiter": {
          "type": "string"
        },
        "string_boundary": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "string_escape_character": {
          "type": "string"
        },
        "allow_booleans": {
          "type": "boolean"
        },
        "allow_numbers": {
          "type": "boolean"
        },
        "allow_implied_values": {
          "type": "boolean"
        },
        "allow_null": {
          "type": "boolean"
        },
        "forbidden_tokens": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "allowed_string_cases": {
          "type": "object",
          "properties": {
            "any": {
              "type": "boolean"
            },
            "leading_upper": {
              "type": "boolean"
            },
            "leading_lower": {
              "type": "boolean"
            },
            "lower": {
              "type": "boolean"
            },
            "upper": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    },
    "type.snippet-model": {
      "title": "Snippet Model",
      "type": "object",
      "properties": {
        "source_key": {
          "type": "string"
        },
        "editor_key": {
          "type": "string"
        },
        "remove_empty": {
          "default": false,
          "type": "boolean"
        },
        "optional": {
          "default": false,
          "type": "boolean"
        },
        "type": {
          "type": "string",
          "enum": [
            "array",
            "object",
            "string",
            "boolean",
            "number"
          ]
        },
        "allowed_values": {
          "type": "array",
          "items": {}
        },
        "implied_boolean": {
          "default": false,
          "type": "boolean"
        },
        "default": {}
      },
      "additionalProperties": false
    },
    "type.snippet-definition-select-value": {
      "type": "object",
      "properties": {
        "name": {
          "description": "The display name for this option.",
          "type": "string",
          "markdownDescription": "The display name for this option."
        },
        "value": {
          "anyOf": [
            {
              "type": "string",
              "title": "String"
            },
            {
              "type": "number",
              "title": "Number"
            },
            {
              "type": "boolean",
              "title": "Boolean"
            }
          ],
          "description": "The value for this option.",
          "markdownDescription": "The value for this option."
        }
      },
      "required": [
        "value"
      ],
      "markdownDescription": "A value option for select inputs, typically used in language lists.",
      "title": "Snippet Definition Select Value",
      "description": "A value option for select inputs, typically used in language lists.",
      "additionalProperties": false
    }
  },
  "propertyNames": {
    "type": "string"
  }
}
