board_viewer_annotations.schema.json 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723
  1. {
  2. "$schema": "https://json-schema.org/draft/2020-12/schema",
  3. "$id": "https://local.invalid/schemas/board_viewer_annotations.schema.json",
  4. "title": "Board viewer curated annotations",
  5. "type": "object",
  6. "additionalProperties": false,
  7. "required": [
  8. "schema",
  9. "board_id",
  10. "connector_profiles",
  11. "touchpoints",
  12. "interfaces",
  13. "photo_overlay"
  14. ],
  15. "properties": {
  16. "schema": {
  17. "const": "board-viewer-annotations-v1"
  18. },
  19. "board_id": {
  20. "type": "string",
  21. "minLength": 1
  22. },
  23. "io_evidence_policy": {
  24. "$ref": "#/$defs/ioEvidencePolicy"
  25. },
  26. "historical_note": {
  27. "type": "string",
  28. "minLength": 1
  29. },
  30. "connector_profiles": {
  31. "type": "object",
  32. "additionalProperties": {
  33. "$ref": "#/$defs/connectorProfile"
  34. }
  35. },
  36. "annotation_templates": {
  37. "type": "object",
  38. "additionalProperties": {
  39. "$ref": "#/$defs/touchpointAnnotation"
  40. }
  41. },
  42. "template_instances": {
  43. "type": "object",
  44. "additionalProperties": {
  45. "$ref": "#/$defs/templateInstance"
  46. }
  47. },
  48. "touchpoints": {
  49. "type": "object",
  50. "additionalProperties": {
  51. "$ref": "#/$defs/touchpointAnnotation"
  52. }
  53. },
  54. "interfaces": {
  55. "type": "array",
  56. "items": {
  57. "$ref": "#/$defs/interface"
  58. }
  59. },
  60. "photo_overlay": {
  61. "oneOf": [
  62. {
  63. "type": "null"
  64. },
  65. {
  66. "$ref": "#/$defs/photoOverlay"
  67. }
  68. ]
  69. },
  70. "evidence_conflicts": {
  71. "type": "array",
  72. "items": {
  73. "type": "object",
  74. "additionalProperties": true,
  75. "required": [
  76. "id",
  77. "subject_reference",
  78. "status",
  79. "kind",
  80. "primary_source",
  81. "summary",
  82. "claims"
  83. ],
  84. "properties": {
  85. "id": {
  86. "type": "string",
  87. "minLength": 1
  88. },
  89. "subject_reference": {
  90. "type": "string",
  91. "pattern": "^R[0-9]+$"
  92. },
  93. "status": {
  94. "enum": [
  95. "unresolved",
  96. "resolved",
  97. "info"
  98. ]
  99. },
  100. "kind": {
  101. "type": "string",
  102. "minLength": 1
  103. },
  104. "primary_source": {
  105. "type": "string",
  106. "minLength": 1
  107. },
  108. "summary": {
  109. "type": "string",
  110. "minLength": 1
  111. },
  112. "claims": {
  113. "type": "array",
  114. "minItems": 1
  115. }
  116. }
  117. }
  118. },
  119. "resistor_links": {
  120. "type": "array",
  121. "items": {
  122. "type": "object",
  123. "additionalProperties": false,
  124. "required": [
  125. "source_pin_id",
  126. "resistor_reference",
  127. "pad_number",
  128. "claimed_net",
  129. "evidence_source"
  130. ],
  131. "properties": {
  132. "source_pin_id": {
  133. "type": "string"
  134. },
  135. "resistor_reference": {
  136. "type": "string",
  137. "pattern": "^R[0-9]+$"
  138. },
  139. "pad_number": {
  140. "type": [
  141. "string",
  142. "integer"
  143. ]
  144. },
  145. "claimed_net": {
  146. "type": "string",
  147. "minLength": 1
  148. },
  149. "evidence_source": {
  150. "type": "string",
  151. "minLength": 1
  152. },
  153. "note": {
  154. "type": "string"
  155. }
  156. }
  157. }
  158. }
  159. },
  160. "$defs": {
  161. "evidenceTier": {
  162. "enum": [
  163. "board_database",
  164. "cross_verified",
  165. "name_inferred",
  166. "unknown"
  167. ]
  168. },
  169. "ioEvidenceGradePhysical": {
  170. "enum": [
  171. "confirmed_by_brd",
  172. "inferred",
  173. "blocked",
  174. "not_applicable",
  175. "unknown"
  176. ]
  177. },
  178. "ioEvidenceGradePolarity": {
  179. "enum": [
  180. "confirmed_by_electrical_staff",
  181. "inferred",
  182. "blocked",
  183. "not_applicable",
  184. "unknown"
  185. ]
  186. },
  187. "ioEvidenceGradeMeasurement": {
  188. "enum": [
  189. "not_run",
  190. "pass",
  191. "fail",
  192. "blocked",
  193. "not_applicable",
  194. "unknown"
  195. ]
  196. },
  197. "ioEvidenceGrades": {
  198. "type": "object",
  199. "additionalProperties": false,
  200. "required": [
  201. "physical_path",
  202. "product_polarity",
  203. "hardware_measurement"
  204. ],
  205. "properties": {
  206. "physical_path": {
  207. "$ref": "#/$defs/ioEvidenceGradePhysical"
  208. },
  209. "product_polarity": {
  210. "$ref": "#/$defs/ioEvidenceGradePolarity"
  211. },
  212. "hardware_measurement": {
  213. "$ref": "#/$defs/ioEvidenceGradeMeasurement"
  214. }
  215. }
  216. },
  217. "ioEvidencePolicy": {
  218. "type": "object",
  219. "additionalProperties": false,
  220. "required": [
  221. "authoritative_order",
  222. "physical_path",
  223. "product_polarity",
  224. "hardware_measurement",
  225. "matrix_doc"
  226. ],
  227. "properties": {
  228. "authoritative_order": {
  229. "type": "array",
  230. "minItems": 3,
  231. "items": {
  232. "type": "string",
  233. "minLength": 1
  234. }
  235. },
  236. "physical_path": {
  237. "type": "string",
  238. "minLength": 1
  239. },
  240. "product_polarity": {
  241. "type": "string",
  242. "minLength": 1
  243. },
  244. "hardware_measurement": {
  245. "type": "string",
  246. "minLength": 1
  247. },
  248. "matrix_doc": {
  249. "type": "string",
  250. "minLength": 1
  251. },
  252. "historical_schematic_side_evidence": {
  253. "type": "string",
  254. "minLength": 1
  255. },
  256. "v1_2_schematic_pdf": {
  257. "type": "string",
  258. "minLength": 1
  259. },
  260. "must_not_override_connectors": {
  261. "type": "array",
  262. "items": {
  263. "type": "string",
  264. "minLength": 1
  265. }
  266. }
  267. }
  268. },
  269. "touchpointAnnotation": {
  270. "type": "object",
  271. "additionalProperties": false,
  272. "required": [
  273. "summary",
  274. "pins"
  275. ],
  276. "properties": {
  277. "summary": {
  278. "type": "string",
  279. "minLength": 1
  280. },
  281. "pins": {
  282. "type": "object",
  283. "additionalProperties": {
  284. "$ref": "#/$defs/pinAnnotation"
  285. }
  286. }
  287. }
  288. },
  289. "templateInstance": {
  290. "type": "object",
  291. "additionalProperties": false,
  292. "required": [
  293. "template",
  294. "variables"
  295. ],
  296. "properties": {
  297. "template": {
  298. "type": "string",
  299. "minLength": 1
  300. },
  301. "variables": {
  302. "type": "object",
  303. "additionalProperties": {
  304. "type": "string"
  305. }
  306. }
  307. }
  308. },
  309. "connectorProfile": {
  310. "type": "object",
  311. "additionalProperties": false,
  312. "required": [
  313. "references",
  314. "contact_pins",
  315. "shield_pads",
  316. "evidence_tier",
  317. "sources"
  318. ],
  319. "properties": {
  320. "component_value": {
  321. "type": "string"
  322. },
  323. "references": {
  324. "type": "array",
  325. "minItems": 1,
  326. "uniqueItems": true,
  327. "items": {
  328. "type": "string",
  329. "pattern": "^(CON|J|PL)[0-9]+$"
  330. }
  331. },
  332. "contact_pins": {
  333. "type": "array",
  334. "minItems": 1,
  335. "uniqueItems": true,
  336. "items": {
  337. "type": "string",
  338. "minLength": 1
  339. }
  340. },
  341. "shield_pads": {
  342. "type": "array",
  343. "uniqueItems": true,
  344. "items": {
  345. "type": "string",
  346. "minLength": 1
  347. }
  348. },
  349. "evidence_tier": {
  350. "$ref": "#/$defs/evidenceTier"
  351. },
  352. "sources": {
  353. "type": "array",
  354. "minItems": 1,
  355. "items": {
  356. "type": "string",
  357. "minLength": 1
  358. }
  359. }
  360. }
  361. },
  362. "pinAnnotation": {
  363. "type": "object",
  364. "additionalProperties": false,
  365. "required": [
  366. "summary",
  367. "path",
  368. "evidence_tier",
  369. "sources"
  370. ],
  371. "properties": {
  372. "summary": {
  373. "type": "string",
  374. "minLength": 1
  375. },
  376. "path": {
  377. "type": "array",
  378. "items": {
  379. "type": "string",
  380. "minLength": 1
  381. }
  382. },
  383. "evidence_tier": {
  384. "$ref": "#/$defs/evidenceTier"
  385. },
  386. "sources": {
  387. "type": "array",
  388. "minItems": 1,
  389. "items": {
  390. "type": "string",
  391. "minLength": 1
  392. }
  393. },
  394. "direction": {
  395. "enum": [
  396. "input",
  397. "output",
  398. "bidirectional",
  399. "passive",
  400. "unknown"
  401. ]
  402. },
  403. "external_level": {
  404. "type": "string",
  405. "minLength": 1
  406. },
  407. "function_category": {
  408. "type": "string",
  409. "minLength": 1
  410. },
  411. "reserved": {
  412. "type": "boolean"
  413. },
  414. "fixed_load_conflict": {
  415. "type": "boolean"
  416. },
  417. "board_pull": {
  418. "type": [
  419. "string",
  420. "null"
  421. ]
  422. },
  423. "adc_pulltype": {
  424. "type": [
  425. "string",
  426. "null"
  427. ],
  428. "pattern": "^[A-Z][A-Z0-9_]*$"
  429. },
  430. "active_level": {
  431. "type": "string",
  432. "minLength": 1
  433. },
  434. "polarity": {
  435. "type": "string",
  436. "minLength": 1
  437. },
  438. "evidence_grades": {
  439. "$ref": "#/$defs/ioEvidenceGrades"
  440. },
  441. "external_components": {
  442. "type": "array",
  443. "items": {
  444. "type": "string",
  445. "minLength": 1
  446. }
  447. },
  448. "fpga": {
  449. "$ref": "#/$defs/fpgaAnnotation"
  450. },
  451. "mcu": {
  452. "$ref": "#/$defs/mcuAnnotation"
  453. },
  454. "programming": {
  455. "$ref": "#/$defs/programmingAnnotation"
  456. }
  457. }
  458. },
  459. "fpgaAnnotation": {
  460. "type": "object",
  461. "additionalProperties": false,
  462. "required": [
  463. "ball",
  464. "board_signal",
  465. "io_standard",
  466. "capabilities",
  467. "evidence_tier",
  468. "sources"
  469. ],
  470. "properties": {
  471. "ball": {
  472. "type": "string",
  473. "minLength": 1
  474. },
  475. "board_signal": {
  476. "type": "string",
  477. "minLength": 1
  478. },
  479. "io_standard": {
  480. "type": "string",
  481. "minLength": 1
  482. },
  483. "capabilities": {
  484. "type": "array",
  485. "minItems": 1,
  486. "items": {
  487. "type": "string",
  488. "minLength": 1
  489. }
  490. },
  491. "evidence_tier": {
  492. "$ref": "#/$defs/evidenceTier"
  493. },
  494. "sources": {
  495. "type": "array",
  496. "minItems": 1,
  497. "items": {
  498. "type": "string",
  499. "minLength": 1
  500. }
  501. }
  502. }
  503. },
  504. "mcuAnnotation": {
  505. "type": "object",
  506. "additionalProperties": false,
  507. "required": [
  508. "device",
  509. "family",
  510. "pin",
  511. "signal",
  512. "capabilities",
  513. "evidence_tier",
  514. "sources"
  515. ],
  516. "properties": {
  517. "device": {
  518. "type": "string",
  519. "minLength": 1
  520. },
  521. "family": {
  522. "type": "string",
  523. "minLength": 1
  524. },
  525. "pin": {
  526. "type": "string",
  527. "minLength": 1
  528. },
  529. "signal": {
  530. "type": "string",
  531. "minLength": 1
  532. },
  533. "capabilities": {
  534. "type": "array",
  535. "minItems": 1,
  536. "items": {
  537. "type": "string",
  538. "minLength": 1
  539. }
  540. },
  541. "evidence_tier": {
  542. "$ref": "#/$defs/evidenceTier"
  543. },
  544. "sources": {
  545. "type": "array",
  546. "minItems": 1,
  547. "items": {
  548. "type": "string",
  549. "minLength": 1
  550. }
  551. }
  552. }
  553. },
  554. "programmingAnnotation": {
  555. "type": "object",
  556. "additionalProperties": false,
  557. "required": [
  558. "evidence_tier",
  559. "sources"
  560. ],
  561. "properties": {
  562. "status": {
  563. "enum": [
  564. "verified_fpga",
  565. "verified_mcu",
  566. "board_only",
  567. "not_programmable",
  568. "unknown"
  569. ]
  570. },
  571. "conclusion": {
  572. "type": "string",
  573. "minLength": 1
  574. },
  575. "network_explanation": {
  576. "type": "string",
  577. "minLength": 1
  578. },
  579. "hdl_guidance": {
  580. "type": "string",
  581. "minLength": 1
  582. },
  583. "connection_guidance": {
  584. "type": "array",
  585. "minItems": 1,
  586. "items": {
  587. "type": "string",
  588. "minLength": 1
  589. }
  590. },
  591. "constraints": {
  592. "type": "array",
  593. "items": {
  594. "type": "string",
  595. "minLength": 1
  596. }
  597. },
  598. "risks": {
  599. "type": "array",
  600. "items": {
  601. "type": "string",
  602. "minLength": 1
  603. }
  604. },
  605. "evidence_tier": {
  606. "$ref": "#/$defs/evidenceTier"
  607. },
  608. "sources": {
  609. "type": "array",
  610. "minItems": 1,
  611. "items": {
  612. "type": "string",
  613. "minLength": 1
  614. }
  615. }
  616. }
  617. },
  618. "interface": {
  619. "type": "object",
  620. "additionalProperties": false,
  621. "required": [
  622. "id",
  623. "name",
  624. "touchpoint",
  625. "pins",
  626. "external_level",
  627. "evidence_tier",
  628. "sources"
  629. ],
  630. "properties": {
  631. "id": {
  632. "type": "string",
  633. "pattern": "^[a-z0-9-]+$"
  634. },
  635. "name": {
  636. "type": "string",
  637. "minLength": 1
  638. },
  639. "touchpoint": {
  640. "type": "string",
  641. "pattern": "^(CON|J|PL|TP)[0-9]+$"
  642. },
  643. "pins": {
  644. "type": "array",
  645. "minItems": 1,
  646. "items": {
  647. "type": "string"
  648. }
  649. },
  650. "external_level": {
  651. "type": "string",
  652. "minLength": 1
  653. },
  654. "evidence_tier": {
  655. "$ref": "#/$defs/evidenceTier"
  656. },
  657. "sources": {
  658. "type": "array",
  659. "minItems": 1,
  660. "items": {
  661. "type": "string",
  662. "minLength": 1
  663. }
  664. }
  665. }
  666. },
  667. "photoOverlay": {
  668. "type": "object",
  669. "additionalProperties": false,
  670. "required": [
  671. "path",
  672. "sha256",
  673. "control_points"
  674. ],
  675. "properties": {
  676. "path": {
  677. "type": "string",
  678. "minLength": 1
  679. },
  680. "sha256": {
  681. "type": "string",
  682. "pattern": "^[0-9a-f]{64}$"
  683. },
  684. "control_points": {
  685. "type": "array",
  686. "minItems": 3,
  687. "items": {
  688. "type": "object",
  689. "additionalProperties": false,
  690. "required": [
  691. "image",
  692. "board"
  693. ],
  694. "properties": {
  695. "image": {
  696. "$ref": "#/$defs/point"
  697. },
  698. "board": {
  699. "$ref": "#/$defs/point"
  700. }
  701. }
  702. }
  703. }
  704. }
  705. },
  706. "point": {
  707. "type": "object",
  708. "additionalProperties": false,
  709. "required": [
  710. "x",
  711. "y"
  712. ],
  713. "properties": {
  714. "x": {
  715. "type": "number"
  716. },
  717. "y": {
  718. "type": "number"
  719. }
  720. }
  721. }
  722. }
  723. }