#529: Fixed body to be part of patch, put, post
This commit is contained in:
@@ -1556,6 +1556,7 @@ const ParsedAction = (props) => {
|
|||||||
fullWidth
|
fullWidth
|
||||||
color="primary"
|
color="primary"
|
||||||
placeholder={selectedAction.label}
|
placeholder={selectedAction.label}
|
||||||
|
defaultValue={selectedAction.label}
|
||||||
onChange={selectedNameChange}
|
onChange={selectedNameChange}
|
||||||
onBlur={(e) => {
|
onBlur={(e) => {
|
||||||
const name = e.target.value
|
const name = e.target.value
|
||||||
|
|||||||
@@ -9248,11 +9248,11 @@ const AngularWorkflow = (props) => {
|
|||||||
<div style={{zIndex: 5000, position: "absolute", top: 20, right: 54, height: 50, width: 50,}}>
|
<div style={{zIndex: 5000, position: "absolute", top: 20, right: 54, height: 50, width: 50,}}>
|
||||||
{selectedApp.reference_info === undefined || selectedApp.reference_info === null || selectedApp.reference_info.github_url === undefined || selectedApp.reference_info.github_url === null || selectedApp.reference_info.github_url.length === 0 ?
|
{selectedApp.reference_info === undefined || selectedApp.reference_info === null || selectedApp.reference_info.github_url === undefined || selectedApp.reference_info.github_url === null || selectedApp.reference_info.github_url.length === 0 ?
|
||||||
<a rel="norefferer" target="_blank" href={"https://github.com/frikky/shuffle-apps"} style={{textDecoration: "none", color: "#f86a3e"}}>
|
<a rel="norefferer" target="_blank" href={"https://github.com/frikky/shuffle-apps"} style={{textDecoration: "none", color: "#f86a3e"}}>
|
||||||
<img alt={`Documentation image for ${selectedApp.name}`} src={selectedApp.large_image} style={{width: 30, height: 30, border: "2px solid rgba(255,255,255,0.6)", borderRadius: theme.palette.borderRadius,}} />
|
<img alt={`Documentation image for ${selectedApp.name}`} src={selectedApp.large_image} style={{width: 30, height: 30, border: "2px solid rgba(255,255,255,0.6)", borderRadius: theme.palette.borderRadius, maxHeight: 30, maxWidth: 30, overflow: "hidden", fontSize: 8, }} />
|
||||||
</a>
|
</a>
|
||||||
:
|
:
|
||||||
<a rel="norefferer" target="_blank" href={selectedApp.reference_info.github_url} style={{textDecoration: "none", color: "#f86a3e"}}>
|
<a rel="norefferer" target="_blank" href={selectedApp.reference_info.github_url} style={{textDecoration: "none", color: "#f86a3e"}}>
|
||||||
<img alt={`Documentation image for ${selectedApp.name}`} src={selectedApp.large_image} style={{width: 30, height: 30, border: "2px solid rgba(255,255,255,0.6)", borderRadius: theme.palette.borderRadius,}} />
|
<img alt={`Documentation image for ${selectedApp.name}`} src={selectedApp.large_image} style={{width: 30, height: 30, border: "2px solid rgba(255,255,255,0.6)", borderRadius: theme.palette.borderRadius, maxWidth: 30, maxHeight: 30, overflow: "hidden", fontSize: 8,}} />
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1262,7 +1262,7 @@ const AppCreator = (props) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.body !== undefined && item.body.length > 0) {
|
if (item.body !== undefined && item.body !== null && item.body.length > 0) {
|
||||||
const required = false
|
const required = false
|
||||||
newitem = {
|
newitem = {
|
||||||
"in": "body",
|
"in": "body",
|
||||||
@@ -1287,21 +1287,38 @@ const AppCreator = (props) => {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
data.paths[item.url][item.method.toLowerCase()].parameters.push(newitem)
|
||||||
|
} else if (actionBodyRequest.includes(item.method.toUpperCase())) {
|
||||||
|
// Appending an empty field
|
||||||
|
const required = false
|
||||||
|
newitem = {
|
||||||
|
"in": "body",
|
||||||
|
"name": "body",
|
||||||
|
"multiline": true,
|
||||||
|
"description": "Generated by shuffler.io OpenAPI",
|
||||||
|
"required": required,
|
||||||
|
"example": "",
|
||||||
|
"schema": {
|
||||||
|
"type": "string",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// FIXME - add application/json if JSON example?
|
||||||
data.paths[item.url][item.method.toLowerCase()]["requestBody"] = {
|
data.paths[item.url][item.method.toLowerCase()]["requestBody"] = {
|
||||||
"description": "Generated by Shuffler.io",
|
"description": "Generated by Shuffler.io",
|
||||||
"required": required,
|
"required": required,
|
||||||
"content": {
|
"content": {
|
||||||
"example": {
|
"example": {
|
||||||
"example": item.body,
|
"example": "",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
data.paths[item.url][item.method.toLowerCase()].parameters.push(newitem)
|
data.paths[item.url][item.method.toLowerCase()].parameters.push(newitem)
|
||||||
|
} else {
|
||||||
|
console.log("Nothing to append?")
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://swagger.io/docs/specification/describing-request-body/file-upload/
|
// https://swagger.io/docs/specification/describing-request-body/file-upload/
|
||||||
if (item.file_field !== undefined && item.file_field !== null && item.file_field.length > 0) {
|
if (item.file_field !== undefined && item.file_field !== null && item.file_field.length > 0) {
|
||||||
console.log("HANDLE FILEFIELD SAVE: ", item.file_field)
|
console.log("HANDLE FILEFIELD SAVE: ", item.file_field)
|
||||||
|
|||||||
Reference in New Issue
Block a user