{
    "allOf": [
        {
            "additionalProperties": false,
            "properties": {
                "__version": {
                    "exclusiveMinimum": 0,
                    "type": "integer"
                },
                "dag": {
                    "$ref": "#/definitions/dag"
                }
            },
            "required": [
                "__version",
                "dag"
            ],
            "type": "object"
        }
    ],
    "definitions": {
        "color": {
            "pattern": "^#[a-fA-F0-9]{3,6}$",
            "type": "string"
        },
        "dag": {
            "additionalProperties": false,
            "properties": {
                "_access_control": {
                    "$ref": "#/definitions/dict"
                },
                "_concurrency": {
                    "type": "number"
                },
                "_dag_id": {
                    "type": "string"
                },
                "_default_view": {
                    "type": "string"
                },
                "_description": {
                    "type": "string"
                },
                "catchup": {
                    "type": "boolean"
                },
                "dagrun_timeout": {
                    "$ref": "#/definitions/timedelta"
                },
                "default_args": {
                    "$ref": "#/definitions/dict"
                },
                "doc_md": {
                    "type": "string"
                },
                "end_date": {
                    "$ref": "#/definitions/datetime"
                },
                "fileloc": {
                    "type": "string"
                },
                "is_paused_upon_creation": {
                    "type": "boolean"
                },
                "is_subdag": {
                    "type": "boolean"
                },
                "max_active_runs": {
                    "type": "number"
                },
                "orientation": {
                    "type": "string"
                },
                "params": {
                    "$ref": "#/definitions/dict"
                },
                "schedule_interval": {
                    "anyOf": [
                        {
                            "type": "null"
                        },
                        {
                            "type": "string"
                        },
                        {
                            "$ref": "#/definitions/typed_timedelta"
                        },
                        {
                            "$ref": "#/definitions/typed_relativedelta"
                        }
                    ]
                },
                "start_date": {
                    "$ref": "#/definitions/datetime"
                },
                "tags": {
                    "type": "array"
                },
                "tasks": {
                    "$ref": "#/definitions/tasks"
                },
                "timezone": {
                    "$ref": "#/definitions/timezone"
                }
            },
            "required": [
                "_dag_id",
                "fileloc",
                "tasks"
            ],
            "type": "object"
        },
        "datetime": {
            "description": "A date time, stored as fractional seconds since the epoch",
            "type": "number"
        },
        "dict": {
            "description": "A python dictionary containing values of any type",
            "type": "object"
        },
        "extra_links": {
            "items": {
                "maxProperties": 1,
                "minProperties": 1,
                "type": "object"
            },
            "type": "array"
        },
        "operator": {
            "$comment": "A task/operator in a DAG",
            "additionalProperties": true,
            "properties": {
                "_downstream_task_ids": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                "_operator_extra_links": {
                    "$ref": "#/definitions/extra_links"
                },
                "_task_module": {
                    "type": "string"
                },
                "_task_type": {
                    "type": "string"
                },
                "depends_on_past": {
                    "type": "boolean"
                },
                "do_xcom_push": {
                    "type": "boolean"
                },
                "end_date": {
                    "$ref": "#/definitions/datetime"
                },
                "execution_timeout": {
                    "$ref": "#/definitions/timedelta"
                },
                "executor_config": {
                    "$ref": "#/definitions/dict"
                },
                "owner": {
                    "type": "string"
                },
                "params": {
                    "$ref": "#/definitions/dict"
                },
                "pool": {
                    "type": "string"
                },
                "pool_slots": {
                    "type": "number"
                },
                "priority_weight": {
                    "type": "number"
                },
                "queue": {
                    "type": "string"
                },
                "retries": {
                    "type": "number"
                },
                "retry_delay": {
                    "$ref": "#/definitions/timedelta"
                },
                "retry_exponential_backoff": {
                    "type": "boolean"
                },
                "start_date": {
                    "$ref": "#/definitions/datetime"
                },
                "subdag": {
                    "$ref": "#/definitions/dag"
                },
                "task_id": {
                    "type": "string"
                },
                "template_fields": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                "trigger_rule": {
                    "type": "string"
                },
                "ui_color": {
                    "$ref": "#/definitions/color"
                },
                "ui_fgcolor": {
                    "$ref": "#/definitions/color"
                },
                "wait_for_downstream": {
                    "type": "boolean"
                },
                "weight_rule": {
                    "type": "string"
                }
            },
            "required": [
                "_task_type",
                "_task_module",
                "task_id",
                "ui_color",
                "ui_fgcolor",
                "template_fields"
            ],
            "type": "object"
        },
        "tasks": {
            "additionalProperties": {
                "$ref": "#/definitions/operator"
            },
            "type": "array"
        },
        "timedelta": {
            "minimum": 0,
            "type": "number"
        },
        "timezone": {
            "type": "string"
        },
        "typed_relativedelta": {
            "description": "A dateutil.relativedelta.relativedelta object",
            "properties": {
                "__type": {
                    "const": "relativedelta",
                    "type": "string"
                },
                "__var": {
                    "additionalProperties": {
                        "type": "integer"
                    },
                    "properties": {
                        "weekday": {
                            "items": {
                                "type": "integer"
                            },
                            "maxItems": 2,
                            "minItems": 1,
                            "type": "array"
                        }
                    },
                    "type": "object"
                }
            },
            "type": "object"
        },
        "typed_timedelta": {
            "additionalProperties": false,
            "properties": {
                "__type": {
                    "const": "timedelta",
                    "type": "string"
                },
                "__var": {
                    "$ref": "#/definitions/timedelta"
                }
            },
            "required": [
                "__type",
                "__var"
            ],
            "type": "object"
        }
    },
    "type": "object"
}