uart_loopback_receipt.schema.json 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. {
  2. "$schema": "https://json-schema.org/draft/2020-12/schema",
  3. "$id": "uart_loopback_receipt.schema.json",
  4. "title": "UART loopback receipt",
  5. "type": "object",
  6. "required": ["schema", "status", "counterparty", "serial", "transcript", "safety"],
  7. "properties": {
  8. "schema": { "const": "uart-loopback-receipt-v1" },
  9. "status": { "type": "string" },
  10. "counterparty": { "enum": ["pc_emulator", "real_bmc"] },
  11. "serial": { "$ref": "#/$defs/serial" },
  12. "transcript": { "$ref": "#/$defs/artifact" },
  13. "safety": { "$ref": "#/$defs/safety" }
  14. },
  15. "additionalProperties": true,
  16. "$defs": {
  17. "serial": {
  18. "type": "object",
  19. "required": ["port", "baud", "format", "allowlisted"],
  20. "properties": {
  21. "port": { "type": "string" },
  22. "baud": { "const": 115200 },
  23. "format": { "const": "8N1" },
  24. "allowlisted": { "type": "boolean" },
  25. "dtr": { "type": "boolean" },
  26. "rts": { "type": "boolean" }
  27. },
  28. "additionalProperties": true
  29. },
  30. "artifact": {
  31. "type": "object",
  32. "required": ["path"],
  33. "properties": {
  34. "path": { "type": "string" },
  35. "sha256": { "type": "string", "pattern": "^[0-9a-fA-F]{64}$" }
  36. },
  37. "additionalProperties": true
  38. },
  39. "safety": {
  40. "type": "object",
  41. "required": ["flash_attempted", "real_ptc_fan_bmc_action_attempted", "driver_install_attempted"],
  42. "properties": {
  43. "flash_attempted": { "const": false },
  44. "real_ptc_fan_bmc_action_attempted": { "const": false },
  45. "driver_install_attempted": { "const": false }
  46. },
  47. "additionalProperties": true
  48. }
  49. }
  50. }