Closed adsonpleal closed 4 years ago
Hey, thanks for the pull request!
Heads up that James isn't being updated these days. Thank you for providing these changes upstream, but since we probably won't be doing another release, I won't land them. However, we should leave this PR here so that another developer forks James, they can land your changes in their repo :smile:
Motivation
I needed a way to only map specific parts of a request response leaving the rest untouched.
New dependencies
deepmerge: used to perform object deep merge react-json-view: used to pretty print, collapse and edit JSON.
Changes
Added functionality to add a "url to merge" mapping. Now is possible to map a url to a deep merge JSON.
Let's say that we have a request that returns:
And we want to merge it with:
The result will be:
For arrays it will fully replace the array:
Request:
Merge:
Result:
Screenshots:
New "URL TO MERGE" button.
New "Edit mapping button" (only for "merge" mappings).
New "Edit mapping" screen: