-
Notifications
You must be signed in to change notification settings - Fork 5
/
tournamentSchema.json
303 lines (303 loc) · 15.1 KB
/
tournamentSchema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
{
"$schema": "http://json-schema.org/draft-06/schema#",
"type": "object",
"additionalProperties": false,
"properties": {
"event": {
"$ref": "#/definitions/Event",
"description": "Object that contains metadata relevant to the entire tournament -- e.g. name and date of the event, tournament format, etc. See the `Event` definition for more information."
},
"sets": {
"type": "array",
"items": {
"$ref": "#/definitions/Set"
},
"description": "Unordered array of all sets that took place during this tournament. See the `Set` definition for more information."
},
"entrants": {
"type": "array",
"items": {
"$ref": "#/definitions/Entrant"
},
"description": "Unordered array of all entrants in the tournament. See the `Entrant` definition for more information."
},
"version": {
"type": "string",
"enum": [ "v0.1", "v0.2", "v1.0" ],
"description": "Stores the version of the Open Bracket Format specification that this file was generated in accordance with. It is highly recommended (but not required) to include this field -- if this field is not set, the default assumption will be that the file was generated with the most recent version of OBF. The current version of the OBF format (what you are reading) is `v0.2`."
}
},
"required": [ "event", "sets", "entrants" ],
"title": "Tournament",
"description": "Root object: every OpenBracketFormat file should consist of exactly one `Tournament` object.",
"definitions": {
"SetGameResult": {
"enum": [ "win", "lose", "draw", "dq" ]
},
"Event": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "String containing the title of this event. This is a required field."
},
"date": {
"type": "string",
"format": "date",
"description": "Start date of the event. Should be provided in ISO 8601 format (YYYY-MM-DD)."
},
"gameName": {
"type": "string",
"description": "String representing the name of the game played at this event."
},
"tournamentStructure": {
"type": "string",
"description": "String representing the format of this tournament (e.g. single-elimination, double-elimination, etc.). This field should only be used to record format as it relates to the structure of the tournament (i.e. how matches are decided) and not format as it pertains to game-specific factors (e.g. whether it's a teams tournament, the ruleset in use, etc.). For commonly-used structures, use the following identifiers: 'single-elim' (Single elimination), 'double-elim' (Double elimination), 'round-robin' (Round robin)."
},
"phases": {
"type": "array",
"items": {
"$ref": "#/definitions/Phase"
},
"description": "Array of `Phase` objects containing information about each phase of this tournament. Useful for capturing complicated tournament structures, like round-robin pools leading into a double-elimination bracket (where different phases may have different structures). See the `Phase` definition for more information."
},
"ruleset": {
"type": "string",
"description": "String representing the choice of ruleset."
},
"originURL": {
"type": "string",
"description": "String containing a external URL linking to the original source of this data (e.g. an external tournament website)."
},
"numberEntrants": {
"type": "integer",
"minimum": 0,
"description": "Integer containing the number of entrants in this tournament. If populated, this should be equal to the length of the `entrants` subarray of the root `Tournament` object."
},
"other": {
"type": "object",
"description": "Object that can be used to store any other relevant event-related information not covered by the previously mentioned fields."
}
},
"required": [ "name" ],
"title": "Event",
"description": "Object containing metadata relevant to the entire event, such as the name and date of the event, game played, the format of the tournament (e.g. whether it was single-elim or double-elim), etc."
},
"Entrant": {
"type": "object",
"additionalProperties": false,
"properties": {
"entrantID": {
"type": "string",
"minLength": 1,
"description": "Unique string ID corresponding to this entrant. This ID can be an autogenerated identifier, some form of the player's tag, or the player's tag itself, as long as it is guaranteed that no two different entrants share the same `entrantID`. Entrants in `Set` objects are referenced by this ID. This is a required field."
},
"entrantTag": {
"type": "string",
"description": "String containing the entrant's ``tag; in other words, the name the entrant chooses when registering for the tournament, that appears in results, etc."
},
"initialSeed": {
"type": "integer",
"minimum": 1,
"description": "Integer representing the initial seeding of this entrant. Larger seeds are worse seeds; 1 is the best possible seed."
},
"finalPlacement": {
"type": "integer",
"minimum": 1,
"description": "Integer representing the final placing of this entrant."
},
"personalInformation": {
"type": "array",
"items": {
"$ref": "#/definitions/PersonalInformation"
},
"description": "List of personal data about players corresponding to this entrant (e.g. legal name, country, etc.). If this entrant corresponds to a single player, this will be a list of size one. If it is a team of several players, there will be one entry per player."
},
"other": {
"type": "object",
"description": "Object that can be used to store any other relevant entrant-related information not covered by the previously mentioned fields."
}
},
"required": [ "entrantID" ],
"title": "Entrant",
"description": "Object representing an entrant in the tournament. Every unique entrant which appears in a set should have a corresponding `Entrant` object in the `entrants` subfield of `Tournament`."
},
"PersonalInformation": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "String containing entrant's legal name."
},
"country": {
"type": "string",
"description": "String containing entrant's country."
},
"tag": {
"type": "string",
"description": "String containing entrant's tag. Same as entrantTag if entrant is a single player."
},
"prefix": {
"type": "string",
"description": "String containing prefix for entrant's tag."
},
"other": {
"type": "object",
"description": "Object that can be used to store any other relevant personal entrant-related information not covered by the previously mentioned fields."
}
},
"required": [],
"title": "PersonalInformation",
"description": "Object representing personal information (e.g. name, country) associated with an entrant. Subobject of `Entrant`."
},
"Set": {
"type": "object",
"additionalProperties": false,
"properties": {
"setID": {
"type": "string",
"description": "String containing a unique identifier for this set (i.e. no two sets in the event's `sets` array should have the same setID)."
},
"entrant1ID": {
"type": "string",
"description": "The entrantID of the first player in this match."
},
"entrant2ID": {
"type": "string",
"description": "The entrantID of the second player in this match."
},
"status": {
"type": "string",
"enum": [ "completed", "started", "pending" ],
"description": "String representing the status of this set. If populated, must take one of the following values: 'completed' (if the set has finished), 'started' (if the set is currently in progress), or 'pending' (if the set has yet to start)."
},
"entrant1Result": {
"type": "string",
"$ref": "#/definitions/SetGameResult",
"description": "String representing the result of entrant 1 in this match. If populated, must equal either 'win', 'lose', 'draw', or 'dq'. In the case of 'dq', the player disqualified should be assigned the 'dq' result and the other player should be assigned the 'win' result. (If both players are disqualified, both should be assigned 'dq')."
},
"entrant2Result": {
"type": "string",
"$ref": "#/definitions/SetGameResult",
"description": "String representing the result of entrant 2 in this match. If populated, must equal either 'win', 'lose', 'draw', or 'dq'."
},
"entrant1Score": {
"type": "integer",
"description": "Integer representing the score of entrant 1 in this match."
},
"entrant2Score": {
"type": "integer",
"description": "Integer representing the score of entrant 2 in this match."
},
"entrant1NextSetID": {
"type": "string",
"description": "The setID of the set that entrant 1 will play next. For a single-elim or double-elim tournament, setting this allows one for reconstruction of the original bracket. If entrant 1 does not play another set (e.g. they have won or are knocked out), do not set this field."
},
"entrant2NextSetID": {
"type": "string",
"description": "The setID of the set that entrant 2 will play next. For a double-elim tournament, setting this allows one for reconstruction of the original bracket. If entrant 2 does not play another set, do not set this field."
},
"entrant1PrevSetID": {
"type": "string",
"description": "The setID of the set that entrant 1 played right before this set. If this is entrant 1's first set, do not set this field."
},
"entrant2PrevSetID": {
"type": "string",
"description": "The setID of the set that entrant 2 played right before this set. If this is entrant 2's first set, do not set this field."
},
"setFormat": {
"type": "string",
"description": "String representing format specific to this set (e.g. whether it was best of 3 or best of 5)."
},
"phaseID": {
"type": "string",
"description": "String representing the `phase' of this specific set. It is up to the user's discretion to decide what precisely a phase means. For tournaments with multiple phases / levels (e.g. pools, top 64, top 8), it is convenient to record this information here."
},
"roundID": {
"type": "string",
"description": "String representing the `round' in the bracket of this specific set (for example, \"Winner's Round 1\" or \"Semifinals\"). It is up to the user's discretion to decide what precisely a round means and how to record it."
},
"games": {
"type": "array",
"items": {
"$ref": "#/definitions/Game"
},
"description": "Array of `Game` objects containing information about each game of this set. It is recommended (but not required) that this array records the games in chronological order. See the `Game` definition for more information."
},
"other": {
"type": "object",
"description": "Object that can be used to store any other relevant set-related information not covered by the previously mentioned fields."
}
},
"required": [ "setID" ],
"title": "Set",
"description": "Object representing a single set of the tournament."
},
"Game": {
"type": "object",
"additionalProperties": false,
"properties": {
"gameNumber": {
"type": "integer",
"minimum": 1,
"description": "Integer representing the number (in chronological order) of this game. The `gameNumber`s of the games of a set should be unique and span a consecutive range of integers starting at 1."
},
"entrant1Characters": {
"type": "array",
"items": {
"type": "string"
},
"description": "Array of strings representing the character(s) played by entrant 1 in this game. If entrant 1 only plays a single character in this game (most cases), this field should contain an array containing a single string (entrant 1's character). In team games or games where each entrant can choose a selection of different characters, you should record these characters as separate elements of this field."
},
"entrant2Characters": {
"type": "array",
"description": "Array of strings representing the character(s) played by entrant 2 in this game. See also `entrant1Characters`."
},
"stage": {
"type": "string",
"description": "String representing the stage this game was played on."
},
"entrant1Result": {
"type": "string",
"$ref": "#/definitions/SetGameResult",
"description": "String representing the result of entrant 1."
},
"entrant2Result": {
"type": "string",
"$ref": "#/definitions/SetGameResult",
"description": "String representing the result of entrant 2."
},
"other": {
"type": "object",
"description": "Object that can be used to store any other relevant game-related information not covered by the previously mentioned fields."
}
},
"required": [ "gameNumber" ],
"title": "Game",
"description": "Object representing a single game of a set."
},
"Phase": {
"type": "object",
"additionalProperties": false,
"properties": {
"phaseID": {
"type": "string",
"description": "Unique string ID corresponding to this phase."
},
"phaseStructure": {
"type": "string",
"description": "String representing the format of this tournament in this phase (e.g. single-elimination, double-elimination, etc.). See the `tournamentStructure` field in `Event` for more information."
},
"other": {
"type": "object",
"description": "Object that can be used to store any other relevant phase-related information not covered by the previously mentioned fields."
}
},
"required": [ "phaseID" ],
"title": "Phase",
"description": "Object representing a single phase of a tournament (e.g. pools, top 64, etc.) Useful for recording tournaments with complex structures (e.g. round-robin pools into a double-elimination bracket). See the `phases` field in `Event` for more information."
}
}
}