(operation: Operation, codeSample: CodeSample)
| 254 | } |
| 255 | |
| 256 | function getRequiredQueryParamsPath(operation: Operation, codeSample: CodeSample) { |
| 257 | const requiredQueryParams = new URLSearchParams() |
| 258 | for (const param of operation.parameters) { |
| 259 | if (param.in === 'query' && param.required === true) { |
| 260 | const codeExamples = codeSample.response?.example |
| 261 | const match = findMatchingQueryKey(codeExamples, param.name) |
| 262 | requiredQueryParams.append(param.name, match || param.name.toUpperCase()) |
| 263 | } |
| 264 | } |
| 265 | |
| 266 | return requiredQueryParams.toString() |
| 267 | } |
| 268 | |
| 269 | function getAcceptHeader(codeSample: CodeSample) { |
| 270 | // This allows us to display custom media types like application/sarif+json |
no test coverage detected