Error: Contract expected number >= 0.01 but response contained 0.01 (numeral) #1158
-
Please refer to the repository: https://github.com/v1bh0r/specmatic-coding-test I have a property on the ProductDetails called cost having a type: number, format: double, minimum: 0.01 The autogenerated tests fail with a self-contradicting error message:
I suspect it is because of some data type conflict, but I confirmed that the output JSON has a numerical value, not a string. What am I missing here? Here's the full error message from one of the failures:
|
Beta Was this translation helpful? Give feedback.
Answered by
harikrishnan83
Jun 30, 2024
Replies: 1 comment 2 replies
-
Looks like a precision issue. Let me check and get back. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It is indeed a precision issue. This has been resolved in Specmatic release 1.3.31. The specmatic-coding-test has also been upgraded to this version. Please upgrade and verify.