Skip to content

Commit 73cbcc8

Browse files
authored
REST examples: update to -F for non string arrays (#44540)
1 parent 79ccbd6 commit 73cbcc8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rest/components/get-rest-code-samples.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export function getGHExample(operation: Operation, codeSample: CodeSample) {
155155
} else if (Array.isArray(codeSample.request.bodyParameters[key])) {
156156
let cliLine = ''
157157
for (const value of codeSample.request.bodyParameters[key]) {
158-
cliLine += `-f "${key}[]=${value}" `
158+
cliLine += `${typeof value === 'string' ? '-f' : '-F'} "${key}[]=${value}" `
159159
}
160160
return cliLine
161161
} else {

0 commit comments

Comments
 (0)