Closed BuzzCutNorman closed 1 year ago
This might be too simplistic of solution, but it has covered the few cases I came up with. When the rounding happens since I am using all 9
s in the strings float
is rounding to a number that always starts with a 1
, has 0
s, and a decimal point .
. I played around and ended adding a second check to see if 1 is in the string version of str(float(maximum_as_number))
.
if "e+" not in str(float(maximum_as_number)) and "1" not in str(float(maximum_as_number)):
When this fails the else
is to send over the minimum
and maximum
in scientific notation.
The method
hd_to_jsonschema_type
is returning minimum and maximum that have been rounded with given anumeric(18,7)
column.This has to do with how
float
values are rounded. I have tried aDecimal
type but that isn't allowed. Jsonschema validation will fail if I send astr
value.This is what I would expect to see if all is working well.