{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Marketplace",
  "description": "Firefox Marketplace manifest.webapp file - shared",
  "type": "object",
  "required": [
    "description",
    "name"
  ],
  "additionalProperties": false,
  "dependencies": {
    "default_locale": [
      "locales"
    ]
  },
  "properties": {
    "activities": {
      "type": "object",
      "minProperties": 1,
      "additionalProperties": {
        "type": "object",
        "required": [
          "href"
        ],
        "additionalProperties": false,
        "properties": {
          "href": {
            "type": "string"
          },
          "returnValue": {
            "type": "boolean"
          },
          "disposition": {
            "type": "string",
            "oneOf": [
              {
                "enum": [
                  "window"
                ]
              },
              {
                "enume": [
                  "inline"
                ]
              }
            ]
          },
          "filters": {
            "type": "object",
            "minProperties": 1
          }
        }
      }
    },
    "appcache_path": {
      "type": "string",
      "minLength": 1
    },
    "chrome": {
      "type": "object",
      "additionalProperties": false,
      "minProperties": 1,
      "properties": {
        "navigation": {
          "type": "boolean"
        }
      }
    },
    "csp": {
      "type": "string",
      "minLength": 1
    },
    "default_locale": {
      "type": "string",
      "minLength": 1
    },
    "developer": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "url": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": [
        "name"
      ]
    },
    "description": {
      "description": "Description of app",
      "type": "string",
      "maxLength": 1024,
      "minLength": 1
    },
    "fullscreen": {
      "type": "string",
      "oneOf": [
        {
          "enum": [
            "true"
          ]
        },
        {
          "enum": [
            "false"
          ]
        }
      ]
    },
    "icons": {
      "type": "object"
    },
    "inputs": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "required": [
          "launch_path",
          "name",
          "description",
          "types"
        ],
        "properties": {
          "launch_path": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1
          },
          "description": {
            "type": "string",
            "minLength": 1
          },
          "types": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string",
              "oneOf": [
                {
                  "enum": [
                    "text"
                  ]
                },
                {
                  "enum": [
                    "url"
                  ]
                },
                {
                  "enum": [
                    "email"
                  ]
                },
                {
                  "enum": [
                    "password"
                  ]
                },
                {
                  "enum": [
                    "number"
                  ]
                },
                {
                  "enum": [
                    "option"
                  ]
                }
              ]
            }
          },
          "locales": {
            "type": "object",
            "additionalProperties": {
              "additionalProperties": false,
              "properties": {
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "installs_allowed_from": {
      "type": "array"
    },
    "launch_path": {
      "type": "string",
      "pattern": "^(/[^/]+)*/?$",
      "minLength": 1
    },
    "locales": {
      "type": "object"
    },
    "messages": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "name": {
      "description": "App name",
      "type": "string",
      "maxLength": 128,
      "minLength": 1
    },
    "orientation": {
      "type": "string",
      "anyOf": [
        {
          "enum": [
            "portrait"
          ]
        },
        {
          "enum": [
            "landscape"
          ]
        },
        {
          "enum": [
            "portrait-secondary"
          ]
        },
        {
          "enum": [
            "landscape-secondary"
          ]
        },
        {
          "enum": [
            "portrait-primary"
          ]
        },
        {
          "enum": [
            "landscape-primary"
          ]
        }
      ]
    },
    "origin": {
      "type": "string",
      "pattern": "\\w+$"
    },
    "permissions": {
      "type": "object"
    },
    "precompile": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "redirects": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string"
          }
        }
      }
    },
    "required_features": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "role": {
      "type": "string",
      "oneOf": [
        {
          "enum": [
            "system"
          ]
        },
        {
          "enum": [
            "input"
          ]
        },
        {
          "enum": [
            "homescreen"
          ]
        }
      ]
    },
    "type": {
      "type": "string",
      "oneOf": [
        {
          "enum": [
            "web"
          ]
        },
        {
          "enum": [
            "privileged"
          ]
        },
        {
          "enum": [
            "certified"
          ]
        }
      ]
    },
    "version": {
      "type": "string",
      "minLength": 1
    }
  }
}