{
    "description": "A release is a digital construction of a pinball game.",
    "properties": {
        "_created_by": {
            "description": "Reference to the user who created this release. Only visible by contributors and above.",
            "readOnly": true,
            "type": "string"
        },
        "_game": {
            "description": "Reference to the game.",
            "type": "string"
        },
        "_id": {
            "description": "Unique identifier for a release. Gets generated automatically on creation.",
            "pattern": "^[a-z0-9-]{7,}$",
            "readOnly": true,
            "type": "string"
        },
        "_tags": {
            "description": "None, one or multiple reference to tags.",
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "acknowledgements": {
            "description": "Free text describing people who helped creating this release but are not considered as authors.",
            "type": "string"
        },
        "authors": {
            "description": "One or more authors of this release.",
            "items": {
                "properties": {
                    "_user": {
                        "description": "Reference to the user.",
                        "type": "string"
                    },
                    "roles": {
                        "description": "One or more roles of the user.",
                        "items": {
                            "type": "string"
                        },
                        "type": "array"
                    }
                },
                "title": "Author",
                "type": "object"
            },
            "type": "array"
        },
        "created_at": {
            "description": "Timestamp when the release was added to the database.",
            "readOnly": true,
            "type": "string"
        },
        "description": {
            "description": "A short description of the release. Will be Markdown formatted.",
            "type": "string"
        },
        "links": {
            "description": "A list of links related to this release.",
            "items": {
                "properties": {
                    "label": {
                        "description": "A short label describing the link",
                        "type": "string"
                    },
                    "url": {
                        "description": "The full URL.",
                        "type": "string"
                    }
                },
                "title": "Link",
                "type": "object"
            },
            "type": "array"
        },
        "name": {
            "description": "Name of the release.",
            "minLength": 3,
            "type": "string"
        },
        "original_version": {
            "description": "In case of a mod, this refers to the original version of the release (i.e. the \"modded release\").\n\nIt can either be a direct link within VPDB, or a label and URL to an external resource.",
            "properties": {
                "_ref": {
                    "description": "Reference to the original version within VPDB.",
                    "type": "string"
                },
                "release": {
                    "description": "In case the modded release is not on VPDB, this links to an external resource.",
                    "properties": {
                        "name": {
                            "description": "Name of the modded release",
                            "type": "string"
                        },
                        "url": {
                            "description": "URL when the modded release can be found.",
                            "type": "string"
                        }
                    },
                    "title": "External Release Resource",
                    "type": "object"
                }
            },
            "title": "Original Release",
            "type": "object"
        },
        "versions": {
            "description": "A version of the release.",
            "items": {
                "properties": {
                    "changes": {
                        "description": "Changelog. A list of changes for this version.",
                        "type": "string"
                    },
                    "files": {
                        "items": {
                            "properties": {
                                "_compatibility": {
                                    "description": "Reference to one or more compatible builds.",
                                    "items": {
                                        "title": "Build",
                                        "type": "string"
                                    },
                                    "type": "array"
                                },
                                "_file": {
                                    "description": "Reference to the file.",
                                    "type": "string"
                                },
                                "_media": {
                                    "description": "References to media related to the file.",
                                    "properties": {
                                        "playfield_image": {
                                            "description": "Reference to the playfield image.",
                                            "type": "string"
                                        },
                                        "playfield_video": {
                                            "description": "Reference to the playfield video.",
                                            "type": "string"
                                        }
                                    },
                                    "title": "Media References",
                                    "type": "object"
                                },
                                "flavor": {
                                    "description": "Defines the flavor of the file.",
                                    "properties": {
                                        "lightning": {
                                            "description": "Playfield illumination. Values:\n\n* `day` - Illuminated playfield.\n* `night` - Dark playfield.",
                                            "enum": [
                                                "day",
                                                "night"
                                            ]
                                        },
                                        "orientation": {
                                            "description": "Table orientation. Values:\n\n* `ws` - Widescreen, for playing on desktop PCs.\n* `fs` - Fullscreen or portrait, used on cabinets.",
                                            "enum": [
                                                "ws",
                                                "fs"
                                            ]
                                        }
                                    },
                                    "title": "Flavor",
                                    "type": "object"
                                }
                            },
                            "title": "File"
                        },
                        "type": "array"
                    },
                    "version": {
                        "description": "Version number. Semantic versioning recommended (major.minor.patch).",
                        "minLength": 1,
                        "type": "string"
                    }
                },
                "title": "Version",
                "type": "object"
            },
            "type": "array"
        }
    },
    "required": [
        "name",
        "versions.0.version"
    ],
    "title": "Release",
    "type": "object"
}