eclipse-emfcloud / emfcloud-modelserver

Modelserver component
Other
40 stars 21 forks source link

API V2: Add support for "Copy" and "Move" operations #179

Open CamilleLetavernier opened 2 years ago

CamilleLetavernier commented 2 years ago

In the current implementation of the V2 API, we support the following operations:

Json Patch also defines "Move" and "Copy" Operations, which are currently not handled by the server. We didn't consider them to be useful for a first iteration, as all operations can be defined by composing Replace, Add and Remove operations. However, since we now support pure Json patches, which can be generated by comparing 2 versions of a Json Node using a 3rd party library, the json-patch library might use these Move and Copy operations instead of lower-level Add/Remove operations. This wouldn't work with the current Model Server implementation.

We should add support in the AbstractJsonPatchHelper for Move and Copy operations (Translating them to the corresponding EMF Commands).