Function
applyStatus
(schema: string, status: number, target: "success" | "error")
Source from the content-addressed store, hash-verified
| 523 | } |
| 524 | |
| 525 | const applyStatus = (schema: string, status: number, target: "success" | "error"): string => { |
| 526 | if ((target === "success" && status === 200) || (target === "error" && status === 500)) { |
| 527 | return schema |
| 528 | } |
| 529 | return `${schema}.pipe(HttpApiSchema.status(${status}))` |
| 530 | } |
| 531 | |
| 532 | const methodSupportsBody = (method: ParsedOperation["method"]): boolean => |
| 533 | method !== "get" && method !== "head" && method !== "options" && method !== "trace" |
Tested by
no test coverage detected