{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "id": "https://json.schemastore.org/linutil-tab-data.json",
  "definitions": {
    "string-property": {
      "type": "string",
      "minLength": 1,
      "pattern": "[^ ]"
    }
  },
  "title": "tab data",
  "description": "Tab data",
  "type": "object",
  "required": ["name", "data"],
  "properties": {
    "name": {
      "$ref": "#/definitions/string-property",
      "title": "name",
      "description": "The name of a tab"
    },
    "multi_selectable": {
      "title": "multi_selectable",
      "description": "Whether the tab entries should be able to multi select",
      "type": "boolean"
    },
    "data": {
      "title": "data",
      "description": "The data of a tab",
      "type": "array",
      "minItems": 1,
      "uniqueItems": true,
      "items": {
        "title": "data entry",
        "description": "The data entry of a tab",
        "type": "object",
        "properties": {
          "name": {
            "$ref": "#/definitions/string-property",
            "title": "name",
            "description": "The name of a tab entry"
          },
          "script": {
            "$ref": "#/definitions/string-property",
            "title": "script",
            "description": "The script run of a tab entry"
          },
          "description": {
            "$ref": "#/definitions/string-property",
            "title": "description",
            "description": "Description of the tab entry"
          },
          "task_list": {
            "$ref": "#/definitions/string-property",
            "title": "task_list",
            "description": "The task list of a tab entry"
          },
          "preconditions": {
            "title": "preconditions",
            "description": "Preconditions of a tab entry",
            "type": "array",
            "minItems": 1,
            "uniqueItems": true,
            "items": {
              "title": "precondition entry",
              "description": "The precondition entry of a tab entry",
              "type": "object",
              "properties": {
                "matches": {
                  "title": "matches",
                  "description": "Whether to require the condition to match or not for a precondition entry",
                  "type": "boolean"
                },
                "data": {
                  "title": "data",
                  "description": "The data of a tab precondition entry",
                  "type": "object",
                  "properties": {
                    "environment": {
                      "$ref": "#/definitions/string-property",
                      "title": "environment",
                      "description": "The environment variable of a data"
                    },
                    "command_exists": {
                      "title": "command_exists",
                      "description": "The command pre-condition of a data",
                      "type": "null"
                    },
                    "file": {
                      "$ref": "#/definitions/string-property",
                      "title": "file",
                      "description": "The file pre-condition of a data"
                    }
                  },
                  "additionalProperties": false
                },
                "values": {
                  "title": "values",
                  "description": "The values of a tab precondition entry",
                  "type": "array",
                  "minItems": 1,
                  "uniqueItems": true,
                  "items": {
                    "title": "entry",
                    "description": "The entry of values",
                    "type": "string"
                  }
                }
              },
              "additionalProperties": false
            }
          },
          "entries": {
            "title": "entries",
            "description": "The entries of a tab entry",
            "type": "array",
            "minItems": 1,
            "uniqueItems": true,
            "items": {
              "title": "entry",
              "description": "The entry",
              "type": "object",
              "properties": {
                "name": {
                  "$ref": "#/definitions/string-property",
                  "title": "name",
                  "description": "The name of a tab entry"
                },
                "script": {
                  "$ref": "#/definitions/string-property",
                  "title": "script",
                  "description": "The script run of a tab entry"
                },
                "matches": {
                  "title": "matches",
                  "description": "Whether to require the condition to match or not for an entry",
                  "type": "boolean"
                },
                "description": {
                  "$ref": "#/definitions/string-property",
                  "title": "description",
                  "description": "Description of the tab entry"
                },
                "task_list": {
                  "$ref": "#/definitions/string-property",
                  "title": "task_list",
                  "description": "The task list of a tab entry"
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": false
}
