{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://paperspec.scient.ing/schemas/receipt.schema.json", "title": "Review receipt", "description": "scienting-receipt/1; spec/08-fidelity.md.", "type": "object", "properties": { "format": { "const": "scienting-receipt/1" }, "id": { "$ref": "common.schema.json#/$defs/recordId" }, "doc": { "$ref": "common.schema.json#/$defs/key" }, "rev": { "type": "integer", "minimum": 0 }, "level": { "$ref": "common.schema.json#/$defs/receiptLevel" }, "scope": { "type": "string", "pattern": "^(all|section:[a-hjkmnp-tv-z][0-9a-hjkmnp-tv-z]{6}|page:[1-9][0-9]*|targeted:[a-z0-9-]+|qa:[a-hjkmnp-tv-z][0-9a-hjkmnp-tv-z]{6,25})$" }, "nodes": { "type": "array", "items": { "type": "array", "prefixItems": [ { "$ref": "common.schema.json#/$defs/nodeId" }, { "$ref": "common.schema.json#/$defs/hash" } ], "minItems": 2, "maxItems": 2 } }, "records": { "type": "array", "items": { "type": "array", "prefixItems": [ { "enum": [ "annotation", "digitization", "correction", "layer", "checklist" ] }, { "$ref": "common.schema.json#/$defs/recordId" }, { "$ref": "common.schema.json#/$defs/hash" } ], "minItems": 3, "maxItems": 3 } }, "root": { "$ref": "common.schema.json#/$defs/hash" }, "evidence": { "type": "array", "items": { "$ref": "common.schema.json#/$defs/evidence" } }, "by": { "$ref": "common.schema.json#/$defs/key" }, "at": { "$ref": "common.schema.json#/$defs/time" }, "qa": { "type": "object", "properties": { "of": { "$ref": "common.schema.json#/$defs/recordId" }, "key": { "$ref": "common.schema.json#/$defs/key" }, "seed": { "$ref": "common.schema.json#/$defs/base64" }, "rate": { "$ref": "common.schema.json#/$defs/decimal" }, "minimum": { "type": "integer", "minimum": 1 }, "sample": { "type": "array", "items": { "$ref": "common.schema.json#/$defs/nodeId" }, "minItems": 1 }, "errors": { "type": "array", "items": { "type": "object", "properties": { "node": { "$ref": "common.schema.json#/$defs/nodeId" }, "kind": { "enum": [ "word", "number", "equation", "structure", "other" ] }, "note": { "type": "string", "minLength": 1 } }, "required": [ "node" ], "additionalProperties": false } } }, "required": [ "of", "key", "seed", "rate", "minimum", "sample", "errors" ], "additionalProperties": false }, "export_of": { "$ref": "common.schema.json#/$defs/recordId" }, "keyed": { "$ref": "common.schema.json#/$defs/hashing" }, "signature": { "$ref": "common.schema.json#/$defs/signature" } }, "required": [ "format", "id", "doc", "rev", "level", "scope", "nodes", "root", "evidence", "by", "at", "signature" ], "additionalProperties": false, "allOf": [ { "if": { "properties": { "scope": { "pattern": "^qa:" } } }, "then": { "required": [ "qa" ] }, "else": { "not": { "required": [ "qa" ] } } }, { "anyOf": [ { "properties": { "nodes": { "minItems": 1 } } }, { "required": [ "records" ], "properties": { "records": { "minItems": 1 } } } ] } ] }