cb5c1f3faf6910e2ca508b552f55543f2dfc3cbe
[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": ["string", "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"
139                     },
140
141                     "publicSize": {
142                         "description": "FIXME",
143                         "type": "number"
144                     },
145
146                     "nativeSize": {
147                         "description": "FIXME",
148                         "type": "number"
149                     }
150                 }
151             }
152         },
153
154         "media": {
155             "type": "object",
156             "required": [
157                 "discover",
158                 "large"
159             ],
160             "additionalProperties": false,
161             "properties": {
162                 "discover": {
163                     "description": "Image for the OUYA discover store. FIXME: Size",
164                     "type": "string",
165                     "format": "url"
166                 },
167
168                 "large": {
169                     "description": "Large game cover image for the store details page.",
170                     "type": "string",
171                     "format": "url"
172                 },
173
174                 "video": {
175                     "description": "Video for the store details page. Vimeo and Youtube URLs supported",
176                     "type": ["string", "null"],
177                     "format": "url",
178                     "default": null
179                 },
180
181                 "screenshots": {
182                     "description": "Additional images for the store details page.",
183                     "type": "array",
184                     "items": {
185                         "type": "string",
186                         "format": "url"
187                     }
188                 },
189
190                 "details": {
191                     "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",
192                     "type": "array",
193                     "items": {
194                         "type": "object",
195                         "required": [
196                             "type",
197                             "url"
198                         ],
199                         "additionalProperties": false,
200                         "properties": {
201                             "type": {
202                                 "description": "Medium type: image or video",
203                                 "type": "string",
204                                 "enum": ["image", "video"]
205                             },
206
207                             "url": {
208                                 "description": "Image URL or video URL. Vimeo and Youtube URLs supported",
209                                 "type": "string",
210                                 "format": "url"
211                             },
212
213                             "thumb": {
214                                 "description": "Small preview image. Size should be 852x479.",
215                                 "type": "string",
216                                 "format": "url"
217                             }
218                         }
219                     }
220                 }
221             }
222         },
223
224         "developer": {
225             "type": "object",
226             "required": [
227                 "name"
228             ],
229             "additionalProperties": false,
230             "properties": {
231
232                 "uuid": {
233                     "description": "Unique ID for the developer",
234                     "type": ["string", "null"],
235                     "default": null
236                 },
237
238                 "name": {
239                     "description": "Developer (company or person) name",
240                     "type": "string"
241                 },
242
243                 "supportEmail": {
244                     "description": "E-Mail address for support questions",
245                     "type": ["string", "null"],
246                     "format": "email",
247                     "default": null
248                 },
249
250                 "supportPhone": {
251                     "description": "Telephone number",
252                     "type": ["string", "null"],
253                     "default": null
254                 },
255
256                 "founder": {
257                     "description": "If the developer was an OUYA founder",
258                     "type": "boolean",
259                     "default": false
260                 }
261             }
262         },
263
264         "contentRating": {
265             "description": "Which audience is this game for?",
266             "type": "string",
267             "enum": [
268                 "Everyone",
269                 "9+",
270                 "12+",
271                 "17+"
272             ]
273         },
274
275         "website": {
276             "description": "Game website",
277             "type": ["string", "null"],
278             "format": "url"
279         },
280
281         "firstPublishedAt": {
282             "description": "When the game has first been published to the world",
283             "type": ["string", "null"],
284             "format": "date|date-time",
285             "default": null
286         },
287
288         "inAppPurchases": {
289             "description": "If you can buy things in the game",
290             "type": "boolean",
291             "default": false
292         },
293
294         "overview": {
295             "description": "FIXME",
296             "type": ["string", "null"],
297             "default": null
298         },
299
300         "premium": {
301             "description": "FIXME",
302             "type": "boolean",
303             "default": false
304         },
305
306         "rating": {
307             "type": "object",
308             "additionalProperties": false,
309             "properties": {
310
311                 "likeCount": {
312                     "description": "Number of likes this game has",
313                     "type": "number",
314                     "minimum": 0,
315                     "default": 0
316                 },
317
318                 "average": {
319                     "description": "Average rating for this game",
320                     "type": "number",
321                     "minimum": 0,
322                     "maximum": 5,
323                     "default": 0
324                 },
325
326                 "count": {
327                     "description": "Number of ratings",
328                     "type": "number",
329                     "minimum": 0,
330                     "default": 0
331                 }
332             }
333         },
334
335         "products": {
336             "description": "Items that could be bought via the discover store",
337             "type": "array",
338             "items": {
339                 "type": "object",
340                 "required": [
341                     "identifier",
342                     "name",
343                     "description",
344                     "localPrice",
345                     "originalPrice",
346                     "currency"
347                 ],
348                 "additionalProperties": false,
349                 "properties": {
350
351                     "promoted": {
352                         "description": "If this product is the currently promoted/visible one",
353                         "type": "boolean"
354                     },
355
356                     "identifier": {
357                         "description": "Internal key",
358                         "type": "string",
359                         "examples": [
360                             "full_version"
361                         ]
362                     },
363
364                     "name": {
365                         "description": "Human readable name",
366                         "type": "string",
367                         "examples": [
368                             "Unlock full game"
369                         ]
370                     },
371
372                     "description": {
373                         "description": "Explanation of the features you will buy",
374                         "type": "string"
375                     },
376
377                     "localPrice": {
378                         "description": "Current price (maybe discounted)",
379                         "type": "number"
380                     },
381
382                     "originalPrice": {
383                         "description": "Previous price",
384                         "type": "number"
385                     },
386
387                     "currency": {
388                         "description": "Three-letter currency code, depending on the player that was logged in",
389                         "type": "string",
390                         "enum": ["EUR", "USD"]
391                     }
392                 }
393             }
394         }
395     }
396 }