(url: string)
| 92 | } |
| 93 | |
| 94 | async function fetchFilesystemNoCache(url: string) { |
| 95 | console.log(url); |
| 96 | // Wrap the raw string to prevent invalid URLs from being passed to fetch. |
| 97 | // This can happen if the URL has whitespace, which is currently handled differently by Cloudflare's implementation of fetch: |
| 98 | // https://github.com/cloudflare/workerd/issues/1957 |
| 99 | const response = await fetch(new URL(url), { |
| 100 | ...noCacheFetchOptions, |
| 101 | cache: 'no-store', |
| 102 | }); |
| 103 | |
| 104 | if (!response.ok) { |
| 105 | throw new DataFetcherError('Failed to fetch OpenAPI file', response.status); |
| 106 | } |
| 107 | |
| 108 | const text = await response.text(); |
| 109 | const { filesystem } = await parseOpenAPI({ value: text, rootURL: url }); |
| 110 | const richFilesystem = await enrichFilesystem(filesystem); |
| 111 | |
| 112 | return richFilesystem; |
| 113 | } |
no test coverage detected
searching dependent graphs…