diff --git a/packages/ui/src/ui-component/dialog/APICodeDialog.js b/packages/ui/src/ui-component/dialog/APICodeDialog.js index e59d9a3d5ba..bbb81190f35 100644 --- a/packages/ui/src/ui-component/dialog/APICodeDialog.js +++ b/packages/ui/src/ui-component/dialog/APICodeDialog.js @@ -113,7 +113,7 @@ const getConfigExamplesForCurl = (configData, bodyType) => { else if (config.type === 'number') exampleVal = `1` else if (config.name === 'files') exampleVal = `@/home/user1/Desktop/example${config.type}` finalStr += bodyType === 'json' ? `"${config.name}": ${exampleVal}` : `\n -F "${config.name}=${exampleVal}"` - if (i === loop - 1) finalStr += bodyType === 'json' ? ` }` : ` \\\n -F "question=Hey, how are you?"` + if (i === loop - 1) finalStr += bodyType === 'json' ? ` }` : ` \\\n -F "question": "Hey, how are you?"\n` else finalStr += bodyType === 'json' ? `, ` : ` \\` } return finalStr