Skip to content

Commit

Permalink
Testing a fix for the multipleOf issue using info in python-jsonschem…
Browse files Browse the repository at this point in the history
  • Loading branch information
danner26 authored Jan 30, 2023
1 parent 0b6299a commit 83e5b14
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion schema/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@
"value": {
"type": "number",
"minimum": 0,
"multipleOfPrecision": 0.01
"multipleOf": 0.01
},
"unit": {
"type": "string",
Expand Down
3 changes: 2 additions & 1 deletion tests/definitions_test.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import decimal
import glob
import json
import os
Expand Down Expand Up @@ -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!"
Expand Down

0 comments on commit 83e5b14

Please sign in to comment.