1{ 2 "$schema": "https://json-schema.org/draft/2020-12/schema", 3 "$id": "Handler", 4 "title": "Post Code Handler configuration schema", 5 "description": "Schema to test the post code handler configuration", 6 "type": "array", 7 "items": { 8 "type": "object", 9 "required": ["name", "description", "primary"], 10 "additionalProperties": false, 11 "properties": { 12 "name": { 13 "description": "Human readable name of the post-code", 14 "type": "string" 15 }, 16 "description": { 17 "description": "Human readable short description of the post-code", 18 "type": "string" 19 }, 20 "primary": { 21 "description": "Primary post code represented as a hex string", 22 "type": "string", 23 "pattern": "^0x([A-Fa-f0-9]{2}){1,}$" 24 }, 25 "secondary": { 26 "description": "[Optional] Secondary post code represented as a hex string. If absent from configuration, all post codes matching the primary will be handled using this config", 27 "type": "string", 28 "pattern": "^0x([A-Fa-f0-9]{2}){1,}$" 29 }, 30 "event": { 31 "description": "If provided describes the structured log to create upon receiving the post-code", 32 "type": "object", 33 "additionalProperties": false, 34 "required": ["name", "arguments"], 35 "properties": { 36 "name": { 37 "description": "DBus ID/Name of the event to create. Example: xyz.openbmc_project.State.SMC.SMCFailed", 38 "type": "string" 39 }, 40 "arguments": { 41 "description": "Arguments for the event", 42 "type": "object" 43 } 44 } 45 }, 46 "targets": { 47 "description": "List of targets to be started upon receiving a post-code", 48 "type": "array", 49 "items": { 50 "type": "string" 51 } 52 } 53 } 54 } 55} 56