(schema: AnyObjectSchema)
| 1514 | } |
| 1515 | |
| 1516 | function getMethodValue(schema: AnyObjectSchema): string { |
| 1517 | const shape = getObjectShape(schema); |
| 1518 | const methodSchema = shape?.method as AnySchema | undefined; |
| 1519 | if (!methodSchema) { |
| 1520 | throw new Error('Schema is missing a method literal'); |
| 1521 | } |
| 1522 | |
| 1523 | // Extract literal value - works for both v3 and v4 |
| 1524 | const value = getLiteralValue(methodSchema); |
| 1525 | if (typeof value === 'string') { |
| 1526 | return value; |
| 1527 | } |
| 1528 | |
| 1529 | throw new Error('Schema method literal must be a string'); |
| 1530 | } |
| 1531 | |
| 1532 | function createCompletionResult(suggestions: string[]): CompleteResult { |
| 1533 | return { |
no test coverage detected
searching dependent graphs…