Fix check.py

This commit is contained in:
grossmj 2021-10-16 21:05:58 +10:30
parent d183a8790a
commit 674a7c10d1
4 changed files with 20 additions and 1 deletions

View File

@ -78,7 +78,7 @@ def check_appliance(appliance):
schema_filename = "schemas/appliance_v{}.json".format(version)
with open(schema_filename) as f:
schemas[version] = json.load(f)
#no_additional_properties(schemas[version])
no_additional_properties(schemas[version])
with open(os.path.join('appliances', appliance)) as f:
appliance_json = json.load(f)

View File

@ -14,6 +14,12 @@
},
"properties": {
"appliance_id": {
"type": "string",
"minLength": 36,
"maxLength": 36,
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"name": {
"type": "string",
"title": "Appliance name"
@ -430,6 +436,7 @@
}
}
},
"additionalProperties": false,
"required": [
"name",
"category",

View File

@ -14,6 +14,12 @@
},
"properties": {
"appliance_id": {
"type": "string",
"minLength": 36,
"maxLength": 36,
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"name": {
"type": "string",
"title": "Appliance name"

View File

@ -14,6 +14,12 @@
},
"properties": {
"appliance_id": {
"type": "string",
"minLength": 36,
"maxLength": 36,
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"name": {
"type": "string",
"title": "Appliance name"