110 lines
2.5 KiB
JSON
110 lines
2.5 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://scient.ing/ns/schemas/submission.schema.json",
|
|
"title": "Submission",
|
|
"description": "scienting-submission/1: a student's answer, under a pseudonym; spec/19-exercises.md.",
|
|
"type": "object",
|
|
"properties": {
|
|
"format": {
|
|
"const": "scienting-submission/1"
|
|
},
|
|
"id": {
|
|
"$ref": "common.schema.json#/$defs/recordId"
|
|
},
|
|
"exercise": {
|
|
"type": "string",
|
|
"pattern": "^urn:scienting:annotation:[a-z0-9][a-z0-9._-]*/[a-hjkmnp-tv-z][0-9a-hjkmnp-tv-z]{6,25}$"
|
|
},
|
|
"doc": {
|
|
"$ref": "common.schema.json#/$defs/qualifiedKey"
|
|
},
|
|
"rev": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"student": {
|
|
"type": "string",
|
|
"pattern": "^[a-z0-9][a-z0-9-]{3,63}$"
|
|
},
|
|
"answers": {
|
|
"type": "object",
|
|
"properties": {
|
|
"anchors": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "anchor.schema.json"
|
|
}
|
|
},
|
|
"verdict": {
|
|
"enum": [
|
|
"supports",
|
|
"partly",
|
|
"does-not",
|
|
"cannot-tell"
|
|
]
|
|
},
|
|
"chain": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "anchor.schema.json"
|
|
}
|
|
}
|
|
},
|
|
"value": {
|
|
"$ref": "common.schema.json#/$defs/decimal"
|
|
},
|
|
"flags": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"anchor": {
|
|
"$ref": "anchor.schema.json"
|
|
},
|
|
"verdict": {
|
|
"enum": [
|
|
"supports",
|
|
"partly",
|
|
"does-not",
|
|
"cannot-tell"
|
|
]
|
|
},
|
|
"note": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
}
|
|
},
|
|
"required": [
|
|
"anchor",
|
|
"verdict"
|
|
],
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"note": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
}
|
|
},
|
|
"required": [],
|
|
"additionalProperties": false
|
|
},
|
|
"submitted_at": {
|
|
"$ref": "common.schema.json#/$defs/time"
|
|
}
|
|
},
|
|
"required": [
|
|
"format",
|
|
"id",
|
|
"exercise",
|
|
"doc",
|
|
"rev",
|
|
"student",
|
|
"answers",
|
|
"submitted_at"
|
|
],
|
|
"additionalProperties": false
|
|
}
|