{
    "$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": {
                        "$ref": "#/definitions/release_id"
                    },
                    "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"
                    },
                    "maintainers": {
                        "type": "array",
                        "items": {
                            "$ref": "#/definitions/user"
                        }
                    },
                    "wiki": {
                        "type": "string"
                    },
                    "releases": {
                        "type": "array",
                        "items": {
                            "$ref": "#/definitions/release_id"
                        }
                    },
                    "ci": {
                        "$ref": "#/definitions/ci"
                    }
                },
                "required": [
                    "project_id",
                    "vendor",
                    "name"
                ],
                "additionalProperties": false
            }
        }
    },
    "definitions": {
        "user": {
            "type": "object",
            "properties": {
                "name": {
                    "type": "string",
                    "pattern": "^[^,]+$"
                },
                "email": {
                    "type": "string",
                    "pattern": "^[a-z\\d_\\.-]+@([a-z\\d\\.-]+\\.)+[a-z]+$"
                },
                "irc": {
                    "type": "string",
                    "pattern": "^[\\S]+$"
                },
                "launchpad_id": {
                    "type": "string",
                    "pattern": "^[\\S]+$"
                }
            },
            "required": [
                "name"
            ],
            "additionalProperties": false
        },
        "ci": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string",
                    "pattern": "^[\\S]+$"
                },
                "success_pattern": {
                    "type": "string"
                },
                "failure_pattern": {
                    "type": "string"
                }
            },
            "required": [
                "id"
            ],
            "additionalProperties": false
        },
        "release_id": {
            "type": "string",
            "pattern": "^[A-Z][a-z]+$"
        }
    }
}