| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238 |
- {
- "$schema": "https://json-schema.org/draft/2020-12/schema",
- "$id": "https://local.invalid/schemas/board_viewer_data.schema.json",
- "title": "Generated board viewer data",
- "type": "object",
- "additionalProperties": false,
- "required": ["schema", "board", "counts", "touchpoints", "interfaces", "photo_overlay"],
- "properties": {
- "schema": {"const": "board-viewer-data-v1"},
- "board": {
- "type": "object",
- "additionalProperties": false,
- "required": ["id", "name", "source_bounds", "view_box"],
- "properties": {
- "id": {"type": "string", "minLength": 1},
- "name": {"type": "string", "minLength": 1},
- "source_bounds": {"$ref": "#/$defs/bounds"},
- "view_box": {"$ref": "#/$defs/bounds"}
- }
- },
- "counts": {
- "type": "object",
- "additionalProperties": false,
- "required": ["footprints", "touchpoints", "pads", "connector_contacts", "connector_auxiliary_pads", "categories", "sides"],
- "properties": {
- "footprints": {"type": "integer", "minimum": 0},
- "touchpoints": {"type": "integer", "minimum": 0},
- "pads": {"type": "integer", "minimum": 0},
- "connector_contacts": {"type": "integer", "minimum": 0},
- "connector_auxiliary_pads": {"type": "integer", "minimum": 0},
- "categories": {"$ref": "#/$defs/countMap"},
- "sides": {
- "type": "object",
- "additionalProperties": false,
- "required": ["front", "back"],
- "properties": {
- "front": {"type": "integer", "minimum": 0},
- "back": {"type": "integer", "minimum": 0}
- }
- }
- }
- },
- "touchpoints": {"type": "array", "items": {"$ref": "#/$defs/touchpoint"}},
- "interfaces": {"type": "array", "items": {"type": "object"}},
- "photo_overlay": {
- "oneOf": [
- {"type": "null"},
- {
- "type": "object",
- "additionalProperties": false,
- "required": ["asset", "sha256", "matrix", "control_point_count"],
- "properties": {
- "asset": {"type": "string", "pattern": "^board-photo\\.(png|jpg|jpeg|webp)$"},
- "sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
- "matrix": {
- "type": "array",
- "minItems": 6,
- "maxItems": 6,
- "items": {"type": "number"}
- },
- "control_point_count": {"type": "integer", "minimum": 3}
- }
- }
- ]
- }
- },
- "$defs": {
- "countMap": {
- "type": "object",
- "additionalProperties": false,
- "required": ["CON", "J", "PL", "TP"],
- "properties": {
- "CON": {"type": "integer", "minimum": 0},
- "J": {"type": "integer", "minimum": 0},
- "PL": {"type": "integer", "minimum": 0},
- "TP": {"type": "integer", "minimum": 0}
- }
- },
- "point": {
- "type": "object",
- "additionalProperties": false,
- "required": ["x", "y"],
- "properties": {"x": {"type": "number"}, "y": {"type": "number"}}
- },
- "bounds": {
- "type": "object",
- "additionalProperties": false,
- "required": ["x", "y", "width", "height"],
- "properties": {
- "x": {"type": "number"},
- "y": {"type": "number"},
- "width": {"type": "number", "minimum": 0},
- "height": {"type": "number", "minimum": 0}
- }
- },
- "evidenceTier": {"enum": ["board_database", "cross_verified", "name_inferred", "unknown"]},
- "fpga": {
- "type": "object",
- "additionalProperties": false,
- "required": ["ball", "board_signal", "io_standard", "capabilities", "evidence_tier", "sources"],
- "properties": {
- "ball": {"type": "string"},
- "board_signal": {"type": "string"},
- "io_standard": {"type": "string"},
- "capabilities": {"type": "array", "items": {"type": "string"}},
- "evidence_tier": {"$ref": "#/$defs/evidenceTier"},
- "sources": {"type": "array", "items": {"type": "string"}}
- }
- },
- "mcu": {
- "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", "items": {"type": "string", "minLength": 1}},
- "evidence_tier": {"$ref": "#/$defs/evidenceTier"},
- "sources": {"type": "array", "items": {"type": "string", "minLength": 1}}
- }
- },
- "pin": {
- "type": "object",
- "additionalProperties": false,
- "required": ["id", "number", "pad_role", "row", "column", "board_order", "mechanical", "electrical", "net", "position", "view_position", "size", "rotation", "shape", "layers", "direction", "external_level", "function_category", "reserved", "fixed_load_conflict", "board_pull", "adc_pulltype", "active_level", "polarity", "external_components", "summary", "path", "evidence_tier", "evidence_sources", "fpga", "mcu", "programming", "recommendation"],
- "properties": {
- "id": {"type": "string", "minLength": 1},
- "number": {"type": "string"},
- "pad_role": {"enum": ["contact", "shield", "mechanical", "unknown"]},
- "row": {"type": ["integer", "null"], "minimum": 1},
- "column": {"type": ["integer", "null"], "minimum": 1},
- "board_order": {"type": ["integer", "null"], "minimum": 1},
- "mechanical": {"type": "boolean"},
- "electrical": {"type": "boolean"},
- "net": {"type": ["string", "null"]},
- "position": {"$ref": "#/$defs/point"},
- "view_position": {"$ref": "#/$defs/point"},
- "size": {
- "type": "object",
- "additionalProperties": false,
- "required": ["width", "height", "drill_width", "drill_height"],
- "properties": {
- "width": {"type": "number", "minimum": 0},
- "height": {"type": "number", "minimum": 0},
- "drill_width": {"type": "number", "minimum": 0},
- "drill_height": {"type": "number", "minimum": 0}
- }
- },
- "rotation": {"type": "number"},
- "shape": {"type": "string"},
- "layers": {"type": "array", "items": {"type": "string"}},
- "direction": {"enum": ["input", "output", "bidirectional", "passive", "unknown"]},
- "external_level": {"type": "string"},
- "function_category": {"type": "string"},
- "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}},
- "summary": {"type": "string"},
- "path": {"type": "array", "items": {"type": "string"}},
- "evidence_tier": {"$ref": "#/$defs/evidenceTier"},
- "evidence_sources": {"type": "array", "items": {"type": "string"}},
- "fpga": {"oneOf": [{"type": "null"}, {"$ref": "#/$defs/fpga"}]},
- "mcu": {"oneOf": [{"type": "null"}, {"$ref": "#/$defs/mcu"}]},
- "programming": {"$ref": "#/$defs/programming"},
- "recommendation": {
- "type": "object",
- "additionalProperties": false,
- "required": ["eligible", "reasons"],
- "properties": {
- "eligible": {"type": "boolean"},
- "reasons": {"type": "array", "items": {"type": "string"}}
- }
- }
- }
- },
- "programming": {
- "type": "object",
- "additionalProperties": false,
- "required": ["status", "conclusion", "network_explanation", "hdl_guidance", "connection_guidance", "constraints", "risks", "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", "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", "items": {"type": "string", "minLength": 1}}
- }
- },
- "connector": {
- "type": "object",
- "additionalProperties": false,
- "required": ["profile", "review_status", "view", "contact_count", "auxiliary_pad_count", "rows", "columns", "contact_grid", "contact_order", "sources"],
- "properties": {
- "profile": {"type": ["string", "null"]},
- "review_status": {"$ref": "#/$defs/evidenceTier"},
- "view": {"const": "board_front"},
- "contact_count": {"type": "integer", "minimum": 0},
- "auxiliary_pad_count": {"type": "integer", "minimum": 0},
- "rows": {"type": "integer", "minimum": 0},
- "columns": {"type": "integer", "minimum": 0},
- "contact_grid": {
- "type": "array",
- "items": {"type": "array", "items": {"type": "string", "minLength": 1}}
- },
- "contact_order": {"type": "array", "items": {"type": "string", "minLength": 1}},
- "sources": {"type": "array", "items": {"type": "string", "minLength": 1}}
- }
- },
- "touchpoint": {
- "type": "object",
- "additionalProperties": false,
- "required": ["reference", "category", "component_value", "position", "view_position", "rotation", "bounds", "view_bounds", "side", "summary", "connector", "pins"],
- "properties": {
- "reference": {"type": "string", "pattern": "^(CON|J|PL|TP)[0-9]+$"},
- "category": {"enum": ["CON", "J", "PL", "TP"]},
- "component_value": {"type": "string"},
- "position": {"$ref": "#/$defs/point"},
- "view_position": {"$ref": "#/$defs/point"},
- "rotation": {"type": "number"},
- "bounds": {"$ref": "#/$defs/bounds"},
- "view_bounds": {"$ref": "#/$defs/bounds"},
- "side": {"enum": ["front", "back"]},
- "summary": {"type": "string"},
- "connector": {"oneOf": [{"type": "null"}, {"$ref": "#/$defs/connector"}]},
- "pins": {"type": "array", "items": {"$ref": "#/$defs/pin"}}
- }
- }
- }
- }
|