{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "http://localhost/schemas/records/record-v1.0.0.json",
    "additionalProperties": false,
    "title": "My site v1.0.0",
    "type": "object",
    "properties": {
        "title": {
            "description": "Record title.",
            "type": "string"
        },
        "id": {
            "description": "Invenio record identifier (integer).",
            "type": "number"
        },
        "keywords": {
            "description": "Free text keywords.",
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "publication_date": {
            "description": "When the record is published",
            "type": "string",
            "format": "date-time"
        },
        "contributors": {
            "description": "Contributors in order of importance.",
            "minItems": 1,
            "type": "array",
            "items": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "ids": {
                        "description": "List of IDs related with the person.",
                        "type": "array",
                        "_uniqueItems": true,
                        "items": {
                            "additionalProperties": false,
                            "type": "object",
                            "properties": {
                                "source": {
                                    "type": "string"
                                },
                                "value": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "name": {
                        "description": "Full name of person or organisation. Personal name format: family, given.",
                        "type": "string"
                    },
                    "affiliations": {
                        "description": "Affiliation(s) for the purpose of this specific record.",
                        "type": "array",
                        "_uniqueItems": true,
                        "items": {
                            "type": "string"
                        }
                    },
                    "email": {
                        "type": "string",
                        "description": "Contact email for the purpose of this specific record.",
                        "format": "email"
                    },
                    "role": {
                        "description": "",
                        "type": "string",
                        "enum": [
                            "ContactPerson",
                            "Researcher",
                            "Other"
                        ]
                    }
                },
                "required": [
                    "name"
                ]
            }
        }
    },
    "required": [
        "id",
        "contributors",
        "title"
    ]
}