board_viewer_build_info.schema.json 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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": ["schema", "generated_at", "generator_version", "toolchain", "sources", "assets", "verification", "counts"],
  8. "properties": {
  9. "schema": {"const": "board-viewer-build-info-v1"},
  10. "generated_at": {"type": "string", "format": "date-time"},
  11. "generator_version": {"type": "string", "minLength": 1},
  12. "toolchain": {
  13. "type": "object",
  14. "additionalProperties": false,
  15. "required": ["python", "kicad"],
  16. "properties": {
  17. "python": {"type": "string", "minLength": 1},
  18. "kicad": {"type": "string", "minLength": 1}
  19. }
  20. },
  21. "sources": {
  22. "type": "object",
  23. "minProperties": 3,
  24. "additionalProperties": {"$ref": "#/$defs/file"}
  25. },
  26. "assets": {
  27. "type": "object",
  28. "minProperties": 1,
  29. "propertyNames": {"pattern": "^[^/\\\\]+$"},
  30. "additionalProperties": {"$ref": "#/$defs/fileDigest"}
  31. },
  32. "verification": {
  33. "type": "object",
  34. "additionalProperties": false,
  35. "required": ["ipcd356"],
  36. "properties": {
  37. "ipcd356": {
  38. "type": "object",
  39. "additionalProperties": false,
  40. "required": ["numbered_pads", "matched_pads", "record_types", "tolerance_mm"],
  41. "properties": {
  42. "numbered_pads": {"type": "integer", "minimum": 0},
  43. "matched_pads": {"type": "integer", "minimum": 0},
  44. "record_types": {
  45. "type": "object",
  46. "additionalProperties": false,
  47. "required": ["317", "327"],
  48. "properties": {
  49. "317": {"type": "integer", "minimum": 0},
  50. "327": {"type": "integer", "minimum": 0}
  51. }
  52. },
  53. "tolerance_mm": {"type": "number", "exclusiveMinimum": 0}
  54. }
  55. }
  56. }
  57. },
  58. "counts": {
  59. "type": "object",
  60. "additionalProperties": false,
  61. "required": ["footprints", "touchpoints", "pads"],
  62. "properties": {
  63. "footprints": {"type": "integer", "minimum": 0},
  64. "touchpoints": {"type": "integer", "minimum": 0},
  65. "pads": {"type": "integer", "minimum": 0}
  66. }
  67. }
  68. },
  69. "$defs": {
  70. "sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
  71. "file": {
  72. "type": "object",
  73. "additionalProperties": false,
  74. "required": ["path", "sha256"],
  75. "properties": {
  76. "path": {"type": "string", "minLength": 1},
  77. "sha256": {"$ref": "#/$defs/sha256"}
  78. }
  79. },
  80. "fileDigest": {
  81. "type": "object",
  82. "additionalProperties": false,
  83. "required": ["sha256", "bytes"],
  84. "properties": {
  85. "sha256": {"$ref": "#/$defs/sha256"},
  86. "bytes": {"type": "integer", "minimum": 0}
  87. }
  88. }
  89. }
  90. }