{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
        "$schema": {
            "type": "string"
        },
        "creators": {
            "title": "Creators",
            "description": "The full name of the creators. The personal name format should be: family, given (e.g.: Smith, John).",
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "creator_name": {
                        "type": "string"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "creator_name"
                ]
            },
            "_uniqueItems": true
        },
        "titles": {
            "title": "Titles",
            "description": "The title(s) of the uploaded resource, or a name by which the resource is known.",
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "title": {
                        "type": "string"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "title"
                ]
            },
            "minItems": 1,
            "_uniqueItems": true
        },
        "publisher": {
            "title": "Publisher",
            "description": "The entity responsible for making the resource available, either a person, an organization, or a service.",
            "type": "string"
        },
        "publication_date": {
            "title": "Publication Date",
            "description": "The date when the data was or will be made publicly available (e.g. 1971-07-13)",
            "type": "string",
            "format": "date"
        },
        "disciplines": {
            "title": "Disciplines",
            "description": "The scientific disciplines linked with the resource.",
            "type": "array",
            "items": {
                "type": "string"
            },
            "_uniqueItems": true
        },
        "keywords": {
            "title": "Keywords",
            "description": "A list of keywords or key phrases describing the resource.",
            "type": "array",
            "items": {
                "type": "string"
            },
            "_uniqueItems": true
        },
        "contributors": {
            "title": "Contributors",
            "description": "The list of all other contributors. Please mention all persons that were relevant in the creation of the resource.",
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "contributor_name": {
                        "title": "Name",
                        "type": "string"
                    },
                    "contributor_type": {
                        "title": "Type",
                        "enum": [
                            "ContactPerson",
                            "DataCollector",
                            "DataCurator",
                            "DataManager",
                            "Distributor",
                            "Editor",
                            "HostingInstitution",
                            "Producer",
                            "ProjectLeader",
                            "ProjectManager",
                            "ProjectMember",
                            "RegistrationAgency",
                            "RegistrationAuthority",
                            "RelatedPerson",
                            "Researcher",
                            "ResearchGroup",
                            "RightsHolder",
                            "Sponsor",
                            "Supervisor",
                            "WorkPackageLeader",
                            "Other"
                        ]
                    }
                },
                "additionalProperties": false,
                "required": [
                    "contributor_name",
                    "contributor_type"
                ]
            },
            "_uniqueItems": true
        },
        "language": {
            "title": "Language",
            "description": "The primary language of the resource. Please use ISO_639-3 language codes.",
            "type": "string"
        },
        "resource_types": {
            "title": "Resource Type",
            "description": "The type(s) of the resource.",
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "resource_type": {
                        "title": "Description",
                        "type": "string"
                    },
                    "resource_type_general": {
                        "title": "Category",
                        "enum": [
                            "Audiovisual",
                            "Collection",
                            "Dataset",
                            "Event",
                            "Image",
                            "InteractiveResource",
                            "Model",
                            "PhysicalObject",
                            "Service",
                            "Software",
                            "Sound",
                            "Text",
                            "Workflow",
                            "Other"
                        ]
                    }
                },
                "additionalProperties": false,
                "required": [
                    "resource_type_general"
                ]
            },
            "minItems": 1,
            "_uniqueItems": true
        },
        "alternate_identifiers": {
            "title": "Alternate identifiers",
            "description": "Any kind of other reference such as a URN, URI or an ISBN number.",
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "alternate_identifier": {
                        "type": "string"
                    },
                    "alternate_identifier_type": {
                        "title": "Type",
                        "type": "string"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "alternate_identifier",
                    "alternate_identifier_type"
                ]
            },
            "_uniqueItems": true
        },
        "descriptions": {
            "title": "Descriptions",
            "description": "A more elaborate description of the resource. Focus on a content description that makes it easy for others to find, and to interpret its relevance.",
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "description": {
                        "type": "string"
                    },
                    "description_type": {
                        "title": "Type",
                        "enum": [
                            "Abstract",
                            "Methods",
                            "SeriesInformation",
                            "TableOfContents",
                            "TechnicalInfo",
                            "Other"
                        ]
                    }
                },
                "additionalProperties": false,
                "required": [
                    "description",
                    "description_type"
                ]
            },
            "_uniqueItems": true
        },
        "version": {
            "title": "Version",
            "description": "Denote the version of the resource.",
            "type": "string"
        },
        "contact_email": {
            "title": "Contact Email",
            "description": "Contact email information for this record.",
            "type": "string",
            "format": "email"
        },
        "open_access": {
            "title": "Open Access",
            "description": "Indicate whether the record's files are publicly accessible or not. In case of restricted access the uploaded files will only be accessible by the record's owner and the community administrators. Please note that the record's metadata is always publicly accessible. ",
            "type": "boolean"
        },
        "embargo_date": {
            "title": "Embargo Date",
            "description": "The date marking the end of the embargo period. The record will be marked as open access on the specified date at midnight. Please note that the record metadata is always publicly accessible, and only the data files can have private access.",
            "type": "string",
            "format": "date-time"
        },
        "license": {
            "title": "License",
            "description": "Specify the license under which this data set is available to the users (e.g. GPL, Apache v2 or Commercial). Please use the License Selector for help and additional information.",
            "type": "object",
            "properties": {
                "license": {
                    "type": "string"
                },
                "license_uri": {
                    "title": "License URL",
                    "type": "string",
                    "format": "uri"
                }
            },
            "additionalProperties": false,
            "required": [
                "license"
            ]
        },
        "community": {
            "title": "Community",
            "description": "The community to which the record has been submitted.",
            "type": "string"
        },
        "community_specific": {
            "type": "object"
        },
        "publication_state": {
            "title": "Publication State",
            "description": "State of the publication workflow.",
            "type": "string",
            "enum": [
                "draft",
                "submitted",
                "published"
            ]
        },
        "_pid": {
            "title": "Persistent Identifiers",
            "description": "Array of persistent identifiers pointing to this record."
        },
        "_deposit": {
            "type": "object"
        },
        "_oai": {
            "type": "object"
        },
        "_files": {
            "type": "array"
        }
    },
    "required": [
        "community",
        "titles",
        "open_access",
        "publication_state",
        "community_specific"
    ],
    "additionalProperties": false,
    "b2share": {
        "presentation": {
            "major": [
                "community",
                "titles",
                "descriptions",
                "creators",
                "open_access",
                "embargo_date",
                "license",
                "disciplines",
                "keywords",
                "contact_email"
            ],
            "minor": [
                "contributors",
                "resource_types",
                "alternate_identifiers",
                "version",
                "publisher",
                "language"
            ]
        }
    }
}