UNPKG

mcp-swagger-parser

Version:

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

47 lines 1.22 kB
/** * Version detection utilities for OpenAPI specifications */ /** * Supported OpenAPI/Swagger versions */ export type ApiSpecVersion = 'swagger2' | 'openapi3' | 'unknown'; /** * Version detection result */ export interface VersionDetectionResult { version: ApiSpecVersion; detectedVersion: string; isSwagger2: boolean; isOpenAPI3: boolean; isSupported: boolean; } /** * Version detector for OpenAPI/Swagger specifications */ export declare class VersionDetector { /** * Detect the version of an OpenAPI/Swagger specification */ static detect(spec: any): ApiSpecVersion; /** * Detect version with detailed information */ static detectDetailed(spec: any): VersionDetectionResult; /** * Check if a specification is Swagger 2.0 */ static isSwagger2(spec: any): boolean; /** * Check if a specification is OpenAPI 3.x */ static isOpenAPI3(spec: any): boolean; /** * Check if a specification is supported */ static isSupported(spec: any): boolean; /** * Get the version string from a specification */ static getVersionString(spec: any): string; } //# sourceMappingURL=version-detector.d.ts.map