mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
ui: problemconfig: add compilableFile schema
This commit is contained in:
1 parent
d6287b15b1
commit
ae24d3952f
1 file changed
+18
-4
@@ -48,6 +48,20 @@ const problemConfigSchema: JSONSchema7 = {
|
||||
},
|
||||
},
|
||||
},
|
||||
compilableFile: {
|
||||
oneOf: [
|
||||
{ type: 'string', pattern: '\\.' },
|
||||
{
|
||||
type: 'object',
|
||||
properties: {
|
||||
file: { type: 'string', pattern: '\\.' },
|
||||
lang: { type: 'string' },
|
||||
},
|
||||
required: ['file', 'lang'],
|
||||
additionalProperties: false,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
properties: {
|
||||
redirect: { type: 'string', pattern: '[0-9a-zA-Z_-]+\\/[0-9]+' },
|
||||
@@ -59,14 +73,14 @@ const problemConfigSchema: JSONSchema7 = {
|
||||
checker_type: { enum: ['default', 'lemon', 'syzoj', 'hustoj', 'testlib', 'strict', 'qduoj'] },
|
||||
checker: {
|
||||
oneOf: [
|
||||
{ type: 'string', pattern: '\\.' },
|
||||
{ type: 'string', enum: testlibCheckers },
|
||||
{ $ref: '#/definitions/compilableFile' },
|
||||
],
|
||||
},
|
||||
interactor: { type: 'string', pattern: '\\.' },
|
||||
manager: { type: 'string', pattern: '\\.' },
|
||||
interactor: { $ref: '#/definitions/compilableFile' },
|
||||
manager: { $ref: '#/definitions/compilableFile' },
|
||||
num_processes: { type: 'number', minimum: 1, maximum: 5 },
|
||||
validator: { type: 'string', pattern: '\\.' },
|
||||
validator: { $ref: '#/definitions/compilableFile' },
|
||||
user_extra_files: { type: 'array', items: { type: 'string' } },
|
||||
judge_extra_files: { type: 'array', items: { type: 'string' } },
|
||||
cases: { $ref: '#/definitions/cases' },
|
||||
|
||||
Reference in new issue
Block a user