Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaking changes on Draft 4 schema #126

Closed
wants to merge 6 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 114 additions & 18 deletions game-schema-d4.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,39 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/gbdev/database/master/game-schema-d3.json",
"title": "Game object",
"description": "A game in the Homebrew Hub database",
"$id": "https://raw.githubusercontent.com/gbdev/database/master/game-schema-d4.json",
"title": "Game manifest",
"description": "Describes a software entry in the Homebrew Hub database, mentioning metadata and related assets (such as ROM files).",
"type": "object",
"additionalProperties": false,
"properties":
{
"slug":
{
"description": "A unique string identifier for a game",
"type": "string"
"description": "A unique string identifier for a game. Letters, numbers, the 'en' dash and the dot are the only allowed characters.",
"type": "string",
"pattern": "^[A-Za-z0-9]+(?:-[A-Za-z0-9.]+)*$"
},
"developer":
{
"type": "string",
"description": "A name, username or nickname representing the developer(s)"
"description": "A name, username or nickname representing the developer(s)",
"anyof":
[
{
"type": "array",
"items":
{
"type": "string"
}
},
{
"type": "string"
}
]
},
"description":
{
"type": "string",
"description": "A text description about the entry (e.g. Instructions, lore, ..)"
"description": "A brief, plain text description about the entry"
},
"title":
{
Expand All @@ -30,13 +44,25 @@
{
"type": "string",
"description": "Target console",
"enum": ["GB", "GBC", "GBA"]
"enum":
[
"GB",
"GBC",
"GBA"
]
},
"typetag":
{
"type": "string",
"description": "Type of the software",
"enum": ["game", "homebrew", "demo", "hackrom", "music"]
"enum":
[
"game",
"tool",
"demo",
"hackrom",
"music"
]
},
"gameLicense":
{
Expand All @@ -59,14 +85,40 @@
"format": "date",
"description": "The date the entry was first released"
},
"features":
{
"type": "array",
"description": "A list of the addional supported features",
"items":
{
"type": "string",
"enum":
[
"gbprinter",
"gbcamera",
"sgb"
]
}
},
"tags":
{
"type": "array",
"description": "A list of the categories representing the entry",
"items":
{
"type": "string",
"enum": ["RPG", "Open Source", "Adventure", "Action", "Puzzle", "Platform", "gbajam21", "gbcompo21", "gbcompo21-shortlist", "gbprinter"]
"enum":
[
"RPG",
"Open Source",
"Adventure",
"Action",
"Puzzle",
"Platform",
"gbajam21",
"gbcompo21",
"gbcompo21-shortlist"
]
}
},
"alias":
Expand Down Expand Up @@ -128,9 +180,11 @@
"$ref": "#/definitions/file"
}
}

},
"required": ["slug"],
"required":
[
"slug"
],
"definitions":
{
"file":
Expand All @@ -146,9 +200,20 @@
{
"type": "string"
},
"type": {
"type":
{
"type": "string",
"enum":
[
"rom",
"manual",
"release"
]
},
"version":
{
"type": "string",
"enum": ["rom", "manual", "release"]
"description": "Specify game version this file refers to. More files can be grouped under the same version"
},
"playable":
{
Expand Down Expand Up @@ -178,14 +243,46 @@
{
"type": "boolean",
"description": "Describes if the file is the default ROM to play"
},
"baserom":
{
"type": "object",
"description": "Base ROM required for the patch to be applied",
"properties":
{
"filename":
{
"type": "string"
},
"md5":
{
"type": "string"
},
"sha1":
{
"type": "string"
},
"sha256":
{
"type": "string"
},
"crc32":
{
"type": "string"
}
}
}
},
"required": ["filename"]
"required":
[
"filename"
]
},
"license":
{
"type": "string",
"enum": [
"enum":
[
"0BSD",
"AAL",
"Abstyles",
Expand Down Expand Up @@ -540,7 +637,6 @@
"ZPL-2.0",
"ZPL-2.1"
]

}
}
}