Steps to replicate the issue:
- Create or modify an Item to have the following English aliases [ "an en alias", "alias in English", "another alias" ]
- Send a PATCH /entities/items/{{ item_id }}/aliases request that replaces the first alias in the list. E.g.:
{ "patch": [ { "op": "replace", "path": "/en/0", "value": "a changed alias" } ] }
- Send a GET /entities/items/{{item_id}}/aliases request
What happens?:
- The response from the PATCH /entities/items/{{ item_id }}/aliases request has the changed alias at the end of the list instead in its original position at the start of the list
{ "en": [ "alias in English", "another alias", "a changed alias" ] }
- The response from a GET /entities/items/{{item_id}}/aliases request also shows that the aliases have been reordered
What should have happened instead?:
The response from the PATCH /entities/items/{{ item_id }}/aliases request should maintain the order of the list
{ "en": [ "a changed alias", "alias in English", "another alias" ] }
Other information
- Modifying an object in a list works as expected - the issue seems to exist when replacing a whole list item
- I believe this is due to the swaggest/json-diff library we are using