{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "additionalProperties": false,
    "definitions": {
        "options": {
            "additionalProperties": false,
            "properties": {
                "arguments": {
                    "minItems": 1,
                    "type": "array"
                },
                "container": {
                    "additionalProperties": false,
                    "properties": {
                        "installer": {
                            "type": "string"
                        },
                        "kind": {
                            "enum": [
                                "zip"
                            ],
                            "type": "string"
                        }
                    },
                    "required": [
                        "kind",
                        "installer"
                    ],
                    "type": "object"
                },
                "destination": {
                    "type": "string"
                },
                "extension": {
                    "type": "string"
                },
                "filename": {
                    "type": "string"
                },
                "shims": {
                    "type": "array"
                },
                "shortcuts": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                            "name",
                            "target"
                        ],
                        "properties": {
                            "name": {
                                "type": "string"
                            },
                            "target": {
                                "type": "string"
                            }
                        }
                    }
                }
            },
            "type": "object"
        }
    },
    "properties": {
        "$schema": {
            "type": "string"
        },
        "packages": {
            "additionalProperties": false,
            "patternProperties": {
                "^[a-zA-Z0-9\\.\\-\\+]+$": {
                    "additionalProperties": false,
                    "properties": {
                        "installer": {
                            "additionalProperties": false,
                            "properties": {
                                "interactive": {
                                    "type": "boolean"
                                },
                                "kind": {
                                    "enum": [
                                        "advancedinstaller",
                                        "appx",
                                        "as-is",
                                        "copy",
                                        "custom",
                                        "easy_install_26",
                                        "easy_install_27",
                                        "innosetup",
                                        "jetbrains-nsis",
                                        "msi",
                                        "nsis",
                                        "squirrel",
                                        "zip"
                                    ],
                                    "type": "string"
                                },
                                "options": {
                                    "oneOf": [
                                        {
                                            "$ref": "#/definitions/options"
                                        },
                                        {
                                            "additionalProperties": false,
                                            "properties": {
                                                "x86": {
                                                    "$ref": "#/definitions/options"
                                                },
                                                "x86_64": {
                                                    "$ref": "#/definitions/options"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                },
                                "x86": {
                                    "type": "string"
                                },
                                "x86_64": {
                                    "type": "string"
                                }
                            },
                            "anyOf": [
                                {
                                    "required": [
                                        "kind",
                                        "x86"
                                    ]
                                },
                                {
                                    "required": [
                                        "kind",
                                        "x86_64"
                                    ]
                                }
                            ],
                            "type": "object"
                        },
                        "version": {
                            "maxLength": 64,
                            "minLength": 1,
                            "type": "string"
                        }
                    },
                    "required": [
                        "version",
                        "installer"
                    ],
                    "type": "object"
                }
            },
            "type": "object"
        },
        "version": {
            "maximum": 4,
            "minimum": 4,
            "type": "integer"
        }
    },
    "required": [
        "$schema",
        "packages",
        "version"
    ],
    "type": "object"
}