{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "GeekML",
    "description": "Markup for a Geek",
    "type": "object",
    "properties": {
        "name": {
            "description": "The geek's name",
            "type": "string"
        },
        "dateMade": {
            "description": "The date (ISO-8601 formatted) this markup was crafted; should work with Javascript call Date.parse()",
            "type": "string"
        },
        "summary": {
            "description": "A paragraph describing the geek.",
            "type": "string"
        },
        "contacts": {
            "description": "How to contact the geek: email, phone, etc.",
            "type": "array",
            "_uniqueItems": false,
            "items": {
                "$ref": "#/definitions/contact"
            }
        },
        "socialMedia": {
            "description": "The geek's social media presence: blogs, Twitter accounts, etc.",
            "type": "array",
            "_uniqueItems": false,
            "items": {
                "$ref": "#/definitions/media"
            }
        },
        "skills": {
            "description": "The geek's geeky skills, such as programming, advanced math, or knitting.",
            "type": "array",
            "_uniqueItems": true,
            "items": {
                "$ref": "#/definitions/ranking"
            }
        },
        "organizations": {
            "description": "What groups the geek belongs to, such as MENSA or a Linux User Group.",
            "type": "array",
            "_uniqueItems": true,
            "items": {
                "$ref": "#/definitions/ranking"
            }
        },
        "games": {
            "description": "The geek's favorite games, such as Dungeons and Dragons or HALO.",
            "type": "array",
            "_uniqueItems": true,
            "items": {
                "$ref": "#/definitions/ranking"
            }
        },
        "fandoms": {
            "description": "The geek's favorite shows, movies, books, etc.",
            "type": "array",
            "_uniqueItems": true,
            "items": {
                "$ref": "#/definitions/ranking"
            }
        }
    },
    "required": [
        "name",
        "dateMade"
    ],
    "definitions": {
        "ranking": {
            "description": "Describes a geek's participation in geek phenomena - shows, games, etc.",
            "properties": {
                "name": {
                    "type": "string"
                },
                "annote": {
                    "type": "string"
                },
                "rank": {
                    "enum": [
                        "Inventor/Author/World-Class Fan/Expert",
                        "Recognized Fan/Expert",
                        "Enthusiast/Professional",
                        "Novice",
                        "Disinterested",
                        "Hate it"
                    ]
                }
            },
            "required": [
                "name",
                "rank"
            ]
        },
        "contact": {
            "description": "Describes a geek's contact information",
            "properties": {
                "contactType": {
                    "type": "string"
                },
                "annote": {
                    "type": "string"
                },
                "contactValue": {
                    "type": "string"
                }
            },
            "required": [
                "contactType",
                "contactValue"
            ]
        },
        "media": {
            "description": "Describes a geek's social media information",
            "properties": {
                "mediaType": {
                    "type": "string"
                },
                "annote": {
                    "type": "string"
                },
                "mediaLocator": {
                    "type": "string"
                }
            },
            "required": [
                "mediaType",
                "mediaLocator"
            ]
        }
    }
}