Skip to content

Commit e2a591b

Browse files
committed
Add attributes for entry_point, extensions and compiler/runner to language.
1 parent 49e9d81 commit e2a591b

File tree

2 files changed

+37
-2
lines changed

2 files changed

+37
-2
lines changed

contest-api/json-schema/common.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,18 @@
124124
"items": {
125125
"$ref": "#/fileref"
126126
}
127+
},
127128

129+
"command": {
130+
"type": "object",
131+
"properties": {
132+
"command": { "type": "string" },
133+
"args": { "type": "string" },
134+
"version": { "type": "string" },
135+
"version-command": { "type": "string" }
136+
},
137+
"required": ["command"],
138+
"$ref": "#/strictproperties"
128139
},
129140

130141
"$comment": "Inside here add '\"minItems\": 1' to require all collection endpoints to contain at least one element.",

contest-api/json-schema/language.json

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,32 @@
66
"type": "object",
77
"properties": {
88
"id": { "$ref": "common.json#/identifier" },
9-
"name": { "type": "string" }
9+
"name": { "type": "string" },
10+
"entry_point_required": { "type": "boolean" },
11+
"entry_point_name": { "type": [ "string", "null" ] },
12+
"extensions": {
13+
"type": "array",
14+
"uniqueItems": true,
15+
"items": { "type": "string" }
16+
},
17+
"compiler": { "$ref": "common.json#/command" },
18+
"runner": { "$ref": "common.json#/command" }
1019
},
11-
"required": ["id", "name"],
20+
"oneOf": [
21+
{
22+
"properties": { "entry_point_required": { "enum": [false] } },
23+
"not": { "required": ["entry_point_name"] }
24+
},
25+
{
26+
"properties": { "entry_point_required": { "enum": [false] } },
27+
"properties": { "entry_point_name": { "enum": [null] } }
28+
},
29+
{
30+
"properties": { "entry_point_required": { "enum": [true] } },
31+
"properties": { "entry_point_name": { "type": "string" } },
32+
"required": ["entry_point_name"]
33+
}
34+
],
35+
"required": ["id", "name", "entry_point_required", "extensions"],
1236
"$ref": "common.json#/strictproperties"
1337
}

0 commit comments

Comments
 (0)