schemas: Descriptions must be strings
```
$ python3 -c 'import json; import jsonschema; schema = json.load(open("schemas/global.json")); cls = jsonschema.validators.validator_for(schema); cls.check_schema(schema)'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3/dist-packages/jsonschema/validators.py", line 204, in check_schema
raise exceptions.SchemaError.create_from(error)
jsonschema.exceptions.SchemaError: ['The schema for an entity manager configuration file. An entity ', 'mananger configuration file can consist of a single object, or an ', 'array of objects. Objects must be of type EMConfig.'] is not of type 'string'
Failed validating 'type' in metaschema['properties']['description']:
{'type': 'string'}
On schema['description']:
['The schema for an entity manager configuration file. An entity ',
'mananger configuration file can consist of a single object, or an ',
'array of objects. Objects must be of type EMConfig.']
```
Change-Id: I2b8102e7d6047c8a7e624e182465065268fb8ad9
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
diff --git a/schemas/virtual_sensor.json b/schemas/virtual_sensor.json
index 77c39c9..512ea85 100644
--- a/schemas/virtual_sensor.json
+++ b/schemas/virtual_sensor.json
@@ -3,62 +3,46 @@
"definitions": {
"VirtualSensor": {
"title": "phosphor-virtual-sensor configuration",
- "description": [
- "The configuration used by the virtual-sensor daemon",
- "in the phosphor-virtual-sensor repository. Virtual",
- "sensors are xyz.openbmc_project.Sensor.Value D-Bus",
- "objects that have sensor values calculated from the",
- "D-Bus sensors listed here."
- ],
+ "description": "The configuration used by the virtual-sensor daemon in the phosphor-virtual-sensor repository. Virtual sensors are xyz.openbmc_project.Sensor.Value D-Bus objects that have sensor values calculated from the D-Bus sensors listed here.",
"type": "object",
"properties": {
"MaxValidInput": {
- "description": ["Maximum valid value of an input sensor"],
+ "description": "Maximum valid value of an input sensor",
"type": "number"
},
"MaxValue": {
- "description": ["Maximum sensor value"],
+ "description": "Maximum sensor value",
"$ref": "legacy.json#/definitions/Types/MaxValue"
},
"MinValidInput": {
- "description": ["Miniumum valid value of an input sensor"],
+ "description": "Miniumum valid value of an input sensor",
"type": "number"
},
"MinValue": {
- "description": ["Minimum sensor value"],
+ "description": "Minimum sensor value",
"$ref": "legacy.json#/definitions/Types/MinValue"
},
"Name": {
"type": "string"
},
"Sensors": {
- "description": [
- "Any DBus sensors whose values are used to",
- "determine the value of the virtual sensor."
- ],
+ "description": "Any DBus sensors whose values are used to determine the value of the virtual sensor.",
"items": {
"type": "string"
},
"type": "array"
},
"Thresholds": {
- "description": [
- "Threshold values used to set and clear alarms"
- ],
+ "description": "Threshold values used to set and clear alarms",
"$ref": "legacy.json#/definitions/Types/Thresholds"
},
"Type": {
- "description": [
- "The type of calculation this sensor uses."
- ],
+ "description": "The type of calculation this sensor uses.",
"type": "string",
"enum": ["ModifiedMedian", "Maximum"]
},
"Units": {
- "description": [
- "The sensor type, as it shows up in the D-Bus",
- "object name."
- ],
+ "description": "The sensor type, as it shows up in the D-Bus object name.",
"$ref": "legacy.json#/definitions/Types/Units"
}
},