openapi-spec-validator icon indicating copy to clipboard operation
openapi-spec-validator copied to clipboard

Numbers converted into scientific notation are not considered valid numbers

Open gaurav opened this issue 2 years ago • 2 comments

The property pvalue_threshold in https://nodenormalization-sri.renci.org/openapi.json fails validation because the default value (0.000001) is converted into scientific notation in Python (1e-06), which is judged to not be a valid number (Could not validate OpenAPI at https://nodenormalization-sri.renci.org/openapi.json: '1e-06' is not of type 'number'). Is there any way to work around this?

May be related to https://github.com/python-openapi/openapi-spec-validator/issues/115

gaurav avatar Nov 16 '23 22:11 gaurav

I am seeing the same exact issue, it works with 1.0e+23 but not 1e+23 using version 0.2.9

choward18 avatar Nov 27 '23 18:11 choward18