{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "http://schema.doctorlogic.com/component/v1/component.json#",
    "definitions": {
        "name": {
            "description": "The name of the Component.",
            "pattern": "^[a-z0-9_-]+$",
            "type": "string"
        },
        "type": {
            "description": "The type of the Component.",
            "pattern": "^[a-z0-9_-]+$",
            "type": "string"
        }
    },
    "additionalProperties": false,
    "properties": {
        "dependencies": {
            "description": "A list of absolute or relative URLs required for this Component. Relative paths will be resolved from the manifest file path.",
            "additionalProperties": true,
            "properties": {
                "scripts": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "styles": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            },
            "type": "object"
        },
        "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",
        "type"
    ],
    "type": "object"
}