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