{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "required": [
        "individuals"
    ],
    "properties": {
        "title": {
            "title": "Title",
            "type": "string"
        },
        "individuals": {
            "title": "Individuals",
            "description": "Individuals in a pedigree.",
            "type": "object",
            "additionalProperties": {
                "$ref": "#/definitions/individual"
            }
        },
        "customIndividualPropertySchemas": {
            "additionalProperties": {
                "$ref": "#/definitions/customIndividualPropertySchema"
            }
        }
    },
    "definitions": {
        "individual": {
            "title": "Individual",
            "type": "object",
            "properties": {
                "father": {
                    "title": "Father",
                    "type": "string"
                },
                "mother": {
                    "title": "Mother",
                    "type": "string"
                },
                "gender": {
                    "title": "Gender",
                    "type": "string",
                    "enum": [
                        "unknown",
                        "male",
                        "female"
                    ],
                    "enumNames": [
                        "Unknown or ambiguous",
                        "Male",
                        "Female"
                    ]
                },
                "name": {
                    "title": "Name",
                    "type": "string"
                },
                "monozygote": {
                    "title": "Monozygote twin key",
                    "type": "string"
                },
                "dizygote": {
                    "title": "Dizygote twin key",
                    "type": "string"
                },
                "proband": {
                    "title": "Proband",
                    "type": "boolean"
                },
                "consultand": {
                    "title": "Consultand",
                    "type": "boolean"
                },
                "dateOfBirth": {
                    "title": "Date of birth",
                    "type": "string",
                    "format": "date"
                },
                "dateOfDeath": {
                    "title": "Date of death",
                    "type": "string",
                    "format": "date"
                },
                "deceased": {
                    "title": "Deceased",
                    "type": "boolean"
                },
                "sampled": {
                    "title": "Sampled",
                    "type": "boolean"
                },
                "Carrier": {
                    "title": "Carrier",
                    "type": "boolean"
                },
                "affected": {
                    "title": "Affected",
                    "type": "string"
                }
            }
        },
        "customIndividualPropertySchema": {
            "title": "Custom individual property schema",
            "type": "object",
            "properties": {
                "title": {
                    "type": "string"
                },
                "type": {
                    "type": "string",
                    "enum": [
                        "string",
                        "boolean",
                        "integer",
                        "number"
                    ]
                },
                "description": {
                    "type": "string"
                },
                "format": {
                    "type": "string"
                },
                "enum": {
                    "type": "array",
                    "minItems": 1,
                    "_uniqueItems": true
                },
                "enumNames": {
                    "type": "array",
                    "minItems": 1,
                    "_uniqueItems": true,
                    "items": {
                        "type": "string"
                    }
                },
                "maximum": {
                    "type": "number"
                },
                "exclusiveMaximum": {
                    "type": "boolean",
                    "default": false
                },
                "minimum": {
                    "type": "number"
                },
                "exclusiveMinimum": {
                    "type": "boolean",
                    "default": false
                },
                "maxLength": {
                    "type": "integer",
                    "minimum": 0
                },
                "minLength": {
                    "type": "integer",
                    "minimum": 0
                }
            }
        }
    }
}