Describe the bug
I've noticed an issue with "length" types of "array" generators - u32 constants cause an error while 'range' does not. I think we should either disallow all 32-bit types to be used as a "length", or we should start allowing 32-bit constants in addition to ranges.
4. Interestingly, using the `"range"` workaround as above still gives an error with `"subtype": "i32"`:
Error: At namespace "temp"
Caused by:
BadRequest: could not convert from value '1': Type { expected: "U32", got: "i32(1)" }
**Expected behavior**
Either allow all variations of 32-bit integer types as array lengths (constants, ranges, etc.) or none at all (i.e. limit to just 64-bit integers).
Describe the bug I've noticed an issue with
"length"
types of"array"
generators -u32
constants cause an error while 'range' does not. I think we should either disallow all 32-bit types to be used as a"length"
, or we should start allowing 32-bit constants in addition to ranges.To Reproduce Steps to reproduce the behavior:
Caused by: 0: at file temp/a.json 1: Failed to parse collection 2: cannot use number::U32::Constant as an array length at line 11 column 1
... "length": { "type": "number", "subtype": "u32", "range": { "low": 1, "high": 2, "step": 1 } }, ...
Error: At namespace "temp"
Caused by: BadRequest: could not convert from value '1': Type { expected: "U32", got: "i32(1)" }