Replace some cloudfront and filepicker image URLs with archive.org URLs
[ouya-game-data.git] / ouya-game.schema.json
1 {
2     "$schema": "http://json-schema.org/draft-07/schema#",
3     "$id": "http://cweiske.de/ouya-game.schema.json",
4     "title": "OUYA game metadata",
5     "description": "Game data importable in OUYA API servers.",
6     "type": "object",
7
8     "required": [
9         "packageName",
10         "title",
11         "releases",
12         "media",
13         "developer"
14     ],
15     "additionalProperties": false,
16     "properties": {
17         "packageName": {
18             "description": "Java package names",
19             "type": "string",
20             "examples": [
21                 "com.vendor.gamename"
22             ]
23         },
24
25         "title": {
26             "description": "Game name",
27             "type": "string"
28         },
29
30         "description": {
31             "description": "Text describing the game. Newlines (CRLF) allowed",
32             "type": "string"
33         },
34
35         "players": {
36             "description": "How many players can play this game at the same time?",
37             "type": "array",
38             "items": {
39                 "type": "number",
40                 "minimum": 1
41             }
42         },
43
44         "genres": {
45             "description": "Categories",
46             "type": "array",
47             "items": {
48                 "type": "string",
49                 "uniqueItems": true,
50                 "enum": [
51                     "Adventure",
52                     "App",
53                     "Arcade/Pinball",
54                     "Card/Casino",
55                     "Dual Stick",
56                     "Entertainment",
57                     "Fight!",
58                     "FPS/Shooter",
59                     "Kids List",
60                     "Meditative",
61                     "Multiplayer",
62                     "Music",
63                     "Platformer",
64                     "Puzzle/Trivia",
65                     "Racing",
66                     "Retro",
67                     "Role-Playing",
68                     "Short on Time?",
69                     "Sim/Strategy",
70                     "Sports",
71                     "Utility",
72                     "Video",
73
74                     "Open Source"
75                 ]
76             }
77         },
78
79         "releases": {
80             "type": "array",
81             "items": {
82                 "type": "object",
83                 "required": [
84                     "name",
85                     "versionCode",
86                     "uuid",
87                     "date",
88                     "url",
89                     "size",
90                     "md5sum"
91                 ],
92                 "additionalProperties": false,
93                 "properties": {
94
95                     "name": {
96                         "description": "Human readable version number",
97                         "type": "string",
98                         "examples": [
99                             "1.6"
100                         ]
101                     },
102
103                     "versionCode": {
104                         "description": "APK-internal version code. Run \"aapt dump badging file.apk\", field \"versionCode\"",
105                         "type": ["number", "null"]
106                     },
107
108                     "uuid": {
109                         "description": "Unique ID for the release. Use uuid-gen to get one",
110                         "type": "string"
111                     },
112
113                     "date": {
114                         "description": "When the version has been released",
115                         "type": "string",
116                         "format": "date|datetime"
117                     },
118
119                     "latest": {
120                         "description": "Marker for the latest release",
121                         "type": "boolean"
122                     },
123
124                     "url": {
125                         "description": ".apk download link",
126                         "type": "string",
127                         "format": "url"
128                     },
129
130                     "size": {
131                         "description": "File size in bytes",
132                         "type": "number",
133                         "minimum": 1
134                     },
135
136                     "md5sum": {
137                         "description": "MD5 hash of the .apk file contents",
138                         "type": ["string", "null"],
139                         "default": null
140                     },
141
142                     "publicSize": {
143                         "description": "FIXME",
144                         "type": "number"
145                     },
146
147                     "nativeSize": {
148                         "description": "FIXME",
149                         "type": "number"
150                     }
151                 }
152             }
153         },
154
155         "media": {
156             "type": "object",
157             "required": [
158                 "discover",
159                 "large"
160             ],
161             "additionalProperties": false,
162             "properties": {
163                 "discover": {
164                     "description": "Image for the OUYA discover store. FIXME: Size",
165                     "type": "string",
166                     "format": "url"
167                 },
168
169                 "large": {
170                     "description": "Large game cover image for the store details page.",
171                     "type": "string",
172                     "format": "url"
173                 },
174
175                 "video": {
176                     "description": "Video for the store details page. Vimeo and Youtube URLs supported",
177                     "type": ["string", "null"],
178                     "format": "url",
179                     "default": null
180                 },
181
182                 "screenshots": {
183                     "description": "Additional images for the store details page.",
184                     "type": "array",
185                     "items": {
186                         "type": "string",
187                         "format": "url"
188                     }
189                 },
190
191                 "details": {
192                     "description": "Images and videos for the details page. Can be in any order. If no detail images and videos are given, the large image, video and screenshots are used instead",
193                     "type": "array",
194                     "items": {
195                         "type": "object",
196                         "required": [
197                             "type",
198                             "url"
199                         ],
200                         "additionalProperties": false,
201                         "properties": {
202                             "type": {
203                                 "description": "Medium type: image or video",
204                                 "type": "string",
205                                 "enum": ["image", "video"]
206                             },
207
208                             "url": {
209                                 "description": "Image URL or video URL. Vimeo and Youtube URLs supported",
210                                 "type": "string",
211                                 "format": "url"
212                             },
213
214                             "thumb": {
215                                 "description": "Small preview image. Size should be 852x479.",
216                                 "type": "string",
217                                 "format": "url"
218                             }
219                         }
220                     }
221                 }
222             }
223         },
224
225         "developer": {
226             "type": "object",
227             "required": [
228                 "name"
229             ],
230             "additionalProperties": false,
231             "properties": {
232
233                 "uuid": {
234                     "description": "Unique ID for the developer",
235                     "type": ["string", "null"],
236                     "default": null
237                 },
238
239                 "name": {
240                     "description": "Developer (company or person) name",
241                     "type": "string"
242                 },
243
244                 "supportEmail": {
245                     "description": "E-Mail address for support questions",
246                     "type": ["string", "null"],
247                     "format": "email",
248                     "default": null
249                 },
250
251                 "supportPhone": {
252                     "description": "Telephone number",
253                     "type": ["string", "null"],
254                     "default": null
255                 },
256
257                 "founder": {
258                     "description": "If the developer was an OUYA founder",
259                     "type": "boolean",
260                     "default": false
261                 }
262             }
263         },
264
265         "contentRating": {
266             "description": "Which audience is this game for?",
267             "type": "string",
268             "enum": [
269                 "Everyone",
270                 "9+",
271                 "12+",
272                 "17+"
273             ]
274         },
275
276         "website": {
277             "description": "Game website",
278             "type": ["string", "null"],
279             "format": "url"
280         },
281
282         "firstPublishedAt": {
283             "description": "When the game has first been published to the world",
284             "type": ["string", "null"],
285             "format": "date|date-time",
286             "default": null
287         },
288
289         "inAppPurchases": {
290             "description": "If you can buy things in the game",
291             "type": "boolean",
292             "default": false
293         },
294
295         "overview": {
296             "description": "FIXME",
297             "type": ["string", "null"],
298             "default": null
299         },
300
301         "premium": {
302             "description": "FIXME",
303             "type": "boolean",
304             "default": false
305         },
306
307         "rating": {
308             "type": "object",
309             "additionalProperties": false,
310             "properties": {
311
312                 "likeCount": {
313                     "description": "Number of likes this game has",
314                     "type": "number",
315                     "minimum": 0,
316                     "default": 0
317                 },
318
319                 "average": {
320                     "description": "Average rating for this game",
321                     "type": "number",
322                     "minimum": 0,
323                     "maximum": 5,
324                     "default": 0
325                 },
326
327                 "count": {
328                     "description": "Number of ratings",
329                     "type": "number",
330                     "minimum": 0,
331                     "default": 0
332                 }
333             }
334         },
335
336         "products": {
337             "description": "Items that could be bought via the discover store",
338             "type": "array",
339             "items": {
340                 "type": "object",
341                 "required": [
342                     "identifier",
343                     "name",
344                     "description",
345                     "localPrice",
346                     "originalPrice",
347                     "currency"
348                 ],
349                 "additionalProperties": false,
350                 "properties": {
351
352                     "promoted": {
353                         "description": "If this product is the currently promoted/visible one",
354                         "type": "boolean"
355                     },
356
357                     "identifier": {
358                         "description": "Internal key",
359                         "type": "string",
360                         "examples": [
361                             "full_version"
362                         ]
363                     },
364
365                     "name": {
366                         "description": "Human readable name",
367                         "type": "string",
368                         "examples": [
369                             "Unlock full game"
370                         ]
371                     },
372
373                     "description": {
374                         "description": "Explanation of the features you will buy",
375                         "type": ["string", "null"],
376                         "default": null
377                     },
378
379                     "localPrice": {
380                         "description": "Current price (maybe discounted)",
381                         "type": "number"
382                     },
383
384                     "originalPrice": {
385                         "description": "Previous price",
386                         "type": "number"
387                     },
388
389                     "currency": {
390                         "description": "Three-letter currency code, depending on the player that was logged in",
391                         "type": "string",
392                         "enum": ["EUR", "USD"]
393                     }
394                 }
395             }
396         }
397     }
398 }