| 582 | // --------------------------------------------------------------------------- |
| 583 | |
| 584 | const streamedCandidate = (op: StreamedPreviewOperation): HealthCheckCandidate => { |
| 585 | const method = op.method.toLowerCase(); |
| 586 | const parameters = [ |
| 587 | ...op.parameters, |
| 588 | ...(op.requestBodyRequired === undefined |
| 589 | ? [] |
| 590 | : [{ name: "body", location: "body", required: op.requestBodyRequired }]), |
| 591 | ]; |
| 592 | return { |
| 593 | operation: op.toolPath, |
| 594 | method, |
| 595 | requiredArgCount: parameters.filter((parameter) => parameter.required).length, |
| 596 | destructive: DESTRUCTIVE_METHODS.has(method), |
| 597 | summary: op.summary ?? op.description ?? `${method.toUpperCase()} ${op.pathTemplate}`, |
| 598 | ...(parameters.length > 0 ? { parameters } : {}), |
| 599 | }; |
| 600 | }; |
| 601 | |
| 602 | /** |
| 603 | * Streaming twin of `previewSpecText` for spec-format selections (Microsoft |