{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "http://hepdata.org/submission/schema/data",
    "type": "object",
    "properties": {
        "type": {
            "id": "http://jsonschema.net/data_file",
            "type": "string"
        },
        "independent_variables": {
            "id": "http://hepdata.org/submission/schema/data/independent_variables",
            "type": "array",
            "items": {
                "id": "http://hepdata.org/submission/schema/data/independent_variables/0",
                "type": "object",
                "properties": {
                    "header": {
                        "id": "http://hepdata.org/submission/schema/data/independent_variables/0/header",
                        "type": "object",
                        "properties": {
                            "name": {
                                "id": "http://hepdata.org/submission/schema/data/independent_variables/0/header/name",
                                "type": "string"
                            },
                            "units": {
                                "id": "http://hepdata.org/submission/schema/data/independent_variables/0/header/units",
                                "type": "string"
                            }
                        },
                        "additionalProperties": false,
                        "required": [
                            "name"
                        ]
                    },
                    "values": {
                        "id": "http://hepdata.org/submission/schema/data/independent_variables/0/values",
                        "type": "array",
                        "items": {
                            "id": "http://hepdata.org/submission/schema/data/independent_variables/0/values/1",
                            "type": "object",
                            "properties": {
                                "value": {
                                    "id": "http://hepdata.org/submission/schema/data/independent_variables/0/values/1/value",
                                    "type": [
                                        "string",
                                        "number"
                                    ]
                                },
                                "low": {
                                    "id": "http://hepdata.org/submission/schema/data/independent_variables/0/values/1/low",
                                    "type": "number"
                                },
                                "high": {
                                    "id": "http://hepdata.org/submission/schema/data/independent_variables/0/values/1/high",
                                    "type": "number"
                                }
                            },
                            "additionalProperties": false
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "header",
                    "values"
                ]
            },
            "required": [
                "0"
            ]
        },
        "dependent_variables": {
            "id": "http://hepdata.org/submission/schema/data/dependent_variables",
            "type": "array",
            "items": {
                "id": "http://hepdata.org/submission/schema/data/dependent_variables/axis",
                "type": "object",
                "properties": {
                    "header": {
                        "id": "http://hepdata.org/submission/schema/data/dependent_variables/axis/header",
                        "type": "object",
                        "properties": {
                            "name": {
                                "id": "http://hepdata.org/submission/schema/data/dependent_variables/axis/header/name",
                                "type": "string"
                            },
                            "units": {
                                "id": "http://hepdata.org/submission/schema/data/dependent_variables/axis/header/units",
                                "type": "string"
                            }
                        },
                        "required": [
                            "name"
                        ],
                        "additionalProperties": false
                    },
                    "qualifiers": {
                        "id": "http://hepdata.org/submission/schema/data/dependent_variables/axis/qualifiers",
                        "type": "array",
                        "items": {
                            "id": "http://hepdata.org/submission/schema/data/dependent_variables/axis/qualifiers/qualifier",
                            "type": "object",
                            "properties": {
                                "name": {
                                    "id": "http://hepdata.org/submission/schema/data/dependent_variables/axis/qualifiers/qualifier/name",
                                    "type": "string"
                                },
                                "value": {
                                    "id": "http://hepdata.org/submission/schema/data/dependent_variables/axis/qualifiers/qualifier/value",
                                    "type": [
                                        "string",
                                        "number"
                                    ]
                                },
                                "units": {
                                    "id": "http://hepdata.org/submission/schema/data/dependent_variables/axis/qualifiers/qualifier/name",
                                    "type": "string"
                                }
                            },
                            "required": [
                                "name",
                                "value"
                            ],
                            "additionalProperties": false
                        }
                    },
                    "values": {
                        "id": "http://hepdata.org/submission/schema/data/dependent_variables/axis/values/point",
                        "type": "array",
                        "items": {
                            "id": "http://hepdata.org/submission/schema/data/dependent_variables/axis/values/point/value",
                            "type": "object",
                            "properties": {
                                "value": {
                                    "id": "http://hepdata.org/submission/schema/data/dependent_variables/axis/values/point/value/value",
                                    "type": [
                                        "string",
                                        "number"
                                    ]
                                },
                                "errors": {
                                    "id": "http://hepdata.org/submission/schema/data/dependent_variables/axis/values/point/value/errors",
                                    "type": "array",
                                    "items": {
                                        "id": "http://hepdata.org/submission/schema/data/dependent_variables/axis/values/point/value/errors/error",
                                        "type": "object",
                                        "properties": {
                                            "symerror": {
                                                "id": "http://hepdata.org/submission/schema/data/dependent_variables/axis/values/point/value/errors/error/symerror",
                                                "type": [
                                                    "number",
                                                    "string"
                                                ]
                                            },
                                            "asymerror": {
                                                "id": "http://hepdata.org/submission/schema/data/dependent_variables/axis/values/point/value/errors/error/asymerror",
                                                "type": "object",
                                                "properties": {
                                                    "minus": {
                                                        "id": "http://hepdata.org/submission/schema/data/dependent_variables/axis/values/point/value/errors/error/asymerror/minus",
                                                        "type": [
                                                            "number",
                                                            "string"
                                                        ]
                                                    },
                                                    "plus": {
                                                        "id": "http://hepdata.org/submission/schema/data/dependent_variables/axis/values/point/value/errors/error/asymerror/plus",
                                                        "type": [
                                                            "number",
                                                            "string"
                                                        ]
                                                    }
                                                }
                                            },
                                            "label": {
                                                "id": "http://hepdata.org/submission/schema/data/dependent_variables/axis/values/point/value/errors/error/label",
                                                "type": "string"
                                            }
                                        },
                                        "additionalProperties": false
                                    }
                                }
                            },
                            "required": [
                                "value"
                            ],
                            "additionalProperties": false
                        }
                    }
                },
                "additionalProperties": false
            }
        },
        "name": {
            "id": "http://hepdata.org/submission/schema/data/name",
            "type": "string",
            "title": "Name.",
            "description": "Used to reference a data record when everything is in the same file.",
            "name": "name"
        }
    },
    "additionalProperties": false,
    "required": [
        "independent_variables",
        "dependent_variables"
    ]
}