jembi / openhim-mediator-mapping

An OpenHIM mediator for mapping incoming content to a different format
https://jembi.github.io/openhim-mediator-mapping/
MIT License
3 stars 6 forks source link

DSC19-25 Add logic to cater for array lookup requests to mediator #139

Closed MattyJ007 closed 3 years ago

MattyJ007 commented 3 years ago

The previous stringified JSON parsing logic did not cater for array lookup requests. The nested data structures were ignored and therefore the data was not accessible as it was still a string...

The logic now will go through each requests response in the array and attempt to parse the response body if it is stringified JSON

DSC19-25

codecov[bot] commented 3 years ago

Codecov Report

Merging #139 (eef90ca) into master (cd3d418) will increase coverage by 0.13%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #139      +/-   ##
==========================================
+ Coverage   97.03%   97.16%   +0.13%     
==========================================
  Files          21       21              
  Lines         943      951       +8     
==========================================
+ Hits          915      924       +9     
+ Misses         28       27       -1     
Impacted Files Coverage Δ
src/middleware/externalRequests.js 98.22% <100.00%> (+0.41%) :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 cd3d418...eef90ca. Read the comment docs.