{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "channon plan schema",
    "type": "object",
    "properties": {
        "name": {
            "type": "string"
        },
        "description": {
            "type": "string"
        },
        "steps": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string"
                    },
                    "payload": {
                        "type": "string",
                        "pattern": "^#!"
                    }
                },
                "required": [
                    "name",
                    "payload"
                ]
            }
        },
        "notifications": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "target": {
                        "type": "string",
                        "enum": [
                            "every-run",
                            "every-failure",
                            "result-changed"
                        ]
                    },
                    "payload": {
                        "type": "string",
                        "pattern": "^#!"
                    }
                },
                "required": [
                    "target",
                    "payload"
                ]
            }
        },
        "triggers": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "type": {
                        "type": "string"
                    },
                    "schedule": {
                        "type": "string"
                    }
                },
                "required": [
                    "type"
                ]
            }
        },
        "tags": {
            "type": "array",
            "items": {
                "type": "string"
            }
        }
    },
    "required": [
        "name"
    ]
}