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

Consider "from" member when determining patch conflicts #41

Open
sseago opened this issue Jul 2, 2021 · 0 comments
Open

Consider "from" member when determining patch conflicts #41

sseago opened this issue Jul 2, 2021 · 0 comments

Comments

@sseago
Copy link
Contributor

sseago commented Jul 2, 2021

When "move" and "copy" jsonpatch operations are considered, two operations could conflict even if the "patch" members are not the same. If a copy operation is from "/foo" to "/bar" and there's a remove "/foo" operation as well, those two are in conflict even though they don't have the same path. The outcome will differ depending on the order of patch application. Similarly, a move and replace operation could be in conflict when the move "from" is equal to the replace "path".

One way to resolve this would be to consider "move" and "copy" operations as having two path elements, and they would conflict with any other operation containing either one of these as path elements (either as an "path" on any operation, or as a "from" field in another move or copy operation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant