Skip to content
This repository has been archived by the owner on Jul 30, 2018. It is now read-only.

JSON merge patch #80

Closed
wants to merge 5 commits into from
Closed

JSON merge patch #80

wants to merge 5 commits into from

Conversation

maier49
Copy link
Contributor

@maier49 maier49 commented Dec 14, 2016

Type: feature

Description:

This builds off of #48 , resolving the TODOs there with regards to JSON Merge Patch. This adds a toMergeString method to the Patch interface that produces a JSON Merge Patch compliant string when possible. Some JSON Patch operations are not really supported by the JSON Merge Patch format, but those operations are also not produced by the diff functionality provided in stores so under normal circumstances any patch sent by REST storage will be valid.

This PR adds onto #48 with only these changes so it could be merged after or instead of it.
Related Issue: #47 , #4

Please review this checklist before submitting your PR:

  • There is a related issue
  • All contributors have signed a CLA
  • All code matches the style guide
  • The code passes the CI tests
  • Unit or Functional tests are included in the PR
  • The PR increases or maintains the overall unit test coverage percentage
  • The code is ready to be merged

@codecov-io
Copy link

codecov-io commented Dec 14, 2016

Codecov Report

Merging #80 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master    #80    +/-   ##
======================================
  Coverage     100%   100%            
======================================
  Files          15     17     +2     
  Lines        1096   1239   +143     
  Branches      185    216    +31     
======================================
+ Hits         1096   1239   +143
Impacted Files Coverage Δ
src/store/createStore.ts 100% <100%> (ø) ⬆️
src/storage/createInMemoryStorage.ts 100% <100%> (ø) ⬆️
src/storage/createBaseStorage.ts 100% <100%> (ø)
src/patch/createPatch.ts 100% <100%> (ø) ⬆️
src/patch/createOperation.ts 100% <100%> (ø) ⬆️
src/storage/createRestStorage.ts 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6f86aa5...176d5d5. Read the comment docs.

@dylans dylans added this to the 2016.12 milestone Dec 14, 2016
lzhoucs and others added 5 commits December 14, 2016 11:51
* Split a separate BaseStorage
* Move non InMemory specific interfaces into BaseStorage for reuse.

Initial version of Rest Storage.

Implement patch APIs.

Implement fetch API.

Add unit tests for most rest operations. Fix issues found.

Add unit tests for fetch and patch. Clean up and refactoring.

Add initPromise errors out scenario, bring coverages to 100%.

Add missing WeakMap and switch `dojo-shim/array#find`

Feedback changes.

- Make `idSerializer` not default to a built in one, and add the ability
to send multiple GET/DELETE requests when it is not in the option.
- Add the option `customPutPostRequest` with the ability to send
  multiple PUT/POST requests.
- Update/Add unit tests accordingly.

Feedback changes.

Add needed export for dist and use mixin object structure instead of compsoe factories
@dylans dylans modified the milestones: 2017.01, 2016.12 Dec 21, 2016
import WeakMap from 'dojo-shim/WeakMap';
import Map from 'dojo-shim/Map';
import { Patch } from '../patch/createPatch';
import WeakMap from 'dojo-shim/WeakMap';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably isn't supposed to be indented?

@dylans dylans modified the milestones: 2017.01, 2017.02 Jan 31, 2017
@dylans dylans modified the milestones: 2017.02, 2017.03 Mar 1, 2017
@dylans dylans modified the milestones: 2017.04, 2017.03 Mar 29, 2017
@dylans dylans added the beta2 label Mar 29, 2017
@maier49
Copy link
Contributor Author

maier49 commented Apr 21, 2017

Closing because this is out of date and this functionality is now included in #124

@maier49 maier49 closed this Apr 21, 2017
@maier49 maier49 deleted the json-merge-patch branch April 21, 2017 07:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants