| { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "$id": "https://w3id.org/foi-process/schema/validation-finding.schema.json", | |
| "title": "Validation Finding", | |
| "type": "object", | |
| "required": [ | |
| "rule_id", | |
| "layer", | |
| "severity", | |
| "message" | |
| ], | |
| "properties": { | |
| "rule_id": { | |
| "type": "string", | |
| "minLength": 3, | |
| "maxLength": 512, | |
| "pattern": "^\\S+:\\S+$" | |
| }, | |
| "layer": { | |
| "enum": [ | |
| "structural", | |
| "semantic", | |
| "process", | |
| "statutory", | |
| "privacy", | |
| "data_quality" | |
| ] | |
| }, | |
| "severity": { | |
| "enum": [ | |
| "info", | |
| "warning", | |
| "review_needed", | |
| "error", | |
| "critical" | |
| ] | |
| }, | |
| "message": { | |
| "type": "string" | |
| }, | |
| "subject_id": { | |
| "type": "string", | |
| "minLength": 3, | |
| "maxLength": 512, | |
| "pattern": "^\\S+:\\S+$" | |
| }, | |
| "evidence": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "required": [ | |
| "evidence_id" | |
| ], | |
| "properties": { | |
| "evidence_id": { | |
| "type": "string", | |
| "minLength": 3, | |
| "maxLength": 512, | |
| "pattern": "^\\S+:\\S+$" | |
| }, | |
| "selector": { | |
| "oneOf": [ | |
| { | |
| "type": "object", | |
| "required": [ | |
| "selector_type", | |
| "start", | |
| "end" | |
| ], | |
| "properties": { | |
| "selector_type": { | |
| "const": "bytes" | |
| }, | |
| "start": { | |
| "type": "integer", | |
| "minimum": 0 | |
| }, | |
| "end": { | |
| "type": "integer", | |
| "minimum": 0 | |
| } | |
| }, | |
| "additionalProperties": false | |
| }, | |
| { | |
| "type": "object", | |
| "required": [ | |
| "selector_type", | |
| "span" | |
| ], | |
| "properties": { | |
| "selector_type": { | |
| "const": "text" | |
| }, | |
| "span": { | |
| "type": "object", | |
| "required": [ | |
| "start", | |
| "end" | |
| ], | |
| "properties": { | |
| "start": { | |
| "type": "integer", | |
| "minimum": 0 | |
| }, | |
| "end": { | |
| "type": "integer", | |
| "minimum": 0 | |
| } | |
| }, | |
| "additionalProperties": false | |
| } | |
| }, | |
| "additionalProperties": false | |
| }, | |
| { | |
| "type": "object", | |
| "required": [ | |
| "selector_type", | |
| "page" | |
| ], | |
| "properties": { | |
| "selector_type": { | |
| "const": "page" | |
| }, | |
| "page": { | |
| "type": "integer", | |
| "minimum": 1 | |
| } | |
| }, | |
| "additionalProperties": false | |
| }, | |
| { | |
| "type": "object", | |
| "required": [ | |
| "selector_type", | |
| "bbox" | |
| ], | |
| "properties": { | |
| "selector_type": { | |
| "const": "bounding_box" | |
| }, | |
| "bbox": { | |
| "type": "object", | |
| "required": [ | |
| "page", | |
| "x", | |
| "y", | |
| "width", | |
| "height" | |
| ], | |
| "properties": { | |
| "page": { | |
| "type": "integer", | |
| "minimum": 1 | |
| }, | |
| "x": { | |
| "type": "number" | |
| }, | |
| "y": { | |
| "type": "number" | |
| }, | |
| "width": { | |
| "type": "number", | |
| "minimum": 0 | |
| }, | |
| "height": { | |
| "type": "number", | |
| "minimum": 0 | |
| }, | |
| "coordinate_system": { | |
| "type": "string" | |
| } | |
| }, | |
| "additionalProperties": false | |
| } | |
| }, | |
| "additionalProperties": false | |
| }, | |
| { | |
| "type": "object", | |
| "required": [ | |
| "selector_type", | |
| "pointer" | |
| ], | |
| "properties": { | |
| "selector_type": { | |
| "const": "json_pointer" | |
| }, | |
| "pointer": { | |
| "type": "string" | |
| } | |
| }, | |
| "additionalProperties": false | |
| }, | |
| { | |
| "type": "object", | |
| "required": [ | |
| "selector_type" | |
| ], | |
| "properties": { | |
| "selector_type": { | |
| "const": "warc_payload" | |
| } | |
| }, | |
| "additionalProperties": false | |
| } | |
| ] | |
| }, | |
| "role": { | |
| "type": "string", | |
| "minLength": 3, | |
| "maxLength": 512, | |
| "pattern": "^\\S+:\\S+$" | |
| } | |
| }, | |
| "additionalProperties": false | |
| } | |
| }, | |
| "requires_human_review": { | |
| "type": "boolean" | |
| }, | |
| "details": { | |
| "type": "object" | |
| } | |
| }, | |
| "additionalProperties": false | |
| } | |