require string type for patch op/path/from fields

This commit is contained in:
Javid Khan
2026-07-18 21:08:17 +05:30
parent eed664e06a
commit e248056aa1
3 changed files with 13 additions and 3 deletions
+6
View File
@@ -554,6 +554,12 @@
"doc": {"foo": "bar"},
"patch": [{"op": "move", "from": null, "path": "/foo"}],
"error": "a null from field should fail rather than crash"
},
{ "comment": "null path field must be rejected, not dereferenced",
"doc": {"foo": "bar"},
"patch": [{"op": "remove", "path": null}],
"error": "a null path field should fail rather than crash"
}
]