diff --git a/encoding/jsonschema/testdata/num.txtar b/encoding/jsonschema/testdata/num.txtar index 2dad4a44042..ed5dbd03943 100644 --- a/encoding/jsonschema/testdata/num.txtar +++ b/encoding/jsonschema/testdata/num.txtar @@ -37,7 +37,6 @@ }, "additionalProperties": false } - -- out/decode/cue -- import ( "strings" diff --git a/encoding/jsonschema/testdata/numericenum.txtar b/encoding/jsonschema/testdata/numericenum.txtar new file mode 100644 index 00000000000..043826338eb --- /dev/null +++ b/encoding/jsonschema/testdata/numericenum.txtar @@ -0,0 +1,13 @@ +# Test that we can use a "number" type constraint with a numeric enum. +# See issue #3173. + +# TODO fix this so it works. + +-- type.json -- +{ + "type": "number", + "enum": [ 1, 2, 3] +} +-- out/decode/err -- +constraint not allowed because type number is excluded: + type.json:2:5