(files: HttpImportFile[])
| 614 | } |
| 615 | |
| 616 | export function parseOpenApiFiles(files: HttpImportFile[]): HttpImportResult { |
| 617 | const warnings: HttpImportWarning[] = [] |
| 618 | const collections: HttpImportCollection[] = [] |
| 619 | const environments: HttpImportEnvironment[] = [] |
| 620 | |
| 621 | for (const file of files) { |
| 622 | if (!isImportableFile(file)) |
| 623 | continue |
| 624 | |
| 625 | const raw = readDocument(file, warnings) |
| 626 | if (!isOpenApiDocument(raw)) |
| 627 | continue |
| 628 | |
| 629 | const result = parseOpenApiFile(file, raw, warnings) |
| 630 | if (result.collection) { |
| 631 | collections.push(result.collection) |
| 632 | } |
| 633 | if (result.environment) { |
| 634 | environments.push(result.environment) |
| 635 | } |
| 636 | } |
| 637 | |
| 638 | return { collections, environments, warnings } |
| 639 | } |
no test coverage detected