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

add logic for validating endpoint patterns #106

Closed bradsawadye closed 4 years ago

bradsawadye commented 4 years ago

Url parameters are now supported and the logic that processes the retrieval of the url parameters (for use in external requests) expects the endpoint pattern to be valid, that is it should have parameter names. patterns like "/path/:/" and "/path/:" will result in the function that handles the request matching failing. The logic that is added in this commit ensures that the url patterns are valid

TRACE-178

codecov[bot] commented 4 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@7f7aeb1). Click here to learn what that means. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #106   +/-   ##
=========================================
  Coverage          ?   98.24%           
=========================================
  Files             ?       21           
  Lines             ?      799           
  Branches          ?        0           
=========================================
  Hits              ?      785           
  Misses            ?       14           
  Partials          ?        0           
Impacted Files Coverage Δ
src/db/models/endpoints.js 100.00% <100.00%> (ø)
src/db/services/endpoints/cache.js 92.30% <0.00%> (ø)
src/db/services/endpoints/index.js 100.00% <0.00%> (ø)
src/endpointRoutes.js 100.00% <0.00%> (ø)
src/middleware/parser.js 100.00% <0.00%> (ø)
src/middleware/validator.js 100.00% <0.00%> (ø)
src/db/index.js 94.73% <0.00%> (ø)
src/constants.js 100.00% <0.00%> (ø)
src/db/models/states.js 100.00% <0.00%> (ø)
src/middleware/externalRequests.js 97.29% <0.00%> (ø)
... and 12 more

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 7f7aeb1...a49ddf3. Read the comment docs.