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

Method loadAndResolveSpec

src/openapi-loader.ts:48–57  ·  view source on GitHub ↗
(source: string)

Source from the content-addressed store, hash-verified

46 }
47
48 private async loadAndResolveSpec(source: string): Promise<unknown> {
49 const rawDocCache = new Map<string, unknown>();
50 const root = await this.loadDocument(source, rawDocCache);
51 return this.resolveRefs(root, {
52 currentSource: source,
53 currentDocument: root,
54 rawDocCache,
55 resolvingRefs: new Set<string>(),
56 });
57 }
58
59 private async loadFromSource(source: string): Promise<unknown> {
60 if (source.startsWith("http://") || source.startsWith("https://")) {

Callers 1

loadSpecMethod · 0.95

Calls 2

loadDocumentMethod · 0.95
resolveRefsMethod · 0.95

Tested by

no test coverage detected