Add open source category
[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             "FIXME": ""
151         },
152
153         "developer": {
154             "type": "object",
155             "required": [
156                 "name"
157             ],
158             "additionalProperties": false,
159             "properties": {
160
161                 "uuid": {
162                     "description": "Unique ID for the developer",
163                     "type": "string"
164                 },
165
166                 "name": {
167                     "description": "Developer (company or person) name",
168                     "type": "string"
169                 },
170
171                 "supportEmail": {
172                     "description": "E-Mail address for support questions",
173                     "type": "string",
174                     "format": "email"
175                 },
176
177                 "supportPhone": {
178                     "description": "Telephone number",
179                     "type": "string"
180                 },
181
182                 "founder": {
183                     "description": "If the developer was an OUYA founder",
184                     "type": "boolean"
185                 }
186             }
187         },
188
189         "contentRating": {
190             "description": "Which audience is this game for?",
191             "type": "string",
192             "enum": [
193                 "Everyone",
194                 "9+",
195                 "12+",
196                 "17+"
197             ]
198         },
199
200         "website": {
201             "description": "Game website",
202             "type": "string",
203             "format": "url"
204         },
205
206         "firstPublishedAt": {
207             "description": "When the game has first been published to the world",
208             "type": "string",
209             "format": "date|date-time"
210         },
211
212         "inAppPurchases": {
213             "description": "If you can buy things in the game",
214             "type": "boolean"
215         },
216
217         "overview": {
218             "description": "FIXME",
219             "type": "string"
220         },
221
222         "premium": {
223             "description": "FIXME",
224             "type": "boolean"
225         },
226
227         "rating": {
228             "type": "object",
229             "additionalProperties": false,
230             "properties": {
231
232                 "likeCount": {
233                     "description": "Number of likes this game has",
234                     "type": "number",
235                     "minimum": 0
236                 },
237
238                 "average": {
239                     "description": "Average rating for this game (0-5)",
240                     "type": "number",
241                     "minimum": 0
242                 },
243
244                 "count": {
245                     "description": "Number of ratings",
246                     "type": "number",
247                     "minimum": 0
248                 }
249             }
250         },
251
252         "products": {
253             "type": "array",
254             "items": {
255                 "FIXME": ""
256             }
257         }
258     }
259 }