Closed rogpeppe closed 3 weeks ago
cue version
73d4e2559fb69d798244e4ada3f1d52704e92d30
Yes
exec cue def schema1.json cmp stdout want-stdout exec cue def schema2.json cmp stdout want-stdout -- want-stdout -- @jsonschema(schema="http://json-schema.org/draft-07/schema#") ["foo", ...] -- schema1.json -- { "$schema": "http://json-schema.org/draft-07/schema#", "type": "array", "items": [ { "const": "foo" } ], "additionalItems": {} } -- schema2.json -- { "$schema": "http://json-schema.org/draft-07/schema#", "type": "array", "additionalItems": {}, "items": [ { "const": "foo" } ] }
A passing test. The only way that schema1.json and schema2.json differ is in the ordering of items and additionalItems fields. The output should be the same regardless of their respective order.
schema1.json
schema2.json
items
additionalItems
> exec cue def schema1.json [stdout] @jsonschema(schema="http://json-schema.org/draft-07/schema#") ["foo", ...] > cmp stdout want-stdout > exec cue def schema2.json [stdout] @jsonschema(schema="http://json-schema.org/draft-07/schema#") ["foo"] > cmp stdout want-stdout diff stdout want-stdout --- stdout +++ want-stdout @@ -1,2 +1,2 @@ @jsonschema(schema="http://json-schema.org/draft-07/schema#") -["foo"] +["foo", ...] FAIL: /tmp/x.txtar:5: stdout and want-stdout differ
What version of CUE are you using (
cue version
)?Does this issue reproduce with the latest stable release?
Yes
What did you do?
What did you expect to see?
A passing test. The only way that
schema1.json
andschema2.json
differ is in the ordering ofitems
andadditionalItems
fields. The output should be the same regardless of their respective order.What did you see instead?