Revert "Merge pull request #3516 from owenconti/bug/3511-query-formData-parameters"

This reverts commit 6a7e9d2e88, reversing
changes made to eb01beedfa.
This commit is contained in:
Kyle Shockey
2017-09-23 10:51:32 -07:00
parent c8a9ddbf94
commit beeb6b608e
8 changed files with 19 additions and 23 deletions

View File

@@ -260,10 +260,10 @@ export const allowTryItOutFor = () => {
}
// Get the parameter value by parameter name
export function getParameter(state, pathMethod, name, inType) {
export function getParameter(state, pathMethod, name) {
let params = spec(state).getIn(["paths", ...pathMethod, "parameters"], fromJS([]))
return params.filter( (p) => {
return Map.isMap(p) && p.get("name") === name && p.get("in") === inType
return Map.isMap(p) && p.get("name") === name
}).first()
}
@@ -280,7 +280,7 @@ export function parameterValues(state, pathMethod, isXml) {
let params = spec(state).getIn(["paths", ...pathMethod, "parameters"], fromJS([]))
return params.reduce( (hash, p) => {
let value = isXml && p.get("in") === "body" ? p.get("value_xml") : p.get("value")
return hash.set(`${p.get("in")}.${p.get("name")}`, value)
return hash.set(p.get("name"), value)
}, fromJS({}))
}