{
    "additionalProperties": false,
    "description": "Gadget definition schema",
    "properties": {
        "module": {
            "additionalProperties": false,
            "properties": {
                "dependencies": {
                    "description": "ResourceLoader modules this gadget depends upon",
                    "type": "array"
                },
                "messages": {
                    "description": "Messages this gadget depends upon",
                    "type": "array"
                },
                "position": {
                    "default": "bottom",
                    "description": "Whether this module should be loaded asynchronously after the page loads (bottom) or synchronously before the page is rendered (top)",
                    "enum": [
                        "top",
                        "bottom"
                    ],
                    "type": "string"
                },
                "scripts": {
                    "description": "List of JavaScript pages included in this gadget",
                    "type": "array"
                },
                "styles": {
                    "description": "List of CSS pages included in this gadget",
                    "type": "array"
                }
            },
            "type": "object"
        },
        "settings": {
            "additionalProperties": false,
            "properties": {
                "category": {
                    "default": "",
                    "description": "Key of the category this gadget belongs to",
                    "type": "string"
                },
                "default": {
                    "default": false,
                    "description": "Whether this gadget is enabled by default",
                    "type": "boolean"
                },
                "hidden": {
                    "default": false,
                    "description": "Whether this gadget is hidden from preferences",
                    "type": "boolean"
                },
                "rights": {
                    "description": "The rights required to be able to enable/load this gadget",
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                "skins": {
                    "description": "Skins supported by this gadget; empty or true if all skins are supported",
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "boolean"
                    ]
                }
            },
            "type": "object"
        }
    },
    "type": "object"
}