{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://scient.ing/ns/schemas/exercise.schema.json", "title": "Exercise", "description": "scienting-exercise/1: the body of an exercise annotation; spec/19-exercises.md.", "type": "object", "properties": { "format": { "const": "scienting-exercise/1" }, "exercise": { "enum": [ "anchor", "check", "trace", "reproduce", "verify" ] }, "prompt": { "type": "string", "minLength": 1 }, "summary": { "type": "string", "minLength": 1 }, "key": { "type": "object", "properties": { "elements": { "type": "array", "items": { "type": "object", "properties": { "anchors": { "type": "array", "items": { "$ref": "anchor.schema.json" }, "minItems": 1 }, "points": { "$ref": "common.schema.json#/$defs/decimal" }, "feedback": { "type": "object", "properties": { "hit": { "type": "string" }, "miss": { "type": "string" } }, "required": [], "additionalProperties": false } }, "required": [ "anchors", "points" ], "additionalProperties": false }, "minItems": 1 }, "verdict": { "type": "object", "properties": { "value": { "enum": [ "supports", "partly", "does-not", "cannot-tell" ] }, "points": { "$ref": "common.schema.json#/$defs/decimal" }, "feedback": { "type": "object", "properties": { "hit": { "type": "string" }, "miss": { "type": "string" } }, "required": [], "additionalProperties": false } }, "required": [ "value", "points" ], "additionalProperties": false }, "chain": { "type": "array", "items": { "type": "object", "properties": { "anchors": { "type": "array", "items": { "$ref": "anchor.schema.json" }, "minItems": 1 }, "points": { "$ref": "common.schema.json#/$defs/decimal" }, "feedback": { "type": "object", "properties": { "hit": { "type": "string" }, "miss": { "type": "string" } }, "required": [], "additionalProperties": false } }, "required": [ "anchors", "points" ], "additionalProperties": false }, "minItems": 1 }, "value": { "$ref": "common.schema.json#/$defs/decimal" }, "tolerance": { "$ref": "common.schema.json#/$defs/decimal" }, "unit": { "type": "string", "minLength": 1 }, "digitization": { "$ref": "common.schema.json#/$defs/recordId" }, "points": { "$ref": "common.schema.json#/$defs/decimal" }, "feedback": { "type": "object", "properties": { "hit": { "type": "string" }, "miss": { "type": "string" } }, "required": [], "additionalProperties": false }, "errors": { "type": "array", "items": { "type": "object", "properties": { "anchors": { "type": "array", "items": { "$ref": "anchor.schema.json" }, "minItems": 1 }, "verdict": { "enum": [ "supports", "partly", "does-not", "cannot-tell" ] }, "points": { "$ref": "common.schema.json#/$defs/decimal" }, "feedback": { "type": "object", "properties": { "hit": { "type": "string" }, "miss": { "type": "string" } }, "required": [], "additionalProperties": false } }, "required": [ "anchors", "verdict", "points" ], "additionalProperties": false }, "minItems": 1 } }, "required": [], "additionalProperties": false }, "rule": { "type": "object", "properties": { "match": { "enum": [ "same-node", "overlap", "chain" ] }, "min_overlap": { "$ref": "common.schema.json#/$defs/decimal" } }, "required": [ "match" ], "additionalProperties": false } }, "required": [ "format", "exercise", "prompt", "key", "rule" ], "additionalProperties": false, "allOf": [ { "if": { "properties": { "exercise": { "const": "anchor" } } }, "then": { "properties": { "key": { "required": [ "elements" ] } } } }, { "if": { "properties": { "exercise": { "const": "check" } } }, "then": { "properties": { "key": { "required": [ "elements", "verdict" ] } } } }, { "if": { "properties": { "exercise": { "const": "trace" } } }, "then": { "properties": { "key": { "required": [ "chain" ] }, "rule": { "properties": { "match": { "const": "chain" } } } } } }, { "if": { "properties": { "exercise": { "const": "reproduce" } } }, "then": { "properties": { "key": { "required": [ "value", "tolerance", "points" ] } } } }, { "if": { "properties": { "exercise": { "const": "verify" } } }, "then": { "required": [ "summary" ], "properties": { "key": { "required": [ "errors" ] } } } } ] }