Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API V2: Specify a label for Json Patches #160

Open
CamilleLetavernier opened this issue Feb 3, 2022 · 0 comments
Open

API V2: Specify a label for Json Patches #160

CamilleLetavernier opened this issue Feb 3, 2022 · 0 comments
Labels
modelserver EMF.cloud Model Server v2

Comments

@CamilleLetavernier
Copy link
Member

This is a follow-up for #150 / #151

Json Patches only specify the changes to be applied on the model. However, in an Editor, we also like to have label for edit-operations, which can be displayed e.g. in the "Undo/Redo" menu.

At the moment, all Commands derived from Json Patches use a predefined label ("Json Patch"), which is unhelpful.

We should consider a way to specify labels for edit operations. It can be either shared for both CCommand and Json Patch, or specific to Json Patch.

We could add it to the endpoint, e.g.:

PATCH .../models?modeluri=uri&label=My%20Custom%Label
BODY ...

Or make it specific to Json Patch, by adding more data next to the patch itself:

PATCH .../models?modeluri=uri
BODY data: { 
    patch: ["..."],
    label: "My Custom Label"
}

CCommands may already specify a label, so both options make sense. The first one is more consistent, and the second option avoids redundant labels for CCommands, which could be confusing (as only one label would actually be taken into account).

@CamilleLetavernier CamilleLetavernier added the modelserver EMF.cloud Model Server label Feb 3, 2022
@ndoschek ndoschek added the v2 label Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
modelserver EMF.cloud Model Server v2
Projects
None yet
Development

No branches or pull requests

2 participants