Files
librenms-librenms/misc/config_schema.json
Tony Murray 1d7347dd62 Validate config schema, add types to all (#10723)
* Vaildate config_definitions.json schema

* finish adding types and other cleanups
2019-10-20 23:08:40 +00:00

89 lines
2.8 KiB
JSON

{
"$schema": "http://json-schema.org/schema#",
"type": "object",
"properties": {
"Warning!": {
"type": "string"
},
"config": {
"type": "object",
"propertyNames": {
"pattern": "^[a-z0-9_.\\-]+$"
},
"additionalProperties": {
"type": "object",
"properties": {
"default": {},
"type": {
"type": "string",
"enum": [
"integer",
"text",
"boolean",
"select",
"array",
"password",
"email",
"color",
"float",
"graph",
"dashboard-select",
"snmp3auth",
"ldap-groups",
"ad-groups"
]
},
"section": {
"type": "string"
},
"group": {
"type": "string"
},
"order": {
"type": "integer"
},
"options": {
"type": "object",
"minProperties": 2
},
"units": {
"type": "string"
},
"validate": {
"propertyNames": {
"pattern": "^value$",
"type": "string"
}
},
"when": {
"properties": {
"setting": {
"type": "string"
},
"operator": {
"type": "string",
"enum": [
"equals",
"in"
]
},
"value": {
"type": ["string", "array"]
}
}
},
"disabled": {
"type": "boolean"
},
"hidden": {
"type": "boolean"
}
},
"required": ["type"],
"additionalProperties": false
}
}
},
"required": ["Warning!", "config"]
}