{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "additionalProperties": false,
    "properties": {
        "job": {
            "additionalProperties": false,
            "properties": {
                "description": {
                    "type": "string"
                },
                "errors": {
                    "items": {
                        "additionalProperties": false,
                        "properties": {
                            "category": {
                                "default": "job",
                                "enum": [
                                    "job",
                                    "data"
                                ],
                                "type": "string"
                            },
                            "code": {
                                "type": "integer"
                            },
                            "description": {
                                "type": "string"
                            },
                            "name": {
                                "pattern": "^[a-zA-Z0-9_-]+$",
                                "type": "string"
                            },
                            "title": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "code",
                            "name"
                        ],
                        "type": "object"
                    },
                    "type": "array"
                },
                "interface": {
                    "additionalProperties": false,
                    "properties": {
                        "command": {
                            "type": "string"
                        },
                        "inputs": {
                            "additionalProperties": false,
                            "properties": {
                                "files": {
                                    "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                            "mediaTypes": {
                                                "items": {
                                                    "type": "string"
                                                },
                                                "type": "array"
                                            },
                                            "multiple": {
                                                "default": false,
                                                "type": "boolean"
                                            },
                                            "name": {
                                                "pattern": "^[a-zA-Z0-9_-]+$",
                                                "type": "string"
                                            },
                                            "partial": {
                                                "default": false,
                                                "type": "boolean"
                                            },
                                            "required": {
                                                "default": true,
                                                "type": "boolean"
                                            }
                                        },
                                        "required": [
                                            "name"
                                        ],
                                        "type": "object"
                                    },
                                    "type": "array"
                                },
                                "json": {
                                    "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                            "name": {
                                                "pattern": "^[a-zA-Z0-9_-]+$",
                                                "type": "string"
                                            },
                                            "required": {
                                                "default": true,
                                                "type": "boolean"
                                            },
                                            "type": {
                                                "enum": [
                                                    "array",
                                                    "boolean",
                                                    "integer",
                                                    "number",
                                                    "object",
                                                    "string"
                                                ],
                                                "type": "string"
                                            }
                                        },
                                        "required": [
                                            "name",
                                            "type"
                                        ],
                                        "type": "object"
                                    },
                                    "type": "array"
                                }
                            },
                            "type": "object"
                        },
                        "mounts": {
                            "items": {
                                "additionalProperties": false,
                                "properties": {
                                    "mode": {
                                        "default": "ro",
                                        "enum": [
                                            "ro",
                                            "rw"
                                        ]
                                    },
                                    "name": {
                                        "pattern": "^[a-zA-Z0-9_-]+$",
                                        "type": "string"
                                    },
                                    "path": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "name",
                                    "path"
                                ],
                                "type": "object"
                            },
                            "type": "array"
                        },
                        "outputs": {
                            "additionalProperties": false,
                            "properties": {
                                "files": {
                                    "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                            "mediaType": {
                                                "type": "string"
                                            },
                                            "multiple": {
                                                "default": false,
                                                "type": "boolean"
                                            },
                                            "name": {
                                                "pattern": "^[a-zA-Z0-9_-]+$",
                                                "type": "string"
                                            },
                                            "pattern": {
                                                "type": "string"
                                            },
                                            "required": {
                                                "default": true,
                                                "type": "boolean"
                                            }
                                        },
                                        "required": [
                                            "name",
                                            "pattern"
                                        ],
                                        "type": "object"
                                    },
                                    "type": "array"
                                },
                                "json": {
                                    "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                            "key": {
                                                "type": "string"
                                            },
                                            "name": {
                                                "pattern": "^[a-zA-Z0-9_-]+$",
                                                "type": "string"
                                            },
                                            "required": {
                                                "default": true,
                                                "type": "boolean"
                                            },
                                            "type": {
                                                "enum": [
                                                    "array",
                                                    "boolean",
                                                    "integer",
                                                    "number",
                                                    "object",
                                                    "string"
                                                ],
                                                "type": "string"
                                            }
                                        },
                                        "required": [
                                            "name",
                                            "type"
                                        ],
                                        "type": "object"
                                    },
                                    "type": "array"
                                }
                            },
                            "type": "object"
                        },
                        "settings": {
                            "items": {
                                "additionalProperties": false,
                                "properties": {
                                    "name": {
                                        "pattern": "^[a-zA-Z0-9_-]+$",
                                        "type": "string"
                                    },
                                    "secret": {
                                        "default": false,
                                        "type": "boolean"
                                    }
                                },
                                "required": [
                                    "name"
                                ],
                                "type": "object"
                            },
                            "type": "array"
                        }
                    },
                    "type": "object"
                },
                "jobVersion": {
                    "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-(0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$",
                    "type": "string"
                },
                "maintainer": {
                    "additionalProperties": false,
                    "properties": {
                        "email": {
                            "type": "string"
                        },
                        "name": {
                            "type": "string"
                        },
                        "organization": {
                            "type": "string"
                        },
                        "phone": {
                            "type": "string"
                        },
                        "url": {
                            "type": "string"
                        }
                    },
                    "required": [
                        "name",
                        "email"
                    ],
                    "type": "object"
                },
                "name": {
                    "pattern": "^[a-zA-Z0-9-]+$",
                    "type": "string"
                },
                "packageVersion": {
                    "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-(0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$",
                    "type": "string"
                },
                "resources": {
                    "additionalProperties": false,
                    "properties": {
                        "scalar": {
                            "items": {
                                "additionalProperties": false,
                                "properties": {
                                    "inputMultiplier": {
                                        "type": "number"
                                    },
                                    "name": {
                                        "pattern": "^[a-zA-Z0-9_-]+$",
                                        "type": "string"
                                    },
                                    "value": {
                                        "type": "number"
                                    }
                                },
                                "required": [
                                    "name",
                                    "value"
                                ],
                                "type": "object"
                            },
                            "required": [
                                "scalar"
                            ],
                            "type": "array"
                        }
                    },
                    "type": "object"
                },
                "tags": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                "timeout": {
                    "type": "integer"
                },
                "title": {
                    "type": "string"
                }
            },
            "required": [
                "name",
                "jobVersion",
                "packageVersion",
                "title",
                "description",
                "maintainer",
                "timeout"
            ],
            "type": "object"
        },
        "seedVersion": {
            "pattern": "^SEED_VERSION$",
            "type": "string"
        }
    },
    "required": [
        "seedVersion",
        "job"
    ],
    "type": "object"
}