MCPcopy Create free account
hub / github.com/EvilFreelancer/openapi-to-cli / loadDocument

Method loadDocument

src/openapi-loader.ts:69–77  ·  view source on GitHub ↗
(source: string, rawDocCache: Map<string, unknown>)

Source from the content-addressed store, hash-verified

67 }
68
69 private async loadDocument(source: string, rawDocCache: Map<string, unknown>): Promise<unknown> {
70 if (rawDocCache.has(source)) {
71 return rawDocCache.get(source);
72 }
73
74 const loaded = await this.loadFromSource(source);
75 rawDocCache.set(source, loaded);
76 return loaded;
77 }
78
79 private parseSpec(content: string | object, source: string): unknown {
80 if (typeof content !== "string") {

Callers 2

loadAndResolveSpecMethod · 0.95
resolveRefMethod · 0.95

Calls 1

loadFromSourceMethod · 0.95

Tested by

no test coverage detected