Testing a fix for the multipleOf issue using info in https://github.com/python-jsonschema/jsonschema/issues/1039

This commit is contained in:
Daniel W. Anner 2023-01-30 20:11:34 +00:00 committed by GitHub
parent f91e5ead54
commit ea7edcc62e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -605,7 +605,7 @@
"value": {
"type": "number",
"minimum": 0,
"multipleOfPrecision": 0.01
"multipleOf": 0.01
},
"unit": {
"type": "string",

View File

@ -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!"