Skip to content

Commit

Permalink
Adding support for matrix parameters, part of OAS3
Browse files Browse the repository at this point in the history
  • Loading branch information
ilgrosso committed Jan 8, 2018
1 parent 153cd52 commit b66e4ea
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/execute/oas3/parameter-builders.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,15 @@ function path({req, value, parameter}) {
value,
style: style || 'simple',
explode: explode || false,
escape: false,
escape: style === 'matrix'
})

req.url = req.url.replace(`{${name}}`, styledValue)
if (style === 'matrix') {
req.url = req.url.concat(styledValue)
}
else {
req.url = req.url.replace(`{${name}}`, styledValue)
}
}

function query({req, value, parameter}) {
Expand Down

0 comments on commit b66e4ea

Please sign in to comment.