{
    "id": "https://github.com/bergloman/NodeProcessManager:topology",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
        "general": {
            "type": "object",
            "properties": {
                "description": {
                    "type": "string"
                },
                "heartbeat": {
                    "type": "integer"
                },
                "weight": {
                    "type": "integer"
                },
                "worker_affinity": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "pass_binary_messages": {
                    "type": "boolean"
                },
                "wrapper": {
                    "type": "object",
                    "properties": {
                        "log_level": {
                            "type": "string",
                            "enum": [
                                "debug",
                                "log",
                                "info",
                                "normal",
                                "warn",
                                "error",
                                "none"
                            ]
                        },
                        "ping_parent_timeout": {
                            "type": "number"
                        },
                        "ping_parent_interval": {
                            "type": "number"
                        },
                        "ping_child_timeout": {
                            "type": "number"
                        },
                        "ping_child_interval": {
                            "type": "number"
                        }
                    },
                    "additionalProperties": false
                },
                "initialization": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "working_dir": {
                                "type": "string"
                            },
                            "cmd": {
                                "type": "string"
                            },
                            "init": {
                                "type": "object",
                                "additionalProperties": true
                            },
                            "disabled": {
                                "type": [
                                    "boolean",
                                    "string"
                                ]
                            }
                        },
                        "required": [
                            "working_dir",
                            "cmd"
                        ],
                        "additionalProperties": false
                    }
                },
                "shutdown": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "working_dir": {
                                "type": "string"
                            },
                            "cmd": {
                                "type": "string"
                            },
                            "init": {
                                "type": "object",
                                "additionalProperties": true
                            },
                            "disabled": {
                                "type": [
                                    "boolean",
                                    "string"
                                ]
                            }
                        },
                        "required": [
                            "working_dir",
                            "cmd"
                        ],
                        "additionalProperties": false
                    }
                },
                "shutdown_hard": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "working_dir": {
                                "type": "string"
                            },
                            "cmd": {
                                "type": "string"
                            },
                            "init": {
                                "type": "object",
                                "additionalProperties": true
                            },
                            "disabled": {
                                "type": [
                                    "boolean",
                                    "string"
                                ]
                            }
                        },
                        "required": [
                            "working_dir",
                            "cmd"
                        ],
                        "additionalProperties": false
                    }
                }
            },
            "required": [
                "heartbeat"
            ],
            "additionalProperties": false
        },
        "spouts": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string"
                    },
                    "description": {
                        "type": "string"
                    },
                    "type": {
                        "enum": [
                            "module_class",
                            "module_method",
                            "inproc",
                            "sys"
                        ]
                    },
                    "disabled": {
                        "type": [
                            "boolean",
                            "string"
                        ]
                    },
                    "working_dir": {
                        "type": "string"
                    },
                    "cmd": {
                        "type": "string"
                    },
                    "subtype": {
                        "type": "string"
                    },
                    "telemetry_timeout": {
                        "type": "number"
                    },
                    "init": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "required": [
                    "name",
                    "working_dir",
                    "cmd",
                    "init"
                ],
                "additionalProperties": false
            }
        },
        "bolts": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string"
                    },
                    "description": {
                        "type": "string"
                    },
                    "type": {
                        "enum": [
                            "module_class",
                            "module_method",
                            "inproc",
                            "sys"
                        ]
                    },
                    "disabled": {
                        "type": [
                            "boolean",
                            "string"
                        ]
                    },
                    "working_dir": {
                        "type": "string"
                    },
                    "cmd": {
                        "type": "string"
                    },
                    "subtype": {
                        "type": "string"
                    },
                    "telemetry_timeout": {
                        "type": "number"
                    },
                    "inputs": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "source": {
                                    "type": "string"
                                },
                                "stream_id": {
                                    "type": "string"
                                },
                                "disabled": {
                                    "type": [
                                        "boolean",
                                        "string"
                                    ]
                                }
                            },
                            "required": [
                                "source"
                            ],
                            "additionalProperties": false
                        }
                    },
                    "init": {
                        "type": "object",
                        "additionalProperties": true
                    },
                    "allow_parallel": {
                        "type": "boolean"
                    }
                },
                "required": [
                    "name",
                    "working_dir",
                    "cmd",
                    "inputs",
                    "init"
                ],
                "additionalProperties": false
            }
        },
        "variables": {
            "type": "object",
            "patternProperties": {
                "^.*$": {
                    "type": "string"
                }
            }
        }
    },
    "required": [
        "general",
        "spouts",
        "bolts",
        "variables"
    ],
    "additionalProperties": false
}