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

Function readDocument

src/main/http/import/openapi.ts:61–69  ·  view source on GitHub ↗
(file: HttpImportFile, warnings: HttpImportWarning[])

Source from the content-addressed store, hash-verified

59}
60
61function readDocument(file: HttpImportFile, warnings: HttpImportWarning[]) {
62 try {
63 return yaml.load(file.content) as unknown
64 }
65 catch {
66 addWarning(warnings, file.name, 'Invalid OpenAPI file skipped')
67 return null
68 }
69}
70
71function isOpenApiDocument(raw: unknown): raw is UnknownRecord {
72 return (

Callers 1

parseOpenApiFilesFunction · 0.85

Calls 1

addWarningFunction · 0.90

Tested by

no test coverage detected