From ea7edcc62e737b8044237162ca178e3520ce8fc8 Mon Sep 17 00:00:00 2001 From: "Daniel W. Anner" Date: Mon, 30 Jan 2023 20:11:34 +0000 Subject: [PATCH] Testing a fix for the multipleOf issue using info in https://github.com/python-jsonschema/jsonschema/issues/1039 --- schema/components.json | 2 +- tests/definitions_test.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/schema/components.json b/schema/components.json index 0888a4d74..8cc5f979f 100644 --- a/schema/components.json +++ b/schema/components.json @@ -605,7 +605,7 @@ "value": { "type": "number", "minimum": 0, - "multipleOfPrecision": 0.01 + "multipleOf": 0.01 }, "unit": { "type": "string", diff --git a/tests/definitions_test.py b/tests/definitions_test.py index 318704f93..714ec61a8 100644 --- a/tests/definitions_test.py +++ b/tests/definitions_test.py @@ -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!"