mirror of
https://github.com/netbox-community/devicetype-library.git
synced 2024-11-07 17:14:31 +01:00
Testing a fix for the multipleOf issue using info in https://github.com/python-jsonschema/jsonschema/issues/1039
This commit is contained in:
parent
f91e5ead54
commit
ea7edcc62e
@ -605,7 +605,7 @@
|
||||
"value": {
|
||||
"type": "number",
|
||||
"minimum": 0,
|
||||
"multipleOfPrecision": 0.01
|
||||
"multipleOf": 0.01
|
||||
},
|
||||
"unit": {
|
||||
"type": "string",
|
||||
|
@ -1,3 +1,4 @@
|
||||
import decimal
|
||||
import glob
|
||||
import json
|
||||
import os
|
||||
@ -35,7 +36,7 @@ def _get_definition_files():
|
||||
|
||||
# Initialize the schema
|
||||
with open(f"schema/{schema}") as schema_file:
|
||||
schema = json.loads(schema_file.read())
|
||||
schema = json.loads(schema_file.read(), parse_float=decimal.Decimal)
|
||||
|
||||
# Validate that the schema exists
|
||||
assert schema, f"Schema definition for {path} is empty!"
|
||||
|
Loading…
Reference in New Issue
Block a user