board_viewer_build_info.schema.json 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. {
  2. "$schema": "https://json-schema.org/draft/2020-12/schema",
  3. "$id": "https://local.invalid/schemas/board_viewer_build_info.schema.json",
  4. "title": "Board viewer generated asset manifest",
  5. "type": "object",
  6. "additionalProperties": false,
  7. "required": [
  8. "schema",
  9. "generated_at",
  10. "generator_version",
  11. "toolchain",
  12. "sources",
  13. "assets",
  14. "verification",
  15. "counts"
  16. ],
  17. "properties": {
  18. "schema": {
  19. "const": "board-viewer-build-info-v1"
  20. },
  21. "generated_at": {
  22. "type": "string",
  23. "format": "date-time"
  24. },
  25. "generator_version": {
  26. "type": "string",
  27. "minLength": 1
  28. },
  29. "toolchain": {
  30. "type": "object",
  31. "additionalProperties": false,
  32. "required": [
  33. "python",
  34. "kicad"
  35. ],
  36. "properties": {
  37. "python": {
  38. "type": "string",
  39. "minLength": 1
  40. },
  41. "kicad": {
  42. "type": "string",
  43. "minLength": 1
  44. }
  45. }
  46. },
  47. "sources": {
  48. "type": "object",
  49. "minProperties": 3,
  50. "additionalProperties": {
  51. "$ref": "#/$defs/file"
  52. }
  53. },
  54. "assets": {
  55. "type": "object",
  56. "minProperties": 1,
  57. "propertyNames": {
  58. "pattern": "^[^/\\\\]+$"
  59. },
  60. "additionalProperties": {
  61. "$ref": "#/$defs/fileDigest"
  62. }
  63. },
  64. "verification": {
  65. "type": "object",
  66. "additionalProperties": false,
  67. "required": [
  68. "ipcd356"
  69. ],
  70. "properties": {
  71. "ipcd356": {
  72. "type": "object",
  73. "additionalProperties": false,
  74. "required": [
  75. "numbered_pads",
  76. "matched_pads",
  77. "record_types",
  78. "tolerance_mm"
  79. ],
  80. "properties": {
  81. "numbered_pads": {
  82. "type": "integer",
  83. "minimum": 0
  84. },
  85. "matched_pads": {
  86. "type": "integer",
  87. "minimum": 0
  88. },
  89. "record_types": {
  90. "type": "object",
  91. "additionalProperties": false,
  92. "required": [
  93. "317",
  94. "327"
  95. ],
  96. "properties": {
  97. "317": {
  98. "type": "integer",
  99. "minimum": 0
  100. },
  101. "327": {
  102. "type": "integer",
  103. "minimum": 0
  104. }
  105. }
  106. },
  107. "tolerance_mm": {
  108. "type": "number",
  109. "exclusiveMinimum": 0
  110. }
  111. }
  112. },
  113. "side_views": {
  114. "type": "object",
  115. "additionalProperties": false,
  116. "required": [
  117. "front_layers",
  118. "back_layers",
  119. "back_mirror_axis",
  120. "back_svg_export_mirrored",
  121. "convention"
  122. ],
  123. "properties": {
  124. "front_layers": {
  125. "type": "array",
  126. "items": {
  127. "type": "string",
  128. "minLength": 1
  129. },
  130. "minItems": 1
  131. },
  132. "back_layers": {
  133. "type": "array",
  134. "items": {
  135. "type": "string",
  136. "minLength": 1
  137. },
  138. "minItems": 1
  139. },
  140. "back_mirror_axis": {
  141. "const": "y"
  142. },
  143. "back_svg_export_mirrored": {
  144. "type": "boolean"
  145. },
  146. "convention": {
  147. "type": "string",
  148. "minLength": 1
  149. }
  150. }
  151. }
  152. }
  153. },
  154. "counts": {
  155. "type": "object",
  156. "additionalProperties": false,
  157. "required": [
  158. "footprints",
  159. "touchpoints",
  160. "pads",
  161. "resistors",
  162. "resistor_pads"
  163. ],
  164. "properties": {
  165. "footprints": {
  166. "type": "integer",
  167. "minimum": 0
  168. },
  169. "touchpoints": {
  170. "type": "integer",
  171. "minimum": 0
  172. },
  173. "pads": {
  174. "type": "integer",
  175. "minimum": 0
  176. },
  177. "resistors": {
  178. "type": "integer",
  179. "minimum": 0
  180. },
  181. "resistor_pads": {
  182. "type": "integer",
  183. "minimum": 0
  184. },
  185. "resistor_electrical_pads": {
  186. "type": "integer",
  187. "minimum": 0
  188. }
  189. }
  190. }
  191. },
  192. "$defs": {
  193. "sha256": {
  194. "type": "string",
  195. "pattern": "^[0-9a-f]{64}$"
  196. },
  197. "file": {
  198. "type": "object",
  199. "additionalProperties": false,
  200. "required": [
  201. "path",
  202. "sha256"
  203. ],
  204. "properties": {
  205. "path": {
  206. "type": "string",
  207. "minLength": 1
  208. },
  209. "sha256": {
  210. "$ref": "#/$defs/sha256"
  211. }
  212. }
  213. },
  214. "fileDigest": {
  215. "type": "object",
  216. "additionalProperties": false,
  217. "required": [
  218. "sha256",
  219. "bytes"
  220. ],
  221. "properties": {
  222. "sha256": {
  223. "$ref": "#/$defs/sha256"
  224. },
  225. "bytes": {
  226. "type": "integer",
  227. "minimum": 0
  228. }
  229. }
  230. }
  231. }
  232. }