(value: unknown)
| 89 | } |
| 90 | |
| 91 | function isOpaqueSchemaNode(value: unknown): boolean { |
| 92 | const node = asSchemaNode(value) |
| 93 | if (!node) return false |
| 94 | // A schema node whose nested shape isn't enumerated. Any path beneath it |
| 95 | // is accepted because there's no declared structure to validate against. |
| 96 | // `object` / `json` with declared `properties` are walked via lookupField. |
| 97 | if (node.type === 'any') return true |
| 98 | if ((node.type === 'json' || node.type === 'object') && node.properties === undefined) { |
| 99 | return true |
| 100 | } |
| 101 | return false |
| 102 | } |
| 103 | |
| 104 | function isPathInSchema(schema: OutputSchema | undefined, pathParts: string[]): boolean { |
| 105 | if (!schema || pathParts.length === 0) { |
no test coverage detected