removing a nonexistent field should fail
norpan opened this issue · 3 comments
norpan commented
4.2. remove
The "remove" operation removes the value at the target location.
The target location MUST exist for the operation to be successful.
so
{ "comment": "For remove, the target location MUST exist for the operation to be successful.",
"doc": {"foo" : "bar"},
"patch": [{"op": "remove", "path": "/baz"}],
"error": "removing a nonexistent field should fail" }
norpan commented
The same goes for removing a too large array index.
bruth commented
Good observation. Can you submit a PR adding that test case?