MCPcopy Create free account
hub / github.com/ReAPI-com/mcp-openapi / process

Method process

src/core/SpecProcessor.ts:21–29  ·  view source on GitHub ↗
(spec: OpenAPIV3.Document)

Source from the content-addressed store, hash-verified

19
20export class DefaultSpecProcessor implements ISpecProcessor {
21 async process(spec: OpenAPIV3.Document): Promise<OpenAPIV3.Document> {
22 // First dereference all $refs
23 const dereferencedSpec = (await $RefParser.dereference(spec, {
24 continueOnError: true,
25 })) as OpenAPIV3.Document;
26
27 // Then merge all allOf schemas
28 return this.mergeAllOfSchemas(dereferencedSpec);
29 }
30
31 /**
32 * Recursively traverses the OpenAPI spec and merges any allOf schemas found

Callers

nothing calls this directly

Calls 1

mergeAllOfSchemasMethod · 0.95

Tested by

no test coverage detected