Skip to content

Commit dd1193b

Browse files
committed
Add new optional commentary endpoint.
1 parent 5ef368b commit dd1193b

File tree

5 files changed

+42
-1
lines changed

5 files changed

+42
-1
lines changed

contest-api/check-api.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ judgements
2222
runs
2323
clarifications
2424
awards
25+
commentary
2526
scoreboard
2627
'
2728

@@ -30,6 +31,7 @@ scoreboard
3031
ENDPOINTS_OPTIONAL='
3132
team-members
3233
awards
34+
commentary
3335
'
3436

3537
ENDPOINTS_TO_FAIL='
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "CLICS Contest API: commentary",
4+
"description": "JSON response of this API call",
5+
6+
"type": "array",
7+
"uniqueItems": true,
8+
"$ref": "common.json#/nonemptyarray",
9+
"items": {
10+
"$ref": "commentary.json#"
11+
}
12+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "CLICS Contest API - commentary",
4+
"description": "Definition of a single commentary object",
5+
6+
"type": "object",
7+
"properties": {
8+
"id": { "$ref": "common.json#/identifier" },
9+
"time": { "$ref": "common.json#/abstime" },
10+
"contest_time": { "$ref": "common.json#/reltime" },
11+
"message": { "type": "string" },
12+
"team_ids": {
13+
"type": "array",
14+
"uniqueItems": true,
15+
"items": { "$ref": "common.json#/identifier" }
16+
},
17+
"problem_ids": {
18+
"type": "array",
19+
"uniqueItems": true,
20+
"items": { "$ref": "common.json#/identifier" }
21+
}
22+
},
23+
"required": ["id", "time", "contest_time", "message", "team_ids", "problem_ids"],
24+
"$ref": "common.json#/strictproperties"
25+
}

contest-api/json-schema/common.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"runs",
2020
"clarifications",
2121
"awards",
22+
"commentary",
2223
"scoreboard",
2324
"event-feed"
2425
]

contest-api/json-schema/event-feed.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
{ "$ref": "judgement.json#" },
2929
{ "$ref": "run.json#" },
3030
{ "$ref": "clarification.json#" },
31-
{ "$ref": "award.json#" }
31+
{ "$ref": "award.json#" },
32+
{ "$ref": "commentary.json#" }
3233
]
3334
}
3435
}

0 commit comments

Comments
 (0)