UNPKG

mcp-swagger-parser

Version:

Enterprise-grade OpenAPI/Swagger specification parser for Model Context Protocol (MCP) projects

27 lines 787 B
/** * Base parser class for OpenAPI specifications */ import type { OpenAPISpec } from '../types/index'; export declare abstract class BaseParser { /** * Parse OpenAPI specification from a source */ abstract parse(source: string, options?: any): Promise<OpenAPISpec>; /** * Detect format of the content */ protected detectFormat(content: string): 'json' | 'yaml'; /** * Parse JSON content */ protected parseJson(content: string): any; /** * Parse YAML content */ protected parseYaml(content: string): Promise<any>; /** * Validate basic OpenAPI structure (supports both OpenAPI 3.x and Swagger 2.0) */ protected validateBasicStructure(spec: any): void; } //# sourceMappingURL=base-parser.d.ts.map