Skip to content

Commit 72cae10

Browse files
committed
draft4: add 'patch' file type and a field to define against which base ROM it may be applied (#96)
1 parent 7092985 commit 72cae10

File tree

1 file changed

+67
-25
lines changed

1 file changed

+67
-25
lines changed

schemas/game-schema-d4.json

Lines changed: 67 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,23 @@
4646
"platform": {
4747
"type": "string",
4848
"description": "Target console",
49-
"enum": ["GB", "GBC", "GBA", "NES"]
49+
"enum": [
50+
"GB",
51+
"GBC",
52+
"GBA",
53+
"NES"
54+
]
5055
},
5156
"typetag": {
5257
"type": "string",
5358
"description": "Type of the software",
54-
"enum": ["game", "tool", "demo", "hackrom", "music"]
59+
"enum": [
60+
"game",
61+
"tool",
62+
"demo",
63+
"hackrom",
64+
"music"
65+
]
5566
},
5667
"gameLicense": {
5768
"description": "License under which the software is released",
@@ -110,7 +121,10 @@
110121
},
111122
{
112123
"type": "string",
113-
"enum": ["hw:gbprinter", "hw:gbcamera"]
124+
"enum": [
125+
"hw:gbprinter",
126+
"hw:gbcamera"
127+
]
114128
}
115129
]
116130
}
@@ -141,24 +155,26 @@
141155
}
142156
},
143157
{
144-
"type": "object",
145-
"properties": {
146-
"title": {
147-
"type": "string",
148-
"description": "The optional title of the link."
149-
},
150-
"type": {
151-
"type": "string",
152-
"description": "The optional type of the link, indicating the media type or link relation."
158+
"type": "object",
159+
"properties": {
160+
"title": {
161+
"type": "string",
162+
"description": "The optional title of the link."
163+
},
164+
"type": {
165+
"type": "string",
166+
"description": "The optional type of the link, indicating the media type or link relation."
167+
},
168+
"url": {
169+
"type": "string",
170+
"format": "uri",
171+
"description": "The URL of the link."
172+
}
153173
},
154-
"url": {
155-
"type": "string",
156-
"format": "uri",
157-
"description": "The URL of the link."
158-
}
159-
},
160-
"required": ["url"]
161-
}
174+
"required": [
175+
"url"
176+
]
177+
}
162178
],
163179
"description": "Website(s) related to the game, which can be provided as either a single URL or an array of URLs."
164180
},
@@ -194,7 +210,9 @@
194210
"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.",
195211
"items": {
196212
"type": "string",
197-
"enum": ["sameboy"]
213+
"enum": [
214+
"sameboy"
215+
]
198216
},
199217
"uniqueItems": true
200218
},
@@ -215,7 +233,9 @@
215233
}
216234
}
217235
},
218-
"required": ["slug"],
236+
"required": [
237+
"slug"
238+
],
219239
"definitions": {
220240
"author": {
221241
"type": "object",
@@ -247,7 +267,12 @@
247267
},
248268
"type": {
249269
"type": "string",
250-
"enum": ["rom", "manual", "release"]
270+
"enum": [
271+
"rom",
272+
"manual",
273+
"release",
274+
"patch"
275+
]
251276
},
252277
"playable": {
253278
"type": "boolean",
@@ -274,12 +299,29 @@
274299
}
275300
}
276301
},
302+
"apply-to": {
303+
"type": "object",
304+
"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",
305+
"properties": {
306+
"md5": {
307+
"type": "string"
308+
},
309+
"sha1": {
310+
"type": "string"
311+
},
312+
"sha256": {
313+
"type": "string"
314+
}
315+
}
316+
},
277317
"default": {
278318
"type": "boolean",
279319
"description": "Describes if the file is the default ROM to play"
280320
}
281321
},
282-
"required": ["filename"]
322+
"required": [
323+
"filename"
324+
]
283325
},
284326
"license": {
285327
"type": "string",
@@ -640,4 +682,4 @@
640682
]
641683
}
642684
}
643-
}
685+
}

0 commit comments

Comments
 (0)