{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "required": [
        "projects",
        "drivers"
    ],
    "properties": {
        "projects": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "pattern": "^[a-z\\d\\./-]+$"
                    },
                    "name": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "name"
                ],
                "additionalProperties": false
            }
        },
        "releases": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "pattern": "^[a-z]+$"
                    },
                    "wiki": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "wiki"
                ]
            }
        },
        "drivers": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "project_id": {
                        "type": "string"
                    },
                    "vendor": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "description": {
                        "type": "string"
                    },
                    "maintainer": {
                        "$ref": "#/definitions/user"
                    },
                    "wiki": {
                        "type": "string"
                    },
                    "releases": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "ci_id": {
                        "type": "string"
                    }
                },
                "required": [
                    "project_id",
                    "vendor",
                    "name"
                ],
                "additionalProperties": false
            }
        }
    },
    "definitions": {
        "user": {
            "type": "object",
            "properties": {
                "name": {
                    "type": "string"
                },
                "email": {
                    "type": "string",
                    "pattern": "^[a-z\\d_\\.-]+@([a-z\\d\\.-]+\\.)+[a-z]+$"
                },
                "irc": {
                    "type": "string"
                },
                "launchpad_id": {
                    "type": "string"
                }
            },
            "required": [
                "name"
            ],
            "additionalProperties": false
        }
    }
}