With v4.2.0 the behaviour of the JSON validation changed and json-array order was not checked anymore.
This is a breaking change and should be introduced in another way (i.e. by configuring it explicitly)
So this behaviour should be fixed
Expected behavior
The validation of a given JSON array, compared to a control JSON, should not ignore the order of array items.
i.e. the following "recived-json".
{ "books": ["book-c", "book-b", "book-a"] }
Should throw ValidationException when compared with the following "control-json"
{ "books": ["book-a", "book-b", "book-c"] }
On the other hand, missing elements should not yield an Exception in "soft" mode:
i.e. the following "recived-json".
{ "books": ["book-a", "book-b", "book-c"] }
should not throw ValidationException when compared with the following "control-json"
{ "books": ["book-a", "book-b"] }
or
{ "books": ["book-b", "book-c"] }
or
{ "books": ["book-a", "book-c"] }
Actual behavior
Array order should be checked whether in "strict" or "soft" mode of JSON validation.
Citrus Version v4.2.0
With v4.2.0 the behaviour of the JSON validation changed and json-array order was not checked anymore. This is a breaking change and should be introduced in another way (i.e. by configuring it explicitly)
So this behaviour should be fixed
Expected behavior The validation of a given JSON array, compared to a control JSON, should not ignore the order of array items. i.e. the following "recived-json".
Should throw ValidationException when compared with the following "control-json"
On the other hand, missing elements should not yield an Exception in "soft" mode:
i.e. the following "recived-json".
should not throw ValidationException when compared with the following "control-json"
Actual behavior Array order should be checked whether in "strict" or "soft" mode of JSON validation.