{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://json.schemastore.org/cinnamon-spice.info.json",
  "title": "Cinnamon Spice info.json schema",
  "description": "Schema for the info.json metadata file of a Cinnamon Spice, as documented at: <https://github.com/linuxmint/cinnamon-spices-extensions>, <https://github.com/linuxmint/cinnamon-spices-applet>, <https://github.com/linuxmint/cinnamon-spices-desklets>, and <https://github.com/linuxmint/cinnamon-spices-themes>",
  "oneOf": [
    {
      "$comment": "This alternative was added so that the numerous existing info.json files that only contain the 'author' property are valid.",
      "additionalProperties": false,
      "properties": {
        "$schema": {
          "description": "The JSON schema to validate the file against",
          "minLength": 1,
          "type": "string"
        },
        "author": {
          "description": "The primary, current author of this Cinnamon Spice; the GitHub style `Name <email> (url)` is supported",
          "type": "string"
        }
      },
      "required": ["author"],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "$schema": {
          "description": "The JSON schema to validate the file against",
          "minLength": 1,
          "type": "string"
        },
        "author": {
          "description": "The primary, current author of this Cinnamon Spice; the GitHub style `Name <email> (url)` is supported.",
          "minLength": 1,
          "type": "string"
        },
        "contributors": {
          "description": "A list of other contributors to this Cinnamon Spice; the GitHub style `Name <email> (url)` is supported.",
          "items": {
            "type": "string"
          },
          "minItems": 1,
          "type": "array"
        },
        "description": {
          "description": "A short description of this Cinnamon Spice to be displayed in the catalog",
          "minLength": 1,
          "type": "string"
        },
        "git_author": {
          "description": "DEPRECATED: Use the `author` field instead",
          "minLength": 1,
          "type": "string"
        },
        "license": {
          "$ref": "https://json.schemastore.org/base.json#/definitions/license",
          "description": "The license under which this Cinnamon Spice is released"
        },
        "name": {
          "description": "An unique name for this Cinnamon Spice",
          "minLength": 1,
          "type": "string"
        },
        "original_author": {
          "description": "The name of the author who originally wrote this Cinnamon Spice if it is not the same as the current `author`; the GitHub style `Name <email> (url)` is supported.",
          "minLength": 1,
          "type": "string"
        },
        "thubmnail": {
          "description": "DEPRECATED: The icon should be in the `icon.png` file, and the screenshot in the `screenshot.png` file",
          "minLength": 1,
          "type": "string"
        },
        "url": {
          "description": "The url of the home page for this Cinnamon Spice, e.g., the GitHub repository",
          "format": "url",
          "minLength": 1,
          "type": "string"
        }
      },
      "required": ["name", "description", "author"],
      "type": "object"
    }
  ]
}
