{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://local.invalid/schemas/board_viewer_annotations.schema.json", "title": "Board viewer curated annotations", "type": "object", "additionalProperties": false, "required": ["schema", "board_id", "connector_profiles", "touchpoints", "interfaces", "photo_overlay"], "properties": { "schema": {"const": "board-viewer-annotations-v1"}, "board_id": {"type": "string", "minLength": 1}, "connector_profiles": { "type": "object", "additionalProperties": {"$ref": "#/$defs/connectorProfile"} }, "annotation_templates": { "type": "object", "additionalProperties": {"$ref": "#/$defs/touchpointAnnotation"} }, "template_instances": { "type": "object", "additionalProperties": {"$ref": "#/$defs/templateInstance"} }, "touchpoints": { "type": "object", "additionalProperties": {"$ref": "#/$defs/touchpointAnnotation"} }, "interfaces": { "type": "array", "items": {"$ref": "#/$defs/interface"} }, "photo_overlay": { "oneOf": [ {"type": "null"}, {"$ref": "#/$defs/photoOverlay"} ] } }, "$defs": { "evidenceTier": { "enum": ["board_database", "cross_verified", "name_inferred", "unknown"] }, "touchpointAnnotation": { "type": "object", "additionalProperties": false, "required": ["summary", "pins"], "properties": { "summary": {"type": "string", "minLength": 1}, "pins": { "type": "object", "additionalProperties": {"$ref": "#/$defs/pinAnnotation"} } } }, "templateInstance": { "type": "object", "additionalProperties": false, "required": ["template", "variables"], "properties": { "template": {"type": "string", "minLength": 1}, "variables": { "type": "object", "additionalProperties": {"type": "string"} } } }, "connectorProfile": { "type": "object", "additionalProperties": false, "required": ["references", "contact_pins", "shield_pads", "evidence_tier", "sources"], "properties": { "component_value": {"type": "string"}, "references": { "type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "string", "pattern": "^(CON|J|PL)[0-9]+$"} }, "contact_pins": { "type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "string", "minLength": 1} }, "shield_pads": { "type": "array", "uniqueItems": true, "items": {"type": "string", "minLength": 1} }, "evidence_tier": {"$ref": "#/$defs/evidenceTier"}, "sources": { "type": "array", "minItems": 1, "items": {"type": "string", "minLength": 1} } } }, "pinAnnotation": { "type": "object", "additionalProperties": false, "required": ["summary", "path", "evidence_tier", "sources"], "properties": { "summary": {"type": "string", "minLength": 1}, "path": {"type": "array", "items": {"type": "string", "minLength": 1}}, "evidence_tier": {"$ref": "#/$defs/evidenceTier"}, "sources": {"type": "array", "minItems": 1, "items": {"type": "string", "minLength": 1}}, "direction": {"enum": ["input", "output", "bidirectional", "passive", "unknown"]}, "external_level": {"type": "string", "minLength": 1}, "function_category": {"type": "string", "minLength": 1}, "reserved": {"type": "boolean"}, "fixed_load_conflict": {"type": "boolean"}, "board_pull": {"type": ["string", "null"]}, "adc_pulltype": {"type": ["string", "null"], "pattern": "^[A-Z][A-Z0-9_]*$"}, "active_level": {"type": "string", "minLength": 1}, "polarity": {"type": "string", "minLength": 1}, "external_components": { "type": "array", "items": {"type": "string", "minLength": 1} }, "fpga": {"$ref": "#/$defs/fpgaAnnotation"}, "mcu": {"$ref": "#/$defs/mcuAnnotation"}, "programming": {"$ref": "#/$defs/programmingAnnotation"} } }, "fpgaAnnotation": { "type": "object", "additionalProperties": false, "required": ["ball", "board_signal", "io_standard", "capabilities", "evidence_tier", "sources"], "properties": { "ball": {"type": "string", "minLength": 1}, "board_signal": {"type": "string", "minLength": 1}, "io_standard": {"type": "string", "minLength": 1}, "capabilities": { "type": "array", "minItems": 1, "items": {"type": "string", "minLength": 1} }, "evidence_tier": {"$ref": "#/$defs/evidenceTier"}, "sources": { "type": "array", "minItems": 1, "items": {"type": "string", "minLength": 1} } } }, "mcuAnnotation": { "type": "object", "additionalProperties": false, "required": ["device", "family", "pin", "signal", "capabilities", "evidence_tier", "sources"], "properties": { "device": {"type": "string", "minLength": 1}, "family": {"type": "string", "minLength": 1}, "pin": {"type": "string", "minLength": 1}, "signal": {"type": "string", "minLength": 1}, "capabilities": { "type": "array", "minItems": 1, "items": {"type": "string", "minLength": 1} }, "evidence_tier": {"$ref": "#/$defs/evidenceTier"}, "sources": { "type": "array", "minItems": 1, "items": {"type": "string", "minLength": 1} } } }, "programmingAnnotation": { "type": "object", "additionalProperties": false, "required": ["evidence_tier", "sources"], "properties": { "status": {"enum": ["verified_fpga", "verified_mcu", "board_only", "not_programmable", "unknown"]}, "conclusion": {"type": "string", "minLength": 1}, "network_explanation": {"type": "string", "minLength": 1}, "hdl_guidance": {"type": "string", "minLength": 1}, "connection_guidance": { "type": "array", "minItems": 1, "items": {"type": "string", "minLength": 1} }, "constraints": {"type": "array", "items": {"type": "string", "minLength": 1}}, "risks": {"type": "array", "items": {"type": "string", "minLength": 1}}, "evidence_tier": {"$ref": "#/$defs/evidenceTier"}, "sources": { "type": "array", "minItems": 1, "items": {"type": "string", "minLength": 1} } } }, "interface": { "type": "object", "additionalProperties": false, "required": ["id", "name", "touchpoint", "pins", "external_level", "evidence_tier", "sources"], "properties": { "id": {"type": "string", "pattern": "^[a-z0-9-]+$"}, "name": {"type": "string", "minLength": 1}, "touchpoint": {"type": "string", "pattern": "^(CON|J|PL|TP)[0-9]+$"}, "pins": {"type": "array", "minItems": 1, "items": {"type": "string"}}, "external_level": {"type": "string", "minLength": 1}, "evidence_tier": {"$ref": "#/$defs/evidenceTier"}, "sources": {"type": "array", "minItems": 1, "items": {"type": "string", "minLength": 1}} } }, "photoOverlay": { "type": "object", "additionalProperties": false, "required": ["path", "sha256", "control_points"], "properties": { "path": {"type": "string", "minLength": 1}, "sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"}, "control_points": { "type": "array", "minItems": 3, "items": { "type": "object", "additionalProperties": false, "required": ["image", "board"], "properties": { "image": {"$ref": "#/$defs/point"}, "board": {"$ref": "#/$defs/point"} } } } } }, "point": { "type": "object", "additionalProperties": false, "required": ["x", "y"], "properties": { "x": {"type": "number"}, "y": {"type": "number"} } } } }