Revert "Merge pull request #3516 from owenconti/bug/3511-query-formData-parameters"
This reverts commit6a7e9d2e88, reversing changes made toeb01beedfa.
This commit is contained in:
@@ -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({}))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user