MCPcopy Index your code
hub / github.com/massCodeIO/massCode / parseOpenApiFiles

Function parseOpenApiFiles

src/main/http/import/openapi.ts:616–639  ·  view source on GitHub ↗
(files: HttpImportFile[])

Source from the content-addressed store, hash-verified

614}
615
616export 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}

Callers 2

parseHttpImportFilesFunction · 0.90
openapi.test.tsFile · 0.90

Calls 4

isImportableFileFunction · 0.85
readDocumentFunction · 0.85
parseOpenApiFileFunction · 0.85
isOpenApiDocumentFunction · 0.70

Tested by

no test coverage detected