I was using json-schema-validator in a unit test to validate my API output format and noticed that a property of type "number" with value 1 validates against the enum [1.0]. I expected it not to validate, because 1 is not strictly equal to 1.0.
For me, the difference is important. When my API outputs 1, a client could think that the number is always integer. When it outputs 1.0 instead, they understand that it is a floating point value.
I was using json-schema-validator in a unit test to validate my API output format and noticed that a property of type "number" with value 1 validates against the enum [1.0]. I expected it not to validate, because 1 is not strictly equal to 1.0.
For me, the difference is important. When my API outputs 1, a client could think that the number is always integer. When it outputs 1.0 instead, they understand that it is a floating point value.