board_viewer_data.schema.json 27 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312
  1. {
  2. "$schema": "https://json-schema.org/draft/2020-12/schema",
  3. "$id": "https://local.invalid/schemas/board_viewer_data.schema.json",
  4. "title": "Generated board viewer data",
  5. "type": "object",
  6. "additionalProperties": false,
  7. "required": [
  8. "schema",
  9. "board",
  10. "counts",
  11. "touchpoints",
  12. "resistors",
  13. "evidence_conflicts",
  14. "interfaces",
  15. "photo_overlay",
  16. "value_coverage",
  17. "component_value_source_status",
  18. "resistor_links"
  19. ],
  20. "properties": {
  21. "schema": {
  22. "const": "board-viewer-data-v2"
  23. },
  24. "board": {
  25. "type": "object",
  26. "additionalProperties": false,
  27. "required": [
  28. "id",
  29. "name",
  30. "source_bounds",
  31. "view_box"
  32. ],
  33. "properties": {
  34. "id": {
  35. "type": "string",
  36. "minLength": 1
  37. },
  38. "name": {
  39. "type": "string",
  40. "minLength": 1
  41. },
  42. "source_bounds": {
  43. "$ref": "#/$defs/bounds"
  44. },
  45. "view_box": {
  46. "$ref": "#/$defs/bounds"
  47. }
  48. }
  49. },
  50. "counts": {
  51. "type": "object",
  52. "additionalProperties": false,
  53. "required": [
  54. "footprints",
  55. "touchpoints",
  56. "pads",
  57. "resistors",
  58. "resistor_pads",
  59. "resistor_electrical_pads",
  60. "connector_contacts",
  61. "connector_auxiliary_pads",
  62. "categories",
  63. "sides",
  64. "touchpoint_sides",
  65. "resistor_sides"
  66. ],
  67. "properties": {
  68. "footprints": {
  69. "type": "integer",
  70. "minimum": 0
  71. },
  72. "touchpoints": {
  73. "type": "integer",
  74. "minimum": 0
  75. },
  76. "pads": {
  77. "type": "integer",
  78. "minimum": 0,
  79. "description": "Touchpoint pin count (CON|J|PL|TP pads only). Not all PCB pads."
  80. },
  81. "resistors": {
  82. "type": "integer",
  83. "minimum": 0
  84. },
  85. "resistor_pads": {
  86. "type": "integer",
  87. "minimum": 0
  88. },
  89. "connector_contacts": {
  90. "type": "integer",
  91. "minimum": 0
  92. },
  93. "connector_auxiliary_pads": {
  94. "type": "integer",
  95. "minimum": 0
  96. },
  97. "categories": {
  98. "$ref": "#/$defs/countMap"
  99. },
  100. "sides": {
  101. "type": "object",
  102. "additionalProperties": false,
  103. "required": [
  104. "front",
  105. "back"
  106. ],
  107. "properties": {
  108. "front": {
  109. "type": "integer",
  110. "minimum": 0
  111. },
  112. "back": {
  113. "type": "integer",
  114. "minimum": 0
  115. }
  116. },
  117. "description": "Legacy alias of touchpoint_sides only; NOT whole-board or resistor sides."
  118. },
  119. "resistor_electrical_pads": {
  120. "type": "integer",
  121. "minimum": 0
  122. },
  123. "touchpoint_sides": {
  124. "type": "object",
  125. "additionalProperties": false,
  126. "required": [
  127. "front",
  128. "back"
  129. ],
  130. "properties": {
  131. "front": {
  132. "type": "integer",
  133. "minimum": 0
  134. },
  135. "back": {
  136. "type": "integer",
  137. "minimum": 0
  138. }
  139. },
  140. "description": "Front/back counts for touchpoints only."
  141. },
  142. "resistor_sides": {
  143. "type": "object",
  144. "additionalProperties": false,
  145. "required": [
  146. "front",
  147. "back"
  148. ],
  149. "properties": {
  150. "front": {
  151. "type": "integer",
  152. "minimum": 0
  153. },
  154. "back": {
  155. "type": "integer",
  156. "minimum": 0
  157. }
  158. },
  159. "description": "Front/back counts for discrete resistors only."
  160. }
  161. }
  162. },
  163. "touchpoints": {
  164. "type": "array",
  165. "items": {
  166. "$ref": "#/$defs/touchpoint"
  167. }
  168. },
  169. "resistors": {
  170. "type": "array",
  171. "items": {
  172. "$ref": "#/$defs/resistor"
  173. }
  174. },
  175. "interfaces": {
  176. "type": "array",
  177. "items": {
  178. "type": "object"
  179. }
  180. },
  181. "photo_overlay": {
  182. "oneOf": [
  183. {
  184. "type": "null"
  185. },
  186. {
  187. "type": "object",
  188. "additionalProperties": false,
  189. "required": [
  190. "asset",
  191. "sha256",
  192. "matrix",
  193. "control_point_count"
  194. ],
  195. "properties": {
  196. "asset": {
  197. "type": "string",
  198. "pattern": "^board-photo\\.(png|jpg|jpeg|webp)$"
  199. },
  200. "sha256": {
  201. "type": "string",
  202. "pattern": "^[0-9a-f]{64}$"
  203. },
  204. "matrix": {
  205. "type": "array",
  206. "minItems": 6,
  207. "maxItems": 6,
  208. "items": {
  209. "type": "number"
  210. }
  211. },
  212. "control_point_count": {
  213. "type": "integer",
  214. "minimum": 3
  215. }
  216. }
  217. }
  218. ]
  219. },
  220. "evidence_conflicts": {
  221. "type": "array",
  222. "items": {
  223. "$ref": "#/$defs/evidenceConflict"
  224. }
  225. },
  226. "value_coverage": {
  227. "type": "object",
  228. "additionalProperties": true,
  229. "required": [
  230. "resistors_total",
  231. "component_value_nonempty",
  232. "value_parsed",
  233. "value_missing_or_unparsed",
  234. "component_value_source_status"
  235. ],
  236. "properties": {
  237. "resistors_total": {
  238. "type": "integer",
  239. "minimum": 0
  240. },
  241. "component_value_nonempty": {
  242. "type": "integer",
  243. "minimum": 0
  244. },
  245. "value_parsed": {
  246. "type": "integer",
  247. "minimum": 0
  248. },
  249. "value_zero_ohm_fitted_or_unknown": {
  250. "type": "integer",
  251. "minimum": 0
  252. },
  253. "value_zero_ohm_not_fitted": {
  254. "type": "integer",
  255. "minimum": 0
  256. },
  257. "assembly_not_fitted": {
  258. "type": "integer",
  259. "minimum": 0
  260. },
  261. "value_missing_or_unparsed": {
  262. "type": "integer",
  263. "minimum": 0
  264. },
  265. "component_value_source_status": {
  266. "type": "string"
  267. },
  268. "example_available_tokens": {
  269. "type": "array",
  270. "items": {
  271. "type": "string"
  272. }
  273. },
  274. "note": {
  275. "type": "string"
  276. }
  277. }
  278. },
  279. "component_value_source_status": {
  280. "type": "string",
  281. "minLength": 1
  282. },
  283. "resistor_links": {
  284. "type": "array",
  285. "items": {
  286. "$ref": "#/$defs/structuredResistorLink"
  287. }
  288. }
  289. },
  290. "$defs": {
  291. "countMap": {
  292. "type": "object",
  293. "additionalProperties": false,
  294. "required": [
  295. "CON",
  296. "J",
  297. "PL",
  298. "TP",
  299. "R"
  300. ],
  301. "properties": {
  302. "CON": {
  303. "type": "integer",
  304. "minimum": 0
  305. },
  306. "J": {
  307. "type": "integer",
  308. "minimum": 0
  309. },
  310. "PL": {
  311. "type": "integer",
  312. "minimum": 0
  313. },
  314. "TP": {
  315. "type": "integer",
  316. "minimum": 0
  317. },
  318. "R": {
  319. "type": "integer",
  320. "minimum": 0
  321. }
  322. }
  323. },
  324. "point": {
  325. "type": "object",
  326. "additionalProperties": false,
  327. "required": [
  328. "x",
  329. "y"
  330. ],
  331. "properties": {
  332. "x": {
  333. "type": "number"
  334. },
  335. "y": {
  336. "type": "number"
  337. }
  338. }
  339. },
  340. "bounds": {
  341. "type": "object",
  342. "additionalProperties": false,
  343. "required": [
  344. "x",
  345. "y",
  346. "width",
  347. "height"
  348. ],
  349. "properties": {
  350. "x": {
  351. "type": "number"
  352. },
  353. "y": {
  354. "type": "number"
  355. },
  356. "width": {
  357. "type": "number",
  358. "minimum": 0
  359. },
  360. "height": {
  361. "type": "number",
  362. "minimum": 0
  363. }
  364. }
  365. },
  366. "evidenceTier": {
  367. "enum": [
  368. "board_database",
  369. "cross_verified",
  370. "name_inferred",
  371. "unknown"
  372. ]
  373. },
  374. "ioEvidenceGrades": {
  375. "type": "object",
  376. "additionalProperties": false,
  377. "required": [
  378. "physical_path",
  379. "product_polarity",
  380. "hardware_measurement"
  381. ],
  382. "properties": {
  383. "physical_path": {
  384. "enum": [
  385. "confirmed_by_brd",
  386. "inferred",
  387. "blocked",
  388. "not_applicable",
  389. "unknown"
  390. ]
  391. },
  392. "product_polarity": {
  393. "enum": [
  394. "confirmed_by_electrical_staff",
  395. "inferred",
  396. "blocked",
  397. "not_applicable",
  398. "unknown"
  399. ]
  400. },
  401. "hardware_measurement": {
  402. "enum": [
  403. "not_run",
  404. "pass",
  405. "fail",
  406. "blocked",
  407. "not_applicable",
  408. "unknown"
  409. ]
  410. }
  411. }
  412. },
  413. "fpga": {
  414. "type": "object",
  415. "additionalProperties": false,
  416. "required": [
  417. "ball",
  418. "board_signal",
  419. "io_standard",
  420. "capabilities",
  421. "evidence_tier",
  422. "sources"
  423. ],
  424. "properties": {
  425. "ball": {
  426. "type": "string"
  427. },
  428. "board_signal": {
  429. "type": "string"
  430. },
  431. "io_standard": {
  432. "type": "string"
  433. },
  434. "capabilities": {
  435. "type": "array",
  436. "items": {
  437. "type": "string"
  438. }
  439. },
  440. "evidence_tier": {
  441. "$ref": "#/$defs/evidenceTier"
  442. },
  443. "sources": {
  444. "type": "array",
  445. "items": {
  446. "type": "string"
  447. }
  448. }
  449. }
  450. },
  451. "mcu": {
  452. "type": "object",
  453. "additionalProperties": false,
  454. "required": [
  455. "device",
  456. "family",
  457. "pin",
  458. "signal",
  459. "capabilities",
  460. "evidence_tier",
  461. "sources"
  462. ],
  463. "properties": {
  464. "device": {
  465. "type": "string",
  466. "minLength": 1
  467. },
  468. "family": {
  469. "type": "string",
  470. "minLength": 1
  471. },
  472. "pin": {
  473. "type": "string",
  474. "minLength": 1
  475. },
  476. "signal": {
  477. "type": "string",
  478. "minLength": 1
  479. },
  480. "capabilities": {
  481. "type": "array",
  482. "items": {
  483. "type": "string",
  484. "minLength": 1
  485. }
  486. },
  487. "evidence_tier": {
  488. "$ref": "#/$defs/evidenceTier"
  489. },
  490. "sources": {
  491. "type": "array",
  492. "items": {
  493. "type": "string",
  494. "minLength": 1
  495. }
  496. }
  497. }
  498. },
  499. "pin": {
  500. "type": "object",
  501. "additionalProperties": false,
  502. "required": [
  503. "id",
  504. "number",
  505. "pad_role",
  506. "row",
  507. "column",
  508. "board_order",
  509. "mechanical",
  510. "electrical",
  511. "net",
  512. "position",
  513. "view_position",
  514. "size",
  515. "rotation",
  516. "shape",
  517. "layers",
  518. "direction",
  519. "external_level",
  520. "function_category",
  521. "reserved",
  522. "fixed_load_conflict",
  523. "board_pull",
  524. "adc_pulltype",
  525. "active_level",
  526. "polarity",
  527. "external_components",
  528. "summary",
  529. "path",
  530. "evidence_tier",
  531. "evidence_sources",
  532. "fpga",
  533. "mcu",
  534. "programming",
  535. "recommendation"
  536. ],
  537. "properties": {
  538. "id": {
  539. "type": "string",
  540. "minLength": 1
  541. },
  542. "number": {
  543. "type": "string"
  544. },
  545. "pad_role": {
  546. "enum": [
  547. "contact",
  548. "shield",
  549. "mechanical",
  550. "unknown"
  551. ]
  552. },
  553. "row": {
  554. "type": [
  555. "integer",
  556. "null"
  557. ],
  558. "minimum": 1
  559. },
  560. "column": {
  561. "type": [
  562. "integer",
  563. "null"
  564. ],
  565. "minimum": 1
  566. },
  567. "board_order": {
  568. "type": [
  569. "integer",
  570. "null"
  571. ],
  572. "minimum": 1
  573. },
  574. "mechanical": {
  575. "type": "boolean"
  576. },
  577. "electrical": {
  578. "type": "boolean"
  579. },
  580. "net": {
  581. "type": [
  582. "string",
  583. "null"
  584. ]
  585. },
  586. "position": {
  587. "$ref": "#/$defs/point"
  588. },
  589. "view_position": {
  590. "$ref": "#/$defs/point"
  591. },
  592. "size": {
  593. "type": "object",
  594. "additionalProperties": false,
  595. "required": [
  596. "width",
  597. "height",
  598. "drill_width",
  599. "drill_height"
  600. ],
  601. "properties": {
  602. "width": {
  603. "type": "number",
  604. "minimum": 0
  605. },
  606. "height": {
  607. "type": "number",
  608. "minimum": 0
  609. },
  610. "drill_width": {
  611. "type": "number",
  612. "minimum": 0
  613. },
  614. "drill_height": {
  615. "type": "number",
  616. "minimum": 0
  617. }
  618. }
  619. },
  620. "rotation": {
  621. "type": "number"
  622. },
  623. "shape": {
  624. "type": "string"
  625. },
  626. "layers": {
  627. "type": "array",
  628. "items": {
  629. "type": "string"
  630. }
  631. },
  632. "direction": {
  633. "enum": [
  634. "input",
  635. "output",
  636. "bidirectional",
  637. "passive",
  638. "unknown"
  639. ]
  640. },
  641. "external_level": {
  642. "type": "string"
  643. },
  644. "function_category": {
  645. "type": "string"
  646. },
  647. "reserved": {
  648. "type": "boolean"
  649. },
  650. "fixed_load_conflict": {
  651. "type": "boolean"
  652. },
  653. "board_pull": {
  654. "type": [
  655. "string",
  656. "null"
  657. ]
  658. },
  659. "adc_pulltype": {
  660. "type": [
  661. "string",
  662. "null"
  663. ],
  664. "pattern": "^[A-Z][A-Z0-9_]*$"
  665. },
  666. "active_level": {
  667. "type": "string",
  668. "minLength": 1
  669. },
  670. "polarity": {
  671. "type": "string",
  672. "minLength": 1
  673. },
  674. "external_components": {
  675. "type": "array",
  676. "items": {
  677. "type": "string",
  678. "minLength": 1
  679. }
  680. },
  681. "summary": {
  682. "type": "string"
  683. },
  684. "path": {
  685. "type": "array",
  686. "items": {
  687. "type": "string"
  688. }
  689. },
  690. "evidence_tier": {
  691. "$ref": "#/$defs/evidenceTier"
  692. },
  693. "evidence_sources": {
  694. "type": "array",
  695. "items": {
  696. "type": "string"
  697. }
  698. },
  699. "evidence_grades": {
  700. "$ref": "#/$defs/ioEvidenceGrades"
  701. },
  702. "fpga": {
  703. "oneOf": [
  704. {
  705. "type": "null"
  706. },
  707. {
  708. "$ref": "#/$defs/fpga"
  709. }
  710. ]
  711. },
  712. "mcu": {
  713. "oneOf": [
  714. {
  715. "type": "null"
  716. },
  717. {
  718. "$ref": "#/$defs/mcu"
  719. }
  720. ]
  721. },
  722. "programming": {
  723. "$ref": "#/$defs/programming"
  724. },
  725. "recommendation": {
  726. "type": "object",
  727. "additionalProperties": false,
  728. "required": [
  729. "eligible",
  730. "reasons"
  731. ],
  732. "properties": {
  733. "eligible": {
  734. "type": "boolean"
  735. },
  736. "reasons": {
  737. "type": "array",
  738. "items": {
  739. "type": "string"
  740. }
  741. }
  742. }
  743. },
  744. "related_resistors": {
  745. "type": "array",
  746. "items": {
  747. "$ref": "#/$defs/relatedResistor"
  748. }
  749. }
  750. }
  751. },
  752. "programming": {
  753. "type": "object",
  754. "additionalProperties": false,
  755. "required": [
  756. "status",
  757. "conclusion",
  758. "network_explanation",
  759. "hdl_guidance",
  760. "connection_guidance",
  761. "constraints",
  762. "risks",
  763. "evidence_tier",
  764. "sources"
  765. ],
  766. "properties": {
  767. "status": {
  768. "enum": [
  769. "verified_fpga",
  770. "verified_mcu",
  771. "board_only",
  772. "not_programmable",
  773. "unknown"
  774. ]
  775. },
  776. "conclusion": {
  777. "type": "string",
  778. "minLength": 1
  779. },
  780. "network_explanation": {
  781. "type": "string",
  782. "minLength": 1
  783. },
  784. "hdl_guidance": {
  785. "type": "string",
  786. "minLength": 1
  787. },
  788. "connection_guidance": {
  789. "type": "array",
  790. "items": {
  791. "type": "string",
  792. "minLength": 1
  793. }
  794. },
  795. "constraints": {
  796. "type": "array",
  797. "items": {
  798. "type": "string",
  799. "minLength": 1
  800. }
  801. },
  802. "risks": {
  803. "type": "array",
  804. "items": {
  805. "type": "string",
  806. "minLength": 1
  807. }
  808. },
  809. "evidence_tier": {
  810. "$ref": "#/$defs/evidenceTier"
  811. },
  812. "sources": {
  813. "type": "array",
  814. "items": {
  815. "type": "string",
  816. "minLength": 1
  817. }
  818. }
  819. }
  820. },
  821. "connector": {
  822. "type": "object",
  823. "additionalProperties": false,
  824. "required": [
  825. "profile",
  826. "review_status",
  827. "view",
  828. "contact_count",
  829. "auxiliary_pad_count",
  830. "rows",
  831. "columns",
  832. "contact_grid",
  833. "contact_order",
  834. "sources"
  835. ],
  836. "properties": {
  837. "profile": {
  838. "type": [
  839. "string",
  840. "null"
  841. ]
  842. },
  843. "review_status": {
  844. "$ref": "#/$defs/evidenceTier"
  845. },
  846. "view": {
  847. "const": "board_front"
  848. },
  849. "contact_count": {
  850. "type": "integer",
  851. "minimum": 0
  852. },
  853. "auxiliary_pad_count": {
  854. "type": "integer",
  855. "minimum": 0
  856. },
  857. "rows": {
  858. "type": "integer",
  859. "minimum": 0
  860. },
  861. "columns": {
  862. "type": "integer",
  863. "minimum": 0
  864. },
  865. "contact_grid": {
  866. "type": "array",
  867. "items": {
  868. "type": "array",
  869. "items": {
  870. "type": "string",
  871. "minLength": 1
  872. }
  873. }
  874. },
  875. "contact_order": {
  876. "type": "array",
  877. "items": {
  878. "type": "string",
  879. "minLength": 1
  880. }
  881. },
  882. "sources": {
  883. "type": "array",
  884. "items": {
  885. "type": "string",
  886. "minLength": 1
  887. }
  888. }
  889. }
  890. },
  891. "touchpoint": {
  892. "type": "object",
  893. "additionalProperties": false,
  894. "required": [
  895. "reference",
  896. "category",
  897. "component_value",
  898. "position",
  899. "view_position",
  900. "rotation",
  901. "bounds",
  902. "view_bounds",
  903. "side",
  904. "summary",
  905. "connector",
  906. "pins"
  907. ],
  908. "properties": {
  909. "reference": {
  910. "type": "string",
  911. "pattern": "^(CON|J|PL|TP)[0-9]+$"
  912. },
  913. "category": {
  914. "enum": [
  915. "CON",
  916. "J",
  917. "PL",
  918. "TP"
  919. ]
  920. },
  921. "component_value": {
  922. "type": "string"
  923. },
  924. "position": {
  925. "$ref": "#/$defs/point"
  926. },
  927. "view_position": {
  928. "$ref": "#/$defs/point"
  929. },
  930. "rotation": {
  931. "type": "number"
  932. },
  933. "bounds": {
  934. "$ref": "#/$defs/bounds"
  935. },
  936. "view_bounds": {
  937. "$ref": "#/$defs/bounds"
  938. },
  939. "side": {
  940. "enum": [
  941. "front",
  942. "back"
  943. ]
  944. },
  945. "summary": {
  946. "type": "string"
  947. },
  948. "connector": {
  949. "oneOf": [
  950. {
  951. "type": "null"
  952. },
  953. {
  954. "$ref": "#/$defs/connector"
  955. }
  956. ]
  957. },
  958. "pins": {
  959. "type": "array",
  960. "items": {
  961. "$ref": "#/$defs/pin"
  962. }
  963. }
  964. }
  965. },
  966. "resistorPad": {
  967. "type": "object",
  968. "additionalProperties": false,
  969. "required": [
  970. "id",
  971. "number",
  972. "net",
  973. "position",
  974. "view_position",
  975. "bounds",
  976. "view_bounds",
  977. "pad_role",
  978. "size",
  979. "rotation",
  980. "shape",
  981. "layers"
  982. ],
  983. "properties": {
  984. "number": {
  985. "type": "string"
  986. },
  987. "net": {
  988. "type": [
  989. "string",
  990. "null"
  991. ]
  992. },
  993. "position": {
  994. "$ref": "#/$defs/point"
  995. },
  996. "view_position": {
  997. "$ref": "#/$defs/point"
  998. },
  999. "pad_role": {
  1000. "enum": [
  1001. "electrical",
  1002. "mechanical"
  1003. ]
  1004. },
  1005. "size": {
  1006. "type": "object",
  1007. "additionalProperties": false,
  1008. "required": [
  1009. "width",
  1010. "height",
  1011. "drill_width",
  1012. "drill_height"
  1013. ],
  1014. "properties": {
  1015. "width": {
  1016. "type": "number",
  1017. "minimum": 0
  1018. },
  1019. "height": {
  1020. "type": "number",
  1021. "minimum": 0
  1022. },
  1023. "drill_width": {
  1024. "type": "number",
  1025. "minimum": 0
  1026. },
  1027. "drill_height": {
  1028. "type": "number",
  1029. "minimum": 0
  1030. }
  1031. }
  1032. },
  1033. "id": {
  1034. "type": "string",
  1035. "minLength": 1
  1036. },
  1037. "bounds": {
  1038. "$ref": "#/$defs/bounds"
  1039. },
  1040. "view_bounds": {
  1041. "$ref": "#/$defs/bounds"
  1042. },
  1043. "rotation": {
  1044. "type": "number"
  1045. },
  1046. "shape": {
  1047. "type": "string",
  1048. "minLength": 1
  1049. },
  1050. "layers": {
  1051. "type": "array",
  1052. "items": {
  1053. "type": "string",
  1054. "minLength": 1
  1055. }
  1056. }
  1057. }
  1058. },
  1059. "resistor": {
  1060. "type": "object",
  1061. "additionalProperties": false,
  1062. "required": [
  1063. "reference",
  1064. "category",
  1065. "component_value",
  1066. "value_ohms",
  1067. "value_tokens",
  1068. "position",
  1069. "view_position",
  1070. "rotation",
  1071. "bounds",
  1072. "view_bounds",
  1073. "side",
  1074. "summary",
  1075. "pads",
  1076. "value_parse_status",
  1077. "assembly_status"
  1078. ],
  1079. "properties": {
  1080. "reference": {
  1081. "type": "string",
  1082. "pattern": "^R[0-9]+$"
  1083. },
  1084. "category": {
  1085. "const": "R"
  1086. },
  1087. "component_value": {
  1088. "type": "string"
  1089. },
  1090. "value_ohms": {
  1091. "type": [
  1092. "number",
  1093. "null"
  1094. ],
  1095. "minimum": 0
  1096. },
  1097. "value_tokens": {
  1098. "type": "array",
  1099. "items": {
  1100. "type": "string",
  1101. "minLength": 1
  1102. }
  1103. },
  1104. "position": {
  1105. "$ref": "#/$defs/point"
  1106. },
  1107. "view_position": {
  1108. "$ref": "#/$defs/point"
  1109. },
  1110. "rotation": {
  1111. "type": "number"
  1112. },
  1113. "bounds": {
  1114. "$ref": "#/$defs/bounds"
  1115. },
  1116. "view_bounds": {
  1117. "$ref": "#/$defs/bounds"
  1118. },
  1119. "side": {
  1120. "enum": [
  1121. "front",
  1122. "back"
  1123. ]
  1124. },
  1125. "summary": {
  1126. "type": "string"
  1127. },
  1128. "pads": {
  1129. "type": "array",
  1130. "minItems": 1,
  1131. "items": {
  1132. "$ref": "#/$defs/resistorPad"
  1133. }
  1134. },
  1135. "value_parse_status": {
  1136. "enum": [
  1137. "parsed",
  1138. "unparsed",
  1139. "ambiguous"
  1140. ]
  1141. },
  1142. "assembly_status": {
  1143. "enum": [
  1144. "unknown",
  1145. "fitted",
  1146. "not_fitted"
  1147. ]
  1148. }
  1149. }
  1150. },
  1151. "relatedResistor": {
  1152. "type": "object",
  1153. "additionalProperties": false,
  1154. "required": [
  1155. "source_pin_id",
  1156. "source_field",
  1157. "resistor_reference",
  1158. "pad_number",
  1159. "raw_context",
  1160. "status",
  1161. "pcb_net",
  1162. "claimed_net"
  1163. ],
  1164. "properties": {
  1165. "source_pin_id": {
  1166. "type": "string"
  1167. },
  1168. "source_field": {
  1169. "enum": [
  1170. "path",
  1171. "external_components",
  1172. "resistor_links"
  1173. ]
  1174. },
  1175. "resistor_reference": {
  1176. "type": "string",
  1177. "pattern": "^R[0-9]+$"
  1178. },
  1179. "pad_number": {
  1180. "type": [
  1181. "string",
  1182. "null"
  1183. ]
  1184. },
  1185. "raw_context": {
  1186. "type": "string"
  1187. },
  1188. "status": {
  1189. "enum": [
  1190. "resolved",
  1191. "missing_reference",
  1192. "missing_pad",
  1193. "net_conflict"
  1194. ]
  1195. },
  1196. "pcb_net": {
  1197. "type": [
  1198. "string",
  1199. "null"
  1200. ]
  1201. },
  1202. "claimed_net": {
  1203. "type": [
  1204. "string",
  1205. "null"
  1206. ]
  1207. }
  1208. }
  1209. },
  1210. "evidenceConflict": {
  1211. "type": "object",
  1212. "additionalProperties": true,
  1213. "required": [
  1214. "id",
  1215. "subject_reference",
  1216. "status",
  1217. "kind",
  1218. "primary_source"
  1219. ],
  1220. "properties": {
  1221. "id": {
  1222. "type": "string",
  1223. "minLength": 1
  1224. },
  1225. "subject_reference": {
  1226. "type": "string"
  1227. },
  1228. "status": {
  1229. "enum": [
  1230. "unresolved",
  1231. "resolved",
  1232. "info"
  1233. ]
  1234. },
  1235. "kind": {
  1236. "type": "string",
  1237. "minLength": 1
  1238. },
  1239. "summary": {
  1240. "type": "string"
  1241. },
  1242. "primary_source": {
  1243. "type": "string",
  1244. "minLength": 1
  1245. },
  1246. "claims": {
  1247. "type": "array"
  1248. },
  1249. "subject_in_pcb_index": {
  1250. "type": "boolean"
  1251. },
  1252. "pcb_pads": {
  1253. "type": "array"
  1254. }
  1255. }
  1256. },
  1257. "structuredResistorLink": {
  1258. "type": "object",
  1259. "additionalProperties": false,
  1260. "required": [
  1261. "source_pin_id",
  1262. "resistor_reference",
  1263. "pad_number",
  1264. "claimed_net",
  1265. "pcb_net",
  1266. "status",
  1267. "evidence_source"
  1268. ],
  1269. "properties": {
  1270. "source_pin_id": {
  1271. "type": "string"
  1272. },
  1273. "resistor_reference": {
  1274. "type": "string",
  1275. "pattern": "^R[0-9]+$"
  1276. },
  1277. "pad_number": {
  1278. "type": [
  1279. "string",
  1280. "null"
  1281. ]
  1282. },
  1283. "claimed_net": {
  1284. "type": [
  1285. "string",
  1286. "null"
  1287. ]
  1288. },
  1289. "pcb_net": {
  1290. "type": [
  1291. "string",
  1292. "null"
  1293. ]
  1294. },
  1295. "status": {
  1296. "enum": [
  1297. "resolved",
  1298. "missing_reference",
  1299. "missing_pad",
  1300. "net_conflict"
  1301. ]
  1302. },
  1303. "evidence_source": {
  1304. "type": "string"
  1305. },
  1306. "note": {
  1307. "type": "string"
  1308. }
  1309. }
  1310. }
  1311. }
  1312. }