Files
KF-OnlineJudge/contracts/schemas/judge-stopped.v1.schema.json

70 lines
1.6 KiB
JSON

{
"$comment": "Structural schema; also run versioned model validation for cross-field budgets, result consistency, UUID canonical form and UTF-8 byte limits.",
"$defs": {
"LeaseBinding": {
"additionalProperties": false,
"properties": {
"attempt_id": {
"format": "uuid",
"title": "Attempt Id",
"type": "string"
},
"evaluation_id": {
"format": "uuid",
"title": "Evaluation Id",
"type": "string"
},
"fencing_version": {
"maximum": 9223372036854775807,
"minimum": 1,
"title": "Fencing Version",
"type": "integer"
},
"worker_id": {
"format": "uuid",
"title": "Worker Id",
"type": "string"
}
},
"required": [
"evaluation_id",
"attempt_id",
"worker_id",
"fencing_version"
],
"title": "LeaseBinding",
"type": "object"
}
},
"$id": "urn:kf-oj:judge-stopped:v1",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"binding": {
"$ref": "#/$defs/LeaseBinding"
},
"cleanup_complete": {
"title": "Cleanup Complete",
"type": "boolean"
},
"kind": {
"const": "judge.stopped",
"title": "Kind",
"type": "string"
},
"schema_version": {
"const": 1,
"title": "Schema Version",
"type": "integer"
}
},
"required": [
"schema_version",
"kind",
"binding",
"cleanup_complete"
],
"title": "StoppedReport",
"type": "object"
}