Skip to content

Commit

Permalink
draft4: add 'patch' file type and a field to define against which bas…
Browse files Browse the repository at this point in the history
…e ROM it may be applied (#96)
  • Loading branch information
avivace committed Oct 17, 2024
1 parent 7092985 commit 72cae10
Showing 1 changed file with 67 additions and 25 deletions.
92 changes: 67 additions & 25 deletions schemas/game-schema-d4.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,23 @@
"platform": {
"type": "string",
"description": "Target console",
"enum": ["GB", "GBC", "GBA", "NES"]
"enum": [
"GB",
"GBC",
"GBA",
"NES"
]
},
"typetag": {
"type": "string",
"description": "Type of the software",
"enum": ["game", "tool", "demo", "hackrom", "music"]
"enum": [
"game",
"tool",
"demo",
"hackrom",
"music"
]
},
"gameLicense": {
"description": "License under which the software is released",
Expand Down Expand Up @@ -110,7 +121,10 @@
},
{
"type": "string",
"enum": ["hw:gbprinter", "hw:gbcamera"]
"enum": [
"hw:gbprinter",
"hw:gbcamera"
]
}
]
}
Expand Down Expand Up @@ -141,24 +155,26 @@
}
},
{
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "The optional title of the link."
},
"type": {
"type": "string",
"description": "The optional type of the link, indicating the media type or link relation."
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "The optional title of the link."
},
"type": {
"type": "string",
"description": "The optional type of the link, indicating the media type or link relation."
},
"url": {
"type": "string",
"format": "uri",
"description": "The URL of the link."
}
},
"url": {
"type": "string",
"format": "uri",
"description": "The URL of the link."
}
},
"required": ["url"]
}
"required": [
"url"
]
}
],
"description": "Website(s) related to the game, which can be provided as either a single URL or an array of URLs."
},
Expand Down Expand Up @@ -194,7 +210,9 @@
"description": "List of third-party users of the Homebrew Hub API authorised to re-distribute/embed the entry metadata and assets in their clients. See https://github.com/gbdev/database/tree/master/thirdparty for the specific terms.",
"items": {
"type": "string",
"enum": ["sameboy"]
"enum": [
"sameboy"
]
},
"uniqueItems": true
},
Expand All @@ -215,7 +233,9 @@
}
}
},
"required": ["slug"],
"required": [
"slug"
],
"definitions": {
"author": {
"type": "object",
Expand Down Expand Up @@ -247,7 +267,12 @@
},
"type": {
"type": "string",
"enum": ["rom", "manual", "release"]
"enum": [
"rom",
"manual",
"release",
"patch"
]
},
"playable": {
"type": "boolean",
Expand All @@ -274,12 +299,29 @@
}
}
},
"apply-to": {
"type": "object",
"description": "If the file is of type 'patch', report here one (or more) of the hash values of the base file against which the patch should be applied",
"properties": {
"md5": {
"type": "string"
},
"sha1": {
"type": "string"
},
"sha256": {
"type": "string"
}
}
},
"default": {
"type": "boolean",
"description": "Describes if the file is the default ROM to play"
}
},
"required": ["filename"]
"required": [
"filename"
]
},
"license": {
"type": "string",
Expand Down Expand Up @@ -640,4 +682,4 @@
]
}
}
}
}

0 comments on commit 72cae10

Please sign in to comment.