Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 1 | { |
| 2 | "$schema": "http://json-schema.org/schema#", |
| 3 | "title": "JSON schema for the phosphor-regulators config file", |
| 4 | "$id": "https://github.com/openbmc/phosphor-power/tree/master/phosphor-regulators/schema/config_schema.json", |
| 5 | "description": "This schema describes the JSON format for the phosphor-regulators configuration file.", |
| 6 | "type": "object", |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 7 | "properties": |
| 8 | { |
| 9 | "comments": |
| 10 | { |
| 11 | "$ref": "#/definitions/comments" |
| 12 | }, |
| 13 | "rules": |
| 14 | { |
| 15 | "$ref": "#/definitions/rules" |
| 16 | }, |
| 17 | "chassis": |
| 18 | { |
| 19 | "$ref": "#/definitions/chassis" |
| 20 | } |
| 21 | }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 22 | "required": ["chassis"], |
| 23 | "additionalProperties": false, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 24 | "definitions": |
| 25 | { |
| 26 | "rules": |
| 27 | { |
| 28 | "type": "array", |
| 29 | "items": |
| 30 | { |
| 31 | "type": "object", |
| 32 | "properties": |
| 33 | { |
| 34 | "comments": {"$ref": "#/definitions/comments" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 35 | "id": {"$ref": "#/definitions/id" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 36 | "actions": {"$ref": "#/definitions/actions" } |
| 37 | }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 38 | "required": ["id", "actions"], |
| 39 | "additionalProperties": false |
| 40 | }, |
| 41 | "minItems": 1 |
| 42 | }, |
| 43 | |
| 44 | "comments": |
| 45 | { |
| 46 | "type": "array", |
| 47 | "items": |
| 48 | { |
| 49 | "type": "string" |
| 50 | }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 51 | "minItems": 1 |
| 52 | }, |
| 53 | |
| 54 | "id": |
| 55 | { |
| 56 | "type": "string", |
| 57 | "pattern": "^[A-Za-z0-9_]+$" |
| 58 | }, |
| 59 | |
| 60 | "action": |
| 61 | { |
| 62 | "type": "object", |
| 63 | "properties": |
| 64 | { |
| 65 | "comments": {"$ref": "#/definitions/comments" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 66 | "and": {"$ref": "#/definitions/actions" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 67 | "compare_presence": {"$ref": "#/definitions/compare_presence" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 68 | "compare_vpd": {"$ref": "#/definitions/compare_vpd" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 69 | "i2c_compare_bit": {"$ref": "#/definitions/i2c_bit" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 70 | "i2c_compare_byte": {"$ref": "#/definitions/i2c_byte" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 71 | "i2c_compare_bytes": {"$ref": "#/definitions/i2c_bytes" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 72 | "i2c_write_bit": {"$ref": "#/definitions/i2c_bit" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 73 | "i2c_write_byte": {"$ref": "#/definitions/i2c_byte" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 74 | "i2c_write_bytes": {"$ref": "#/definitions/i2c_bytes" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 75 | "if": {"$ref": "#/definitions/if" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 76 | "not": {"$ref": "#/definitions/action" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 77 | "or": {"$ref": "#/definitions/actions" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 78 | "pmbus_read_sensor": {"$ref": "#/definitions/pmbus_read_sensor" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 79 | "pmbus_write_vout_command": {"$ref": "#/definitions/pmbus_write_vout_command" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 80 | "run_rule": {"$ref": "#/definitions/id" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 81 | "set_device": {"$ref": "#/definitions/id" } |
| 82 | }, |
| 83 | "additionalProperties": false, |
| 84 | "oneOf": [ |
| 85 | {"required": ["and"]}, |
| 86 | {"required": ["compare_presence"]}, |
| 87 | {"required": ["compare_vpd"]}, |
| 88 | {"required": ["i2c_compare_bit"]}, |
| 89 | {"required": ["i2c_compare_byte"]}, |
| 90 | {"required": ["i2c_compare_bytes"]}, |
| 91 | {"required": ["i2c_write_bit"]}, |
| 92 | {"required": ["i2c_write_byte"]}, |
| 93 | {"required": ["i2c_write_bytes"]}, |
| 94 | {"required": ["if"]}, |
| 95 | {"required": ["not"]}, |
| 96 | {"required": ["or"]}, |
| 97 | {"required": ["pmbus_write_vout_command"]}, |
| 98 | {"required": ["pmbus_read_sensor"]}, |
| 99 | {"required": ["run_rule"]}, |
| 100 | {"required": ["set_device"]} |
| 101 | ] |
| 102 | }, |
| 103 | |
| 104 | "actions": |
| 105 | { |
| 106 | "type": "array", |
| 107 | "items": {"$ref": "#/definitions/action" }, |
| 108 | "minItems": 1 |
| 109 | }, |
| 110 | |
| 111 | "compare_presence": |
| 112 | { |
| 113 | "type": "object", |
| 114 | "properties": |
| 115 | { |
Shawn McCarney | ecbeeea | 2021-04-29 21:08:18 -0500 | [diff] [blame] | 116 | "fru": {"$ref": "#/definitions/inventory_path" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 117 | "value": {"$ref": "#/definitions/boolean_value" } |
| 118 | }, |
| 119 | "required": ["fru", "value"], |
| 120 | "additionalProperties": false |
| 121 | }, |
| 122 | |
Shawn McCarney | ecbeeea | 2021-04-29 21:08:18 -0500 | [diff] [blame] | 123 | "inventory_path": |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 124 | { |
| 125 | "type": "string", |
| 126 | "minLength": 1 |
| 127 | }, |
| 128 | |
| 129 | "boolean_value": |
| 130 | { |
| 131 | "type": "boolean" |
| 132 | }, |
| 133 | |
| 134 | "compare_vpd": |
| 135 | { |
| 136 | "type": "object", |
| 137 | "properties": |
| 138 | { |
Shawn McCarney | ecbeeea | 2021-04-29 21:08:18 -0500 | [diff] [blame] | 139 | "fru": {"$ref": "#/definitions/inventory_path" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 140 | "keyword": {"$ref": "#/definitions/keyword" }, |
Matt Spinler | aacc2aa | 2021-05-25 09:31:35 -0600 | [diff] [blame] | 141 | "value": {"$ref": "#/definitions/string_value" }, |
Matt Spinler | aacc2aa | 2021-05-25 09:31:35 -0600 | [diff] [blame] | 142 | "byte_values": {"$ref": "#/definitions/bytes_values" } |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 143 | }, |
Matt Spinler | aacc2aa | 2021-05-25 09:31:35 -0600 | [diff] [blame] | 144 | "required": ["fru", "keyword"], |
| 145 | "oneOf": [ |
| 146 | {"required": ["value"]}, |
| 147 | {"required": ["byte_values"]} |
| 148 | ], |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 149 | "additionalProperties": false |
| 150 | }, |
| 151 | |
| 152 | "keyword": |
| 153 | { |
| 154 | "type": "string", |
Matt Spinler | aacc2aa | 2021-05-25 09:31:35 -0600 | [diff] [blame] | 155 | "enum": ["CCIN", "Manufacturer", "Model", "PartNumber", "HW"] |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 156 | }, |
| 157 | |
| 158 | "string_value": |
| 159 | { |
| 160 | "type": "string" |
| 161 | }, |
| 162 | |
| 163 | "i2c_bit": |
| 164 | { |
| 165 | "type": "object", |
| 166 | "properties": |
| 167 | { |
| 168 | "register": {"$ref": "#/definitions/register" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 169 | "position": {"$ref": "#/definitions/position" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 170 | "value": {"$ref": "#/definitions/bit_value" } |
| 171 | }, |
| 172 | "required": ["register", "position","value"], |
| 173 | "additionalProperties": false |
| 174 | }, |
| 175 | |
| 176 | "register": |
| 177 | { |
| 178 | "type": "string", |
| 179 | "pattern": "^0x[0-9A-Fa-f]{2}$" |
| 180 | }, |
| 181 | |
| 182 | "position": |
| 183 | { |
| 184 | "type": "integer", |
| 185 | "minimum": 0, |
| 186 | "maximum": 7 |
| 187 | }, |
| 188 | |
| 189 | "bit_value": |
| 190 | { |
| 191 | "type": "integer", |
| 192 | "minimum": 0, |
| 193 | "maximum": 1 |
| 194 | }, |
| 195 | |
| 196 | "i2c_byte": |
| 197 | { |
| 198 | "type": "object", |
| 199 | "properties": |
| 200 | { |
| 201 | "register": {"$ref": "#/definitions/register" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 202 | "value": {"$ref": "#/definitions/byte_value" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 203 | "mask": {"$ref": "#/definitions/byte_mask" } |
| 204 | }, |
| 205 | "required": ["register", "value"], |
| 206 | "additionalProperties": false |
| 207 | }, |
| 208 | |
| 209 | "byte_value": |
| 210 | { |
| 211 | "type": "string", |
| 212 | "pattern": "^0x[0-9A-Fa-f]{2}$" |
| 213 | }, |
| 214 | |
| 215 | "byte_mask": |
| 216 | { |
| 217 | "type": "string", |
| 218 | "pattern": "^0x[0-9A-Fa-f]{2}$" |
| 219 | }, |
| 220 | |
| 221 | "i2c_bytes": |
| 222 | { |
| 223 | "type": "object", |
| 224 | "properties": |
| 225 | { |
| 226 | "register": {"$ref": "#/definitions/register" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 227 | "values": {"$ref": "#/definitions/bytes_values" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 228 | "masks": {"$ref": "#/definitions/bytes_masks" } |
| 229 | }, |
| 230 | "required": ["register", "values"], |
| 231 | "additionalProperties": false |
| 232 | }, |
| 233 | |
| 234 | "bytes_values": |
| 235 | { |
| 236 | "type": "array", |
| 237 | "items": {"$ref": "#/definitions/byte_value" }, |
| 238 | "minItems": 1 |
| 239 | }, |
| 240 | |
| 241 | "bytes_masks": |
| 242 | { |
| 243 | "type": "array", |
| 244 | "items": {"$ref": "#/definitions/byte_mask" }, |
| 245 | "minItems": 1 |
| 246 | }, |
| 247 | |
| 248 | "if": |
| 249 | { |
| 250 | "type": "object", |
| 251 | "properties": |
| 252 | { |
| 253 | "condition": {"$ref": "#/definitions/action" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 254 | "then": {"$ref": "#/definitions/actions" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 255 | "else": {"$ref": "#/definitions/actions" } |
| 256 | }, |
| 257 | "required": ["condition", "then"], |
| 258 | "additionalProperties": false |
| 259 | }, |
| 260 | |
| 261 | "pmbus_write_vout_command": |
| 262 | { |
| 263 | "type": "object", |
| 264 | "properties": |
| 265 | { |
| 266 | "volts": {"$ref": "#/definitions/volts" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 267 | "format": {"$ref": "#/definitions/write_vout_format" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 268 | "exponent": {"$ref": "#/definitions/exponent" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 269 | "is_verified": {"$ref": "#/definitions/is_verified" } |
| 270 | }, |
| 271 | "required": ["format"], |
| 272 | "additionalProperties": false |
| 273 | }, |
| 274 | |
| 275 | "volts": |
| 276 | { |
| 277 | "type": "number" |
| 278 | }, |
| 279 | |
| 280 | "write_vout_format": |
| 281 | { |
| 282 | "type": "string", |
| 283 | "enum": ["linear"] |
| 284 | }, |
| 285 | |
| 286 | "exponent": |
| 287 | { |
| 288 | "type": "integer" |
| 289 | }, |
| 290 | |
| 291 | "is_verified": |
| 292 | { |
| 293 | "type": "boolean" |
| 294 | }, |
| 295 | |
| 296 | "pmbus_read_sensor": |
| 297 | { |
| 298 | "type": "object", |
| 299 | "properties": |
| 300 | { |
| 301 | "type": {"$ref": "#/definitions/pmbus_read_sensor_type" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 302 | "command": {"$ref": "#/definitions/pmbus_read_sensor_command" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 303 | "format": {"$ref": "#/definitions/read_sensor_format" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 304 | "exponent": {"$ref": "#/definitions/exponent" } |
| 305 | }, |
| 306 | "required": ["type", "command", "format"], |
| 307 | "additionalProperties": false |
| 308 | }, |
| 309 | |
| 310 | "pmbus_read_sensor_type": |
| 311 | { |
| 312 | "type": "string", |
| 313 | "enum": ["iout", "iout_peak", "iout_valley", "pout", "temperature", "temperature_peak", "vout", "vout_peak", "vout_valley"] |
| 314 | }, |
| 315 | |
| 316 | "pmbus_read_sensor_command": |
| 317 | { |
| 318 | "type": "string", |
| 319 | "pattern": "^0x[0-9a-fA-F]{2}$" |
| 320 | }, |
| 321 | |
| 322 | "read_sensor_format": |
| 323 | { |
| 324 | "type": "string", |
| 325 | "enum": ["linear_11", "linear_16"] |
| 326 | }, |
| 327 | |
| 328 | "chassis": |
| 329 | { |
| 330 | "type": "array", |
| 331 | "items": |
| 332 | { |
| 333 | "type": "object", |
| 334 | "properties": |
| 335 | { |
| 336 | "comments": {"$ref": "#/definitions/comments" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 337 | "number": {"$ref": "#/definitions/number" }, |
Shawn McCarney | ecbeeea | 2021-04-29 21:08:18 -0500 | [diff] [blame] | 338 | "inventory_path": {"$ref": "#/definitions/inventory_path" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 339 | "devices": {"$ref": "#/definitions/devices" } |
| 340 | }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 341 | "required": ["number"], |
| 342 | "additionalProperties": false |
| 343 | }, |
| 344 | "minItems": 1 |
| 345 | }, |
| 346 | |
| 347 | "number": |
| 348 | { |
| 349 | "type": "integer", |
| 350 | "minimum": 1 |
| 351 | }, |
| 352 | |
| 353 | "devices": |
| 354 | { |
| 355 | "type": "array", |
| 356 | "items": |
| 357 | { |
| 358 | "type": "object", |
| 359 | "properties": |
| 360 | { |
| 361 | "comments": {"$ref": "#/definitions/comments" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 362 | "id": {"$ref": "#/definitions/id" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 363 | "is_regulator": {"$ref": "#/definitions/is_regulator" }, |
Shawn McCarney | ecbeeea | 2021-04-29 21:08:18 -0500 | [diff] [blame] | 364 | "fru": {"$ref": "#/definitions/inventory_path" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 365 | "i2c_interface": {"$ref": "#/definitions/i2c_interface" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 366 | "presence_detection": {"$ref": "#/definitions/presence_detection" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 367 | "configuration": {"$ref": "#/definitions/configuration" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 368 | "rails": {"$ref": "#/definitions/rails" } |
| 369 | }, |
| 370 | "required": ["id", "is_regulator", "fru", "i2c_interface"], |
| 371 | "if": |
| 372 | { |
| 373 | "properties": { "is_regulator": { "const": false } } |
| 374 | }, |
| 375 | "then": |
| 376 | { |
| 377 | "not" : { "required" : ["rails"] } |
| 378 | }, |
| 379 | "additionalProperties": false |
| 380 | }, |
| 381 | "minItems": 1 |
| 382 | }, |
| 383 | |
| 384 | "is_regulator": |
| 385 | { |
| 386 | "type": "boolean" |
| 387 | }, |
| 388 | |
| 389 | "i2c_interface": |
| 390 | { |
| 391 | "type": "object", |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 392 | "properties": |
| 393 | { |
| 394 | "bus": {"$ref": "#/definitions/bus" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 395 | "address": {"$ref": "#/definitions/address" } |
| 396 | }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 397 | "required": ["bus", "address"], |
| 398 | "additionalProperties": false |
| 399 | }, |
| 400 | |
| 401 | "bus": |
| 402 | { |
| 403 | "type": "integer", |
| 404 | "minimum": 0 |
| 405 | }, |
| 406 | |
| 407 | "address": |
| 408 | { |
| 409 | "type": "string", |
| 410 | "pattern": "^0x[0-9A-Fa-f]{2}$" |
| 411 | }, |
| 412 | |
| 413 | "presence_detection": |
| 414 | { |
| 415 | "type": "object", |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 416 | "properties": |
| 417 | { |
| 418 | "comments": {"$ref": "#/definitions/comments" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 419 | "rule_id": {"$ref": "#/definitions/id" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 420 | "actions": {"$ref": "#/definitions/actions" } |
| 421 | }, |
| 422 | "additionalProperties": false, |
| 423 | "oneOf": [ |
| 424 | {"required": ["rule_id"]}, |
| 425 | {"required": ["actions"]} |
| 426 | ] |
| 427 | }, |
| 428 | |
| 429 | "configuration": |
| 430 | { |
| 431 | "type": "object", |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 432 | "properties": |
| 433 | { |
| 434 | "comments": {"$ref": "#/definitions/comments" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 435 | "volts": {"$ref": "#/definitions/volts" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 436 | "rule_id": {"$ref": "#/definitions/id" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 437 | "actions": {"$ref": "#/definitions/actions" } |
| 438 | }, |
| 439 | "additionalProperties": false, |
| 440 | "oneOf": [ |
| 441 | {"required": ["rule_id"]}, |
| 442 | {"required": ["actions"]} |
| 443 | ] |
| 444 | }, |
| 445 | |
| 446 | "rail": |
| 447 | { |
| 448 | "type": "object", |
| 449 | "properties": |
| 450 | { |
| 451 | "comments": {"$ref": "#/definitions/comments" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 452 | "id": {"$ref": "#/definitions/id" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 453 | "configuration": {"$ref": "#/definitions/configuration" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 454 | "sensor_monitoring": {"$ref": "#/definitions/sensor_monitoring" } |
| 455 | }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 456 | "required": ["id"], |
| 457 | "additionalProperties": false |
| 458 | }, |
| 459 | |
| 460 | "rails": |
| 461 | { |
| 462 | "type": "array", |
| 463 | "items": {"$ref": "#/definitions/rail" }, |
| 464 | "minItems": 1 |
| 465 | }, |
| 466 | |
| 467 | "sensor_monitoring": |
| 468 | { |
| 469 | "type": "object", |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 470 | "properties": |
| 471 | { |
| 472 | "comments": {"$ref": "#/definitions/comments" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 473 | "rule_id": {"$ref": "#/definitions/id" }, |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 474 | "actions": {"$ref": "#/definitions/actions" } |
| 475 | }, |
| 476 | "additionalProperties": false, |
| 477 | "oneOf": [ |
| 478 | {"required": ["rule_id"]}, |
| 479 | {"required": ["actions"]} |
| 480 | ] |
| 481 | } |
Bob King | dcb4b3b | 2019-12-17 18:07:06 +0800 | [diff] [blame] | 482 | } |
| 483 | } |