#529: Fixed body to be part of patch, put, post
This commit is contained in:
@@ -1556,6 +1556,7 @@ const ParsedAction = (props) => {
|
||||
fullWidth
|
||||
color="primary"
|
||||
placeholder={selectedAction.label}
|
||||
defaultValue={selectedAction.label}
|
||||
onChange={selectedNameChange}
|
||||
onBlur={(e) => {
|
||||
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,}}>
|
||||
{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"}}>
|
||||
<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 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>
|
||||
}
|
||||
</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
|
||||
newitem = {
|
||||
"in": "body",
|
||||
@@ -1287,19 +1287,36 @@ 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"] = {
|
||||
"description": "Generated by Shuffler.io",
|
||||
"required": required,
|
||||
"content": {
|
||||
"example": {
|
||||
"example": item.body,
|
||||
"example": "",
|
||||
},
|
||||
},
|
||||
}
|
||||
*/
|
||||
|
||||
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/
|
||||
|
||||
Reference in New Issue
Block a user