MCPcopy Index your code
hub / github.com/ReAPI-com/mcp-openapi / extractSpecId

Method extractSpecId

src/core/SpecScanner.ts:228–230  ·  view source on GitHub ↗

* Extracts the spec ID from the spec object * @param spec - The parsed spec object * @param defaultId - Default ID to use if none is found in the spec * @returns The extracted spec ID

(spec: OpenAPIV3.Document, defaultId: string)

Source from the content-addressed store, hash-verified

226 * @returns The extracted spec ID
227 */
228 private extractSpecId(spec: OpenAPIV3.Document, defaultId: string): string {
229 return (spec.info as any)["x-spec-id"] || defaultId;
230 }
231}

Callers 1

processFileMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected