{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "http://schema.doctorlogic.com/component/v2/tree.json#",
    "$ref": "#/definitions/tree",
    "definitions": {
        "tree": {
            "type": "object",
            "properties": {
                "name": {
                    "$ref": "component.json#/definitions/name"
                },
                "type": {
                    "$ref": "component.json#/definitions/type"
                },
                "children": {
                    "description": "A list of component trees.",
                    "items": {
                        "$ref": "#/definitions/slotted_tree"
                    },
                    "type": "array"
                },
                "context": {
                    "type": "object",
                    "description": "The rendering context for the Component."
                },
                "config": {
                    "description": "The configuration to override the database configuration.",
                    "type": "object"
                },
                "additionalDependencies": {
                    "$ref": "component.json#/definitions/dependencies",
                    "description": "A list of absolute or relative URLs required for this Component instance. Relative paths will be resolved from the manifest file path."
                }
            },
            "required": [
                "name",
                "type"
            ]
        },
        "slotted_tree": {
            "allOf": [
                {
                    "$ref": "#/definitions/tree"
                },
                {
                    "properties": {
                        "slot": {
                            "type": "string",
                            "description": "The parent slot this Component should be placed in."
                        }
                    }
                }
            ]
        }
    }
}