Closed wmcginty closed 6 years ago
Merging #41 into release/2.0.0 will increase coverage by
0.44%
. The diff coverage is98.33%
.
@@ Coverage Diff @@
## release/2.0.0 #41 +/- ##
=================================================
+ Coverage 95.82% 96.26% +0.44%
=================================================
Files 26 28 +2
Lines 814 991 +177
=================================================
+ Hits 780 954 +174
- Misses 34 37 +3
Impacted Files | Coverage Δ | |
---|---|---|
...Request/AnyNetworkRequest+DecodableContainer.swift | 100% <100%> (ø) |
:arrow_up: |
Tests/Helper/Mocks/MockDecodableContainer.swift | 100% <100%> (ø) |
|
Sources/Hyperspace/Request/AnyDecodable.swift | 97.91% <97.91%> (ø) |
|
Tests/DecodingTests.swift | 94.56% <98.19%> (+5.09%) |
:arrow_up: |
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 01f2026...48d9460. Read the comment docs.
Typos fixed and requests are now asserting on specific DecodingError
s.
This provides an implementation for being able to being decoding a JSON blob at an arbitrary String 'rootKey'. We currently have similar functionality using the
DecodableContainerType
, but this involves the generation of a type for each possible key, and so is enforced at compile time.This method (I have kept
DecodableContainerType
available in the interface) sacrifices some run time performance for the ability to provide that String at runtime.While the current implementation accept only a single String parameter, the same logic could be applied to an array of Strings at the cost of additional performance.