{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "DotfilesReleaseConfig",
  "type": "object",
  "properties": {
    "apps": {
      "description": "Relative path to the folder containing the OS based curated app lists",
      "type": [
        "string",
        "null"
      ]
    },
    "author": {
      "description": "Name of the author of the dotfiles repository",
      "type": [
        "string",
        "null"
      ],
      "default": null
    },
    "dependencies": {
      "description": "Relative path to the folder containing the OS based package dependencies.",
      "type": [
        "string",
        "null"
      ],
      "default": null
    },
    "description": {
      "type": [
        "string",
        "null"
      ],
      "default": null
    },
    "dotfiles": {
      "description": "Relative path to the folder containing the dotfiles that should be installed.",
      "type": "string"
    },
    "hooks": {
      "description": "Relative path to the folder containing the RHAI hook scripts.",
      "type": [
        "string",
        "null"
      ],
      "default": null
    },
    "id": {
      "description": "ID of the dotfiles release",
      "type": "string"
    },
    "name": {
      "description": "Name of the dotfiles release",
      "type": "string"
    },
    "options": {
      "$ref": "#/$defs/Options",
      "default": {
        "git_lfs": false,
        "request_aur": false
      }
    },
    "repository": {
      "description": "Dotfiles git repository HTTPS link.",
      "type": "string"
    },
    "restore": {
      "description": "List of restore options the user can choose",
      "type": "array",
      "default": [],
      "items": {
        "$ref": "#/$defs/RestoreItem"
      }
    },
    "tag": {
      "description": "If specified the tagged version of the dotfiles repository will be installed",
      "type": [
        "string",
        "null"
      ],
      "default": null
    },
    "website": {
      "description": "Link to the website where the user can find more information about the dotfiles",
      "type": [
        "string",
        "null"
      ],
      "default": null
    }
  },
  "required": [
    "name",
    "id",
    "repository",
    "dotfiles"
  ],
  "$defs": {
    "Options": {
      "type": "object",
      "properties": {
        "git_lfs": {
          "type": "boolean",
          "default": false
        },
        "request_aur": {
          "type": "boolean",
          "default": false
        }
      }
    },
    "RestoreItem": {
      "type": "object",
      "properties": {
        "information": {
          "description": "Additional information for the user.",
          "type": [
            "string",
            "null"
          ],
          "default": null
        },
        "name": {
          "description": "Name of the item shown to the user.",
          "type": "string"
        },
        "path": {
          "description": "Relative path from repository root.\nMay be a single file or a complete folder.",
          "type": "string"
        },
        "selected": {
          "description": "Defines if the restore item should be selected by default.\nThe user selection from the last update takes precedence.",
          "type": "boolean",
          "default": false
        }
      },
      "required": [
        "name",
        "path"
      ]
    }
  }
}
