{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "http://schema.doctorlogic.com/component/v4/component.json#",
    "$ref": "#/definitions/component",
    "definitions": {
        "name": {
            "type": "string",
            "description": "The name of the Component.",
            "pattern": "^[a-z0-9_-]+$"
        },
        "type": {
            "type": "string",
            "description": "The type of the Component.",
            "pattern": "^[a-z0-9_-]+$"
        },
        "dependencies": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
                "scripts": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "styles": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            }
        },
        "component": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "dependencies": {
                    "$ref": "#/definitions/dependencies",
                    "description": "A list of absolute or relative URLs required for this Component. Relative paths will be resolved from the manifest file path."
                },
                "description": {
                    "description": "The description of the Component.",
                    "type": "string"
                },
                "name": {
                    "$ref": "#/definitions/name"
                },
                "template": {
                    "description": "The optional template to be used by the Component.",
                    "type": "string"
                },
                "type": {
                    "$ref": "#/definitions/type"
                },
                "context": {
                    "description": "The default rendering context for all instances of the Component.",
                    "type": "object"
                }
            },
            "required": [
                "description",
                "name",
                "template",
                "type"
            ]
        }
    }
}
