Fixed issue with files in POST requests not being parsed + header autoadd issue
This commit is contained in:
@@ -521,16 +521,16 @@ const AppCreator = (props) => {
|
|||||||
|
|
||||||
if (data.info["x-logo"] !== undefined) {
|
if (data.info["x-logo"] !== undefined) {
|
||||||
if (data.info["x-logo"].url !== undefined) {
|
if (data.info["x-logo"].url !== undefined) {
|
||||||
console.log("PARSED LOGO: ", data.info["x-logo"].url);
|
//console.log("PARSED LOGO: ", data.info["x-logo"].url);
|
||||||
setFileBase64(data.info["x-logo"].url);
|
setFileBase64(data.info["x-logo"].url);
|
||||||
} else {
|
} else {
|
||||||
setFileBase64(data.info["x-logo"]);
|
setFileBase64(data.info["x-logo"]);
|
||||||
}
|
}
|
||||||
console.log("");
|
//console.log("");
|
||||||
console.log("");
|
//console.log("");
|
||||||
console.log("LOGO: ", data.info["x-logo"]);
|
//console.log("LOGO: ", data.info["x-logo"]);
|
||||||
console.log("");
|
//console.log("");
|
||||||
console.log("");
|
//console.log("");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.info.contact !== undefined) {
|
if (data.info.contact !== undefined) {
|
||||||
@@ -660,14 +660,14 @@ const AppCreator = (props) => {
|
|||||||
|
|
||||||
// Typescript? I think not ;)
|
// Typescript? I think not ;)
|
||||||
if (methodvalue["requestBody"] !== undefined) {
|
if (methodvalue["requestBody"] !== undefined) {
|
||||||
//console.log("Handle requestbody: ", methodvalue["requestBody"])
|
console.log("Handle requestbody: ", methodvalue["requestBody"])
|
||||||
if (methodvalue["requestBody"]["content"] !== undefined) {
|
if (methodvalue["requestBody"]["content"] !== undefined) {
|
||||||
if (
|
if (
|
||||||
methodvalue["requestBody"]["content"]["application/json"] !==
|
methodvalue["requestBody"]["content"]["application/json"] !==
|
||||||
undefined
|
undefined
|
||||||
) {
|
) {
|
||||||
newaction["headers"] =
|
//newaction["headers"] = ""
|
||||||
"Content-Type=application/json\nAccept=application/json";
|
//"Content-Type=application/json\nAccept=application/json";
|
||||||
if (
|
if (
|
||||||
methodvalue["requestBody"]["content"]["application/json"][
|
methodvalue["requestBody"]["content"]["application/json"][
|
||||||
"schema"
|
"schema"
|
||||||
@@ -733,8 +733,8 @@ const AppCreator = (props) => {
|
|||||||
undefined
|
undefined
|
||||||
) {
|
) {
|
||||||
console.log("METHOD XML: ", methodvalue);
|
console.log("METHOD XML: ", methodvalue);
|
||||||
newaction["headers"] =
|
//newaction["headers"] = ""
|
||||||
"Content-Type=application/xml\nAccept=application/xml";
|
//"Content-Type=application/xml\nAccept=application/xml";
|
||||||
if (
|
if (
|
||||||
methodvalue["requestBody"]["content"]["application/xml"][
|
methodvalue["requestBody"]["content"]["application/xml"][
|
||||||
"schema"
|
"schema"
|
||||||
@@ -772,7 +772,6 @@ const AppCreator = (props) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//console.log("REQUESTBODY: ", methodvalue["requestBody"]["content"])
|
|
||||||
if (
|
if (
|
||||||
methodvalue["requestBody"]["content"]["example"] !== undefined
|
methodvalue["requestBody"]["content"]["example"] !== undefined
|
||||||
) {
|
) {
|
||||||
@@ -787,7 +786,9 @@ const AppCreator = (props) => {
|
|||||||
];
|
];
|
||||||
//JSON.stringify(tmpobject, null, 2)
|
//JSON.stringify(tmpobject, null, 2)
|
||||||
}
|
}
|
||||||
} else if (
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
methodvalue["requestBody"]["content"][
|
methodvalue["requestBody"]["content"][
|
||||||
"multipart/form-data"
|
"multipart/form-data"
|
||||||
] !== undefined
|
] !== undefined
|
||||||
|
|||||||
Reference in New Issue
Block a user