uart_preflight_receipt.schema.json 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. {
  2. "$schema": "https://json-schema.org/draft/2020-12/schema",
  3. "$id": "uart_preflight_receipt.schema.json",
  4. "title": "UART preflight receipt",
  5. "type": "object",
  6. "required": ["schema", "status", "serial", "enumeration", "safety", "authority_boundary"],
  7. "properties": {
  8. "schema": { "const": "uart-preflight-receipt-v1" },
  9. "status": { "type": "string" },
  10. "serial": {
  11. "type": "object",
  12. "required": ["baud", "format", "allowlisted", "opened"],
  13. "properties": {
  14. "baud": { "const": 115200 },
  15. "format": { "const": "8N1" },
  16. "allowlisted": { "type": "boolean" },
  17. "opened": { "const": false },
  18. "allowlist": { "type": "array", "items": { "type": "string" } }
  19. },
  20. "additionalProperties": true
  21. },
  22. "enumeration": { "type": "object", "additionalProperties": true },
  23. "safety": { "$ref": "#/$defs/safety" },
  24. "authority_boundary": { "type": "string" }
  25. },
  26. "additionalProperties": true,
  27. "$defs": {
  28. "safety": {
  29. "type": "object",
  30. "required": ["flash_attempted", "real_ptc_fan_bmc_action_attempted", "driver_install_attempted"],
  31. "properties": {
  32. "flash_attempted": { "const": false },
  33. "real_ptc_fan_bmc_action_attempted": { "const": false },
  34. "driver_install_attempted": { "const": false }
  35. },
  36. "additionalProperties": true
  37. }
  38. }
  39. }