Closed tienvx closed 8 months ago
While this fixes the issue above, it regresses behavior of the random integer and decimal generators.
What the previous code was doing was generating either a number or a string depending on the type of the value. With this change, it will always now generate a string value.
For instant, with input JSON:
{
"value": 100
}
It will now generate:
{
"value": "3498499"
}
and not
{
"value": 3498499
}
I think the fix is to only change the fallback to generate either type of value.
I updated the code follow your suggestion
Nice!
Remove the errors similar to
Could not generate a random decimal from null
.It then allow to use integration json like this:
This change is for implementing compatibility suite in pact-php (and probably other languages that use FFI calls as well).
For more information, please take a look at this discussion