Put "media" into schema
[ouya-game-data.git] / schema.json
1 {
2     "$schema": "http://json-schema.org/draft-07/schema#",
3     "$id": "http://example.com/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 name (\"com.vendor.gamename\")",
19             "type": "string"
20         },
21
22         "title": {
23             "description": "Game name",
24             "type": "string"
25         },
26
27         "description": {
28             "description": "Text describing the game. Newlines (CRLF) allowed",
29             "type": "string"
30         },
31
32         "players": {
33             "description": "How many players can play this game at the same time?",
34             "type": "array",
35             "items": {
36                 "type": "number",
37                 "minimum": 1
38             }
39         },
40
41         "genres": {
42             "description": "Categories",
43             "type": "array",
44             "items": {
45                 "type": "string",
46                 "uniqueItems": true,
47                 "enum": [
48                     "Adventure",
49                     "App",
50                     "Arcade/Pinball",
51                     "Card/Casino",
52                     "Dual Stick",
53                     "Entertainment",
54                     "Fight!",
55                     "FPS/Shooter",
56                     "Kids List",
57                     "Meditative",
58                     "Multiplayer",
59                     "Music",
60                     "Platformer",
61                     "Puzzle/Trivia",
62                     "Racing",
63                     "Retro",
64                     "Role-Playing",
65                     "Short on Time?",
66                     "Sim/Strategy",
67                     "Sports",
68                     "Utility",
69                     "Video",
70
71                     "Open Source"
72                 ]
73             }
74         },
75
76         "releases": {
77             "type": "array",
78             "items": {
79                 "type": "object",
80                 "required": [
81                     "name",
82                     "versionCode",
83                     "uuid",
84                     "date",
85                     "url",
86                     "size",
87                     "md5sum"
88                 ],
89                 "additionalProperties": false,
90                 "properties": {
91
92                     "name": {
93                         "description": "Human readable version number ('1.6')",
94                         "type": "string"
95                     },
96
97                     "versionCode": {
98                         "description": "APK-internal version code. Run \"aapt dump badging file.apk\", field \"versionCode\"",
99                         "type": "string"
100                     },
101
102                     "uuid": {
103                         "description": "Unique ID for the release. Use uuid-gen to get one",
104                         "type": "string"
105                     },
106
107                     "date": {
108                         "description": "When the version has been released",
109                         "type": "string",
110                         "format": "date"
111                     },
112
113                     "latest": {
114                         "description": "Marker for the latest release",
115                         "type": "boolean"
116                     },
117
118                     "url": {
119                         "description": ".apk download link",
120                         "type": "string",
121                         "format": "url"
122                     },
123
124                     "size": {
125                         "description": "File size in bytes",
126                         "type": "number",
127                         "minimum": 1
128                     },
129
130                     "md5sum": {
131                         "description": "MD5 hash of the .apk file contents",
132                         "type": "string"
133                     },
134
135                     "publicSize": {
136                         "description": "FIXME",
137                         "type": "number"
138                     },
139
140                     "nativeSize": {
141                         "description": "FIXME",
142                         "type": "number"
143                     }
144                 }
145             }
146         },
147
148         "media": {
149             "type": "object",
150             "required": [
151                 "discover",
152                 "large"
153             ],
154             "additionalProperties": false,
155             "properties": {
156                 "discover": {
157                     "description": "Image for the OUYA discover store. FIXME: Size",
158                     "type": "string",
159                     "format": "url"
160                 },
161
162                 "large": {
163                     "description": "Large game cover image for the store details page.",
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",
171                     "format": "url"
172                 },
173
174                 "screenshots": {
175                     "description": "Additional images for the store details page.",
176                     "type": "array",
177                     "items": {
178                         "type": "string",
179                         "format": "url"
180                     }
181                 },
182
183                 "details": {
184                     "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",
185                     "type": "array",
186                     "items": {
187                         "type": "object",
188                         "required": [
189                             "type",
190                             "url"
191                         ],
192                         "additionalProperties": false,
193                         "properties": {
194                             "type": {
195                                 "description": "Medium type: image or video",
196                                 "type": "string",
197                                 "enum": ["image", "video"]
198                             },
199
200                             "url": {
201                                 "description": "Image URL or video URL. Vimeo and Youtube URLs supported",
202                                 "type": "string",
203                                 "format": "url"
204                             },
205
206                             "thumb": {
207                                 "description": "Small preview image",
208                                 "type": "string",
209                                 "format": "url"
210                             }
211                         }
212                     }
213                 }
214             }
215         },
216
217         "developer": {
218             "type": "object",
219             "required": [
220                 "name"
221             ],
222             "additionalProperties": false,
223             "properties": {
224
225                 "uuid": {
226                     "description": "Unique ID for the developer",
227                     "type": "string"
228                 },
229
230                 "name": {
231                     "description": "Developer (company or person) name",
232                     "type": "string"
233                 },
234
235                 "supportEmail": {
236                     "description": "E-Mail address for support questions",
237                     "type": "string",
238                     "format": "email"
239                 },
240
241                 "supportPhone": {
242                     "description": "Telephone number",
243                     "type": "string"
244                 },
245
246                 "founder": {
247                     "description": "If the developer was an OUYA founder",
248                     "type": "boolean"
249                 }
250             }
251         },
252
253         "contentRating": {
254             "description": "Which audience is this game for?",
255             "type": "string",
256             "enum": [
257                 "Everyone",
258                 "9+",
259                 "12+",
260                 "17+"
261             ]
262         },
263
264         "website": {
265             "description": "Game website",
266             "type": "string",
267             "format": "url"
268         },
269
270         "firstPublishedAt": {
271             "description": "When the game has first been published to the world",
272             "type": "string",
273             "format": "date|date-time"
274         },
275
276         "inAppPurchases": {
277             "description": "If you can buy things in the game",
278             "type": "boolean"
279         },
280
281         "overview": {
282             "description": "FIXME",
283             "type": "string"
284         },
285
286         "premium": {
287             "description": "FIXME",
288             "type": "boolean"
289         },
290
291         "rating": {
292             "type": "object",
293             "additionalProperties": false,
294             "properties": {
295
296                 "likeCount": {
297                     "description": "Number of likes this game has",
298                     "type": "number",
299                     "minimum": 0
300                 },
301
302                 "average": {
303                     "description": "Average rating for this game (0-5)",
304                     "type": "number",
305                     "minimum": 0
306                 },
307
308                 "count": {
309                     "description": "Number of ratings",
310                     "type": "number",
311                     "minimum": 0
312                 }
313             }
314         },
315
316         "products": {
317             "type": "array",
318             "items": {
319                 "FIXME": ""
320             }
321         }
322     }
323 }