{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "properties": {
        "jobs": {
            "items": {
                "properties": {
                    "authorEmail": {
                        "type": "string"
                    },
                    "authorName": {
                        "type": "string"
                    },
                    "authorUrl": {
                        "type": "string"
                    },
                    "cpus": {
                        "type": "number"
                    },
                    "description": {
                        "type": "string"
                    },
                    "errorMapping": {
                        "items": {
                            "properties": {
                                "category": {
                                    "default": "algorithm",
                                    "enum": [
                                        "algorithm",
                                        "data",
                                        "system"
                                    ],
                                    "type": "string"
                                },
                                "code": {
                                    "type": "integer"
                                },
                                "description": {
                                    "type": "string"
                                },
                                "title": {
                                    "type": "string"
                                }
                            },
                            "required": [
                                "code",
                                "title"
                            ],
                            "type": "object"
                        },
                        "type": "array"
                    },
                    "interface": {
                        "properties": {
                            "args": {
                                "type": "string"
                            },
                            "cmd": {
                                "type": "string"
                            },
                            "envVars": {
                                "items": {
                                    "properties": {
                                        "name": {
                                            "type": "string"
                                        },
                                        "value": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "name",
                                        "value"
                                    ],
                                    "type": "object"
                                },
                                "type": "object"
                            },
                            "inputData": {
                                "properties": {
                                    "files": {
                                        "items": {
                                            "properties": {
                                                "mediaType": {
                                                    "items": {
                                                        "type": "string"
                                                    },
                                                    "type": "array"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "required": {
                                                    "default": true,
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "name",
                                                "mediaType"
                                            ],
                                            "type": "object"
                                        },
                                        "type": "array"
                                    },
                                    "json": {
                                        "items": {
                                            "properties": {
                                                "name": {
                                                    "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"
                            },
                            "outputData": {
                                "properties": {
                                    "files": {
                                        "items": {
                                            "properties": {
                                                "count": {
                                                    "default": "1",
                                                    "pattern": "([0-9]+|\\*)",
                                                    "type": "string"
                                                },
                                                "mediaType": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "pattern": {
                                                    "type": "string"
                                                },
                                                "required": {
                                                    "default": true,
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "name",
                                                "mediaType",
                                                "pattern"
                                            ],
                                            "type": "object"
                                        },
                                        "type": "array"
                                    },
                                    "json": {
                                        "items": {
                                            "properties": {
                                                "key": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "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": {
                                    "properties": {
                                        "name": {
                                            "type": "string"
                                        },
                                        "secret": {
                                            "default": false,
                                            "type": "boolean"
                                        }
                                    },
                                    "required": [
                                        "name"
                                    ],
                                    "type": "object"
                                },
                                "type": "object"
                            }
                        },
                        "required": [
                            "cmd"
                        ],
                        "type": "object"
                    },
                    "mem": {
                        "type": "number"
                    },
                    "name": {
                        "pattern": "[a-z0-9_-]+",
                        "type": "string"
                    },
                    "storage": {
                        "default": 0.0,
                        "type": "number"
                    },
                    "tag": {
                        "items": {
                            "type": "string"
                        },
                        "type": "array"
                    },
                    "timeout": {
                        "type": "integer"
                    },
                    "title": {
                        "type": "string"
                    },
                    "version": {
                        "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"
                    }
                },
                "required": [
                    "name",
                    "version",
                    "title",
                    "description",
                    "authorName",
                    "timeout",
                    "cpus",
                    "mem",
                    "interface"
                ],
                "type": "object"
            },
            "type": "array"
        },
        "manifestVersion": {
            "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"
        }
    },
    "required": [
        "manifestVersion",
        "jobs"
    ],
    "type": "object"
}