{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "definitions": {
    "manifest_image_resource": {
      "type": "object",
      "properties": {
        "sizes": {
          "description": "The sizes member is a string consisting of an unordered set of unique space-separated tokens which are ASCII case-insensitive that represents the dimensions of an image for visual media.",
          "oneOf": [
            {
              "type": "string",
              "pattern": "^[0-9 x]+$"
            },
            {
              "enum": ["any"]
            }
          ]
        },
        "src": {
          "description": "The src member of an image is a URL from which a user agent can fetch the icon's data.",
          "type": "string"
        },
        "type": {
          "description": "The type member of an image is a hint as to the media type of the image.",
          "type": "string",
          "pattern": "^[\\sa-z0-9\\-+;\\.=\\/]+$"
        },
        "purpose": {
          "type": "string",
          "enum": [
            "monochrome",
            "maskable",
            "any",
            "monochrome maskable",
            "monochrome any",
            "maskable monochrome",
            "maskable any",
            "any monochrome",
            "any maskable",
            "monochrome maskable any",
            "monochrome any maskable",
            "maskable monochrome any",
            "maskable any monochrome",
            "any monochrome maskable",
            "any maskable monochrome"
          ],
          "default": "any"
        }
      },
      "required": ["src"]
    },
    "external_application_resource": {
      "type": "object",
      "properties": {
        "platform": {
          "description": "The platform it is associated to.",
          "enum": ["chrome_web_store", "play", "itunes", "windows"]
        },
        "url": {
          "description": "The URL where the application can be found.",
          "type": "string",
          "format": "uri"
        },
        "id": {
          "description": "Information additional to the URL or instead of the URL, depending on the platform.",
          "type": "string"
        },
        "min_version": {
          "description": "Information about the minimum version of an application related to this web app.",
          "type": "string"
        },
        "fingerprints": {
          "description": "An array of fingerprint objects used for verifying the application.",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string"
              },
              "value": {
                "type": "string"
              }
            }
          }
        }
      },
      "required": ["platform"]
    },
    "shortcut_item": {
      "type": "object",
      "description": "A shortcut item represents a link to a key task or page within a web app. A user agent can use these values to assemble a context menu to be displayed by the operating system when a user engages with the web app's icon.",
      "properties": {
        "name": {
          "description": "The name member of a shortcut item is a string that represents the name of the shortcut as it is usually displayed to the user in a context menu.",
          "type": "string"
        },
        "short_name": {
          "description": "The short_name member of a shortcut item is a string that represents a short version of the name of the shortcut. It is intended to be used where there is insufficient space to display the full name of the shortcut.",
          "type": "string"
        },
        "description": {
          "description": "The description member of a shortcut item is a string that allows the developer to describe the purpose of the shortcut.",
          "type": "string"
        },
        "url": {
          "description": "The url member of a shortcut item is a URL within scope of a processed manifest that opens when the associated shortcut is activated.",
          "type": "string"
        },
        "icons": {
          "description": "The icons member of a shortcut item serves as iconic representations of the shortcut in various contexts.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/manifest_image_resource"
          }
        }
      },
      "required": ["name", "url"]
    }
  },
  "id": "https://json.schemastore.org/web-manifest.json",
  "properties": {
    "background_color": {
      "description": "The background_color member describes the expected background color of the web application.",
      "type": "string"
    },
    "dir": {
      "description": "The base direction of the manifest.",
      "enum": ["ltr", "rtl", "auto"],
      "default": "auto"
    },
    "display": {
      "description": "The item represents the developer's preferred display mode for the web application.",
      "enum": ["fullscreen", "standalone", "minimal-ui", "browser"],
      "default": "browser"
    },
    "icons": {
      "description": "The icons member is an array of icon objects that can serve as iconic representations of the web application in various contexts.",
      "type": "array",
      "items": {
        "$ref": "#/definitions/manifest_image_resource"
      }
    },
    "lang": {
      "description": "The primary language for the values of the manifest.",
      "type": "string"
    },
    "name": {
      "description": "The name of the web application.",
      "type": "string"
    },
    "orientation": {
      "description": "The orientation member is a string that serves as the default orientation for all  top-level browsing contexts of the web application.",
      "enum": [
        "any",
        "natural",
        "landscape",
        "portrait",
        "portrait-primary",
        "portrait-secondary",
        "landscape-primary",
        "landscape-secondary"
      ]
    },
    "prefer_related_applications": {
      "description": "Boolean value that is used as a hint for the user agent to say that related applications should be preferred over the web application.",
      "type": "boolean"
    },
    "related_applications": {
      "description": "Array of application accessible to the underlying application platform that has a relationship with the web application.",
      "type": "array",
      "items": {
        "$ref": "#/definitions/external_application_resource"
      }
    },
    "scope": {
      "description": "A string that represents the navigation scope of this web application's application context.",
      "type": "string"
    },
    "short_name": {
      "description": "A string that represents a short version of the name of the web application.",
      "type": "string"
    },
    "shortcuts": {
      "description": "Array of shortcut items that provide access to key tasks within a web application.",
      "type": "array",
      "items": {
        "$ref": "#/definitions/shortcut_item"
      }
    },
    "start_url": {
      "description": "Represents the URL that the developer would prefer the user agent load when the user launches the web application.",
      "type": "string"
    },
    "theme_color": {
      "description": "The theme_color member serves as the default theme color for an application context.",
      "type": "string"
    },
    "id": {
      "description": "A string that represents the id of the web application.",
      "type": "string"
    }
  },
  "title": "JSON schema for Web Application manifest files",
  "type": "object"
}
