{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "o2r-meta",
    "description": "o2r metadata schema",
    "definitions": {
        "creators": {
            "type": "array",
            "items": {
                "properties": {
                    "name": {
                        "type": "string"
                    },
                    "orcid": {
                        "type": "string"
                    },
                    "affiliation": {
                        "type": "string"
                    }
                }
            },
            "required": [
                "name"
            ]
        },
        "depends": {
            "type": "array",
            "items": {
                "properties": {
                    "operatingSystem": {
                        "type": "array"
                    },
                    "identifier": {
                        "type": "string"
                    },
                    "packageSystem": {
                        "type": "string"
                    },
                    "version": {
                        "type": "string"
                    }
                }
            },
            "required": [
                "identifier",
                "packageSystem"
            ]
        },
        "spatial": {
            "type": "object",
            "items": {
                "properties": {
                    "files": {
                        "type": "array"
                    },
                    "union": {
                        "type": "array"
                    }
                }
            },
            "required": [
                "union"
            ]
        },
        "temporal": {
            "type": "object",
            "items": {
                "properties": {
                    "begin": {
                        "type": "string"
                    },
                    "end": {
                        "type": "string"
                    }
                }
            }
        }
    },
    "type": "object",
    "properties": {
        "creators": {
            "$ref": "#/definitions/creators"
        },
        "codefiles": {
            "type": "array"
        },
        "depends": {
            "$ref": "#/definitions/depends"
        },
        "description": {
            "type": "string"
        },
        "displayfile": {
            "type": [
                "null",
                "string"
            ]
        },
        "displayfile_candidates": {
            "type": "array"
        },
        "interaction": {
            "type": "array"
        },
        "mainfile": {
            "type": "string"
        },
        "mainfile_candidates": {
            "type": "array"
        },
        "objectType": {
            "type": "string"
        },
        "publication_date": {
            "type": "string"
        },
        "spatial": {
            "$ref": "#/definitions/spatial"
        },
        "softwarePaperCitation": {
            "type": "string"
        },
        "version": {
            "type": "string"
        },
        "title": {
            "type": "string"
        },
        "temporal": {
            "$ref": "#/definitions/temporal"
        },
        "keywords": {
            "type": "array"
        },
        "paperLanguage": {
            "type": [
                "array",
                "string"
            ]
        }
    },
    "required": [
        "access_right",
        "creators",
        "description",
        "displayfile",
        "identifier",
        "title",
        "keywords",
        "mainfile",
        "communities",
        "license",
        "publication_date",
        "publication_type"
    ]
}