(text: string)
| 294 | * negative just routes a spec through the whole-document parse. |
| 295 | */ |
| 296 | export const isStreamableSpec = (text: string): boolean => { |
| 297 | if (text.indexOf("\t") !== -1) return false; |
| 298 | // Anchors/aliases/merge keys: cheap substring rejects before structural work. |
| 299 | if (/(^|\s)[&*][A-Za-z0-9_]/m.test(text)) return false; |
| 300 | if (/<<\s*:/.test(text)) return false; |
| 301 | return /^paths:/m.test(text); |
| 302 | }; |
| 303 | |
| 304 | const SCHEMA_REF_PREFIX = "#/components/schemas/"; |
| 305 |
nothing calls this directly
no outgoing calls
no test coverage detected