{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "definitions": {
        "url": {
            "type": "string",
            "allOf": [
                {
                    "format": "uri"
                },
                {
                    "pattern": "^https?://"
                }
            ]
        },
        "hash": {
            "additionalProperties": false,
            "properties": {
                "algo": {
                    "enum": [
                        "sha256"
                    ],
                    "type": "string"
                },
                "value": {
                    "type": "string"
                }
            },
            "required": [
                "algo",
                "value"
            ],
            "type": "object"
        },
        "cliInfo": {
            "additionalProperties": false,
            "properties": {
                "contentHash": {
                    "items": {
                        "$ref": "#/definitions/hash"
                    },
                    "minItems": 1,
                    "type": "array"
                },
                "kind": {
                    "enum": [
                        "executable",
                        "zip"
                    ],
                    "type": "string"
                },
                "url": {
                    "$ref": "#/definitions/url"
                }
            },
            "required": [
                "url",
                "kind",
                "contentHash"
            ],
            "type": "object"
        },
        "cli": {
            "additionalProperties": false,
            "properties": {
                "binaries": {
                    "additionalProperties": false,
                    "minProperties": 1,
                    "properties": {
                        "darwin": {
                            "additionalProperties": false,
                            "properties": {
                                "x86-64": {
                                    "$ref": "#/definitions/cliInfo"
                                }
                            },
                            "required": [
                                "x86-64"
                            ],
                            "type": "object"
                        },
                        "linux": {
                            "additionalProperties": false,
                            "properties": {
                                "x86-64": {
                                    "$ref": "#/definitions/cliInfo"
                                }
                            },
                            "required": [
                                "x86-64"
                            ],
                            "type": "object"
                        },
                        "windows": {
                            "additionalProperties": false,
                            "properties": {
                                "x86-64": {
                                    "$ref": "#/definitions/cliInfo"
                                }
                            },
                            "required": [
                                "x86-64"
                            ],
                            "type": "object"
                        }
                    },
                    "type": "object"
                }
            },
            "required": [
                "binaries"
            ],
            "type": "object"
        }
    },
    "properties": {
        "packageName": {
            "type": "string"
        },
        "packageVersion": {
            "type": "string"
        },
        "appId": {
            "type": "string"
        },
        "postInstallNotes": {
            "type": "string"
        },
        "cli": {
            "$ref": "#/definitions/cli"
        }
    },
    "required": [
        "packageName",
        "packageVersion",
        "appId"
    ],
    "additionalProperties": false
}