In https://github.com/goodeggs/unionized/pull/130 I implemented support for a new "decimal" string format in JSONSchemaFactory. However, this isn't respecting the number properties like minimum, maximum, exclusiveMinimum, and exclusiveMaximum. This was kind of the whole point and it isn't viable for our use cases without it, since it otherwise generates data that doesn't validate against its own schema.
This fixes the issue by reusing the number data generation logic and then just calling toString() on the result. Simple!
In https://github.com/goodeggs/unionized/pull/130 I implemented support for a new "decimal" string format in
JSONSchemaFactory
. However, this isn't respecting the number properties likeminimum
,maximum
,exclusiveMinimum
, andexclusiveMaximum
. This was kind of the whole point and it isn't viable for our use cases without it, since it otherwise generates data that doesn't validate against its own schema.This fixes the issue by reusing the
number
data generation logic and then just callingtoString()
on the result. Simple!