{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "https://hepdata.net/submission/schemas/1.0.1/data_schema.json",
    "title": "Data table",
    "description": "A HEPData table comprising independent_variables and dependent_variables",
    "type": "object",
    "properties": {
        "independent_variables": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "header": {
                        "type": "object",
                        "properties": {
                            "name": {
                                "type": "string"
                            },
                            "units": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "name"
                        ],
                        "additionalProperties": false
                    },
                    "values": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "value": {
                                    "type": [
                                        "string",
                                        "number"
                                    ]
                                },
                                "low": {
                                    "type": "number"
                                },
                                "high": {
                                    "type": "number"
                                }
                            },
                            "additionalProperties": false
                        }
                    }
                },
                "required": [
                    "header",
                    "values"
                ],
                "additionalProperties": false
            }
        },
        "dependent_variables": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "header": {
                        "type": "object",
                        "properties": {
                            "name": {
                                "type": "string"
                            },
                            "units": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "name"
                        ],
                        "additionalProperties": false
                    },
                    "qualifiers": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "name": {
                                    "type": "string"
                                },
                                "value": {
                                    "type": [
                                        "string",
                                        "number"
                                    ]
                                },
                                "units": {
                                    "type": "string"
                                }
                            },
                            "required": [
                                "name",
                                "value"
                            ],
                            "additionalProperties": false
                        }
                    },
                    "values": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "value": {
                                    "type": [
                                        "string",
                                        "number"
                                    ]
                                },
                                "errors": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "symerror": {
                                                "type": [
                                                    "number",
                                                    "string"
                                                ]
                                            },
                                            "asymerror": {
                                                "type": "object",
                                                "properties": {
                                                    "minus": {
                                                        "type": [
                                                            "number",
                                                            "string"
                                                        ]
                                                    },
                                                    "plus": {
                                                        "type": [
                                                            "number",
                                                            "string"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "minus",
                                                    "plus"
                                                ],
                                                "additionalProperties": false
                                            },
                                            "label": {
                                                "type": "string"
                                            }
                                        },
                                        "oneOf": [
                                            {
                                                "required": [
                                                    "symerror"
                                                ]
                                            },
                                            {
                                                "required": [
                                                    "asymerror"
                                                ]
                                            }
                                        ],
                                        "additionalProperties": false
                                    }
                                }
                            },
                            "required": [
                                "value"
                            ],
                            "additionalProperties": false
                        }
                    }
                },
                "additionalProperties": false
            }
        }
    },
    "required": [
        "independent_variables",
        "dependent_variables"
    ],
    "additionalProperties": false
}