feat: request snippets plugin (#6910)
This commit is contained in:
@@ -5,7 +5,7 @@ import serializeError from "serialize-error"
|
||||
import isString from "lodash/isString"
|
||||
import debounce from "lodash/debounce"
|
||||
import set from "lodash/set"
|
||||
import { isJSONObject, paramToValue, isEmptyValue } from "core/utils"
|
||||
import { paramToValue, isEmptyValue } from "core/utils"
|
||||
|
||||
// Actions conform to FSA (flux-standard-actions)
|
||||
// {type: string,payload: Any|Error, meta: obj, error: bool}
|
||||
@@ -426,9 +426,7 @@ export const executeRequest = (req) =>
|
||||
const requestBody = oas3Selectors.requestBodyValue(pathName, method)
|
||||
const requestBodyInclusionSetting = oas3Selectors.requestBodyInclusionSetting(pathName, method)
|
||||
|
||||
if(isJSONObject(requestBody)) {
|
||||
req.requestBody = JSON.parse(requestBody)
|
||||
} else if(requestBody && requestBody.toJS) {
|
||||
if(requestBody && requestBody.toJS) {
|
||||
req.requestBody = requestBody
|
||||
.map(
|
||||
(val) => {
|
||||
@@ -445,7 +443,7 @@ export const executeRequest = (req) =>
|
||||
) || requestBodyInclusionSetting.get(key)
|
||||
)
|
||||
.toJS()
|
||||
} else{
|
||||
} else {
|
||||
req.requestBody = requestBody
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user