{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "additionalProperties": false,
    "definitions": {
        "arguments": {
            "additionalProperties": false,
            "properties": {
                "install": {
                    "items": {
                        "$ref": "#/definitions/install_item"
                    },
                    "type": "array"
                }
            },
            "required": [
                "install"
            ],
            "type": "object"
        },
        "boolean_string": {
            "enum": [
                "true",
                "false"
            ],
            "type": "string"
        },
        "description": {
            "additionalProperties": {
                "type": "string"
            },
            "properties": {
                "en": {
                    "type": "string"
                }
            },
            "required": [
                "en"
            ],
            "type": "object"
        },
        "email": {
            "_format": "email",
            "type": "string"
        },
        "install_item": {
            "additionalProperties": false,
            "properties": {
                "ask": {
                    "$ref": "#/definitions/install_item_ask"
                },
                "choices": {
                    "$ref": "#/definitions/install_item_choice"
                },
                "default": {
                    "type": "string"
                },
                "example": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "optional": {
                    "$ref": "#/definitions/boolean_string"
                },
                "pattern": {
                    "type": "string"
                },
                "type": {
                    "$ref": "#/definitions/install_item_type"
                }
            },
            "required": [
                "name",
                "ask"
            ],
            "type": "object"
        },
        "install_item_ask": {
            "additionalProperties": {
                "type": "string"
            },
            "properties": {
                "en": {
                    "type": "string"
                }
            },
            "required": [
                "en"
            ],
            "type": "object"
        },
        "install_item_choice": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "install_item_type": {
            "enum": [
                "domain",
                "user",
                "app",
                "password",
                "path"
            ],
            "type": "string"
        },
        "maintainer": {
            "additionalProperties": false,
            "properties": {
                "email": {
                    "$ref": "#/definitions/email"
                },
                "name": {
                    "type": "string"
                }
            },
            "required": [
                "name",
                "email"
            ],
            "type": "object"
        },
        "multi_instance": {
            "$ref": "#/definitions/boolean_string"
        },
        "uri": {
            "_format": "uri",
            "type": "string"
        }
    },
    "properties": {
        "arguments": {
            "$ref": "#/definitions/arguments"
        },
        "description": {
            "$ref": "#/definitions/description"
        },
        "id": {
            "type": "string"
        },
        "maintainer": {
            "$ref": "#/definitions/maintainer"
        },
        "multi_instance": {
            "$ref": "#/definitions/multi_instance"
        },
        "name": {
            "type": "string"
        },
        "url": {
            "$ref": "#/definitions/uri"
        }
    },
    "required": [
        "name",
        "id",
        "description",
        "maintainer",
        "multi_instance",
        "arguments"
    ],
    "title": "Yunohost application manifest schema",
    "type": "object"
}