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