{
    "description": "Schema for Pssimistical config",
    "properties": {
        "inputs": {
            "items": {
                "properties": {
                    "path": {
                        "type": "string"
                    },
                    "reader": {
                        "type": "string"
                    },
                    "table": {
                        "type": "string"
                    }
                },
                "required": [
                    "path",
                    "table",
                    "reader"
                ],
                "type": "object"
            },
            "minItems": 1,
            "type": "array"
        },
        "query": {
            "properties": {
                "outputFile": {
                    "type": "string"
                },
                "outputFormat": {
                    "type": "string"
                },
                "sql": {
                    "type": "string"
                }
            },
            "required": [
                "sql",
                "outputFormat"
            ],
            "type": "object"
        },
        "readers": {
            "patternProperties": {
                "\\w+": {
                    "properties": {
                        "columnMappings": {
                            "type": "object"
                        },
                        "columns": {
                            "items": {
                                "type": "string"
                            },
                            "minItems": 1,
                            "type": "array"
                        },
                        "readerProperties": {
                            "type": "object"
                        },
                        "type": {
                            "type": "string"
                        }
                    },
                    "required": [
                        "type",
                        "columns"
                    ],
                    "type": "object"
                }
            },
            "type": "object"
        },
        "tables": {
            "items": {
                "properties": {
                    "columns": {
                        "items": {
                            "properties": {
                                "index": {
                                    "type": "boolean"
                                },
                                "name": {
                                    "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$",
                                    "type": "string"
                                },
                                "type": {
                                    "enum": [
                                        "number",
                                        "text",
                                        "date"
                                    ]
                                }
                            },
                            "required": [
                                "name",
                                "type"
                            ],
                            "type": "object"
                        },
                        "minItems": 1,
                        "type": "array"
                    },
                    "name": {
                        "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$",
                        "type": "string"
                    }
                },
                "required": [
                    "name",
                    "columns"
                ],
                "type": "object"
            },
            "minItems": 1,
            "type": "array"
        }
    },
    "required": [
        "tables",
        "inputs"
    ],
    "type": "object"
}