Skip to content

Path prefix not added to "move" operation in JSON patch #256

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

Closed
rmorshea opened this issue Dec 18, 2020 · 0 comments · Fixed by #258
Closed

Path prefix not added to "move" operation in JSON patch #256

rmorshea opened this issue Dec 18, 2020 · 0 comments · Fixed by #258
Assignees

Comments

@rmorshea
Copy link
Collaborator

rmorshea commented Dec 18, 2020

We send changes over in the form:

{
    "path": "/prefix",
    "changes": [{"op": "move", "path": "/x", "from": "/y"}]
}

On the client-side this should be reconstructed into the patch:

[{"op": "move", "path": "/prefix/x", "from": "/prefix/y"}]

However we are only adding the /prefix to the path key:

[{"op": "move", "path": "/prefix/x", "from": "/y"}]
@rmorshea rmorshea added the bug label Dec 18, 2020
@rmorshea rmorshea self-assigned this Dec 18, 2020
@rmorshea rmorshea changed the title to-do breaks if you delete an item which is an out of order integer Improper use of JSON Patch Dec 21, 2020
@rmorshea rmorshea changed the title Improper use of JSON Patch Path prefix not added to "move" operation in JSON patch Dec 21, 2020
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

Successfully merging a pull request may close this issue.

1 participant