Fixes #3511 - Update changeParameter calls to accept in value to identify parameters based on name plus in value

This commit is contained in:
Owen Conti
2017-08-02 22:07:48 -06:00
parent cd422fe8a7
commit fdb0d13089
7 changed files with 18 additions and 14 deletions

View File

@@ -251,10 +251,10 @@ export const allowTryItOutFor = () => {
}
// Get the parameter value by parameter name
export function getParameter(state, pathMethod, name) {
export function getParameter(state, pathMethod, name, inType) {
let params = spec(state).getIn(["paths", ...pathMethod, "parameters"], fromJS([]))
return params.filter( (p) => {
return Map.isMap(p) && p.get("name") === name
return Map.isMap(p) && p.get("name") === name && p.get("in") === inType
}).first()
}