Invalid value specified for 'add' operation #188
-
Hi, I'm working on a project which uses the EMFcloud as the server. Now I run into trouble with sending the ADD operation PATCH. Here's the payload I send to the server: {
"data": {
"type": "modelserver.patch",
"data": [{
"op":"add",
"path":"/input/0/",
"value": {
"$type": "http://nl.vu.cs.bumble/statemachine#//Input",
"name":"test"
}
}]
}
} And here is the response: {
"type": "error",
"data": "Invalid value specified for 'add' operation"
} The weird thing is, the two instance models are the same, and this ADD patch applies successfully on the Can you maybe give my some clues on why this is the case? Thank you! An additional comment to the original question, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hey @Yunabell-VU, thanks for your interest in the ModelServer and the EMF.cloud project! 🎉 I assume the Json pointer path you are using ( I can give you an example for the basic
If we want to add a new node to the first On another note, you could also send the same patch using with EMF-like paths, which would lead to the same results:
HTH, and best regards from Vienna, |
Beta Was this translation helpful? Give feedback.
Hey @Yunabell-VU,
thanks for your interest in the ModelServer and the EMF.cloud project! 🎉
I assume the Json pointer path you are using (
"/input/0/"
) is either missing a feature name or you need to specify the path to the parent element if you want to add a newInput
element to the model.I can give you an example for the basic
coffeemodel
example we use in theemfcloud-modelserver
project: