UNPKG

@paultaku/node-mock-server

Version:

A TypeScript-based mock server with automatic Swagger-based mock file generation

33 lines 1.17 kB
/** * Swagger Parser * * Parses and validates Swagger/OpenAPI specification files. * Handles YAML parsing and schema validation. */ import { SwaggerDoc } from "../../shared/types/swagger-types"; /** * Parse a Swagger/OpenAPI specification file * @param swaggerPath - Path to the Swagger YAML file * @returns Parsed and validated Swagger document */ export declare function parseSwaggerSpec(swaggerPath: string): Promise<SwaggerDoc>; /** * Get all paths from a Swagger document * @param swagger - Parsed Swagger document * @returns Array of API paths */ export declare function getSwaggerPaths(swagger: SwaggerDoc): string[]; /** * Get methods for a specific path * @param swagger - Parsed Swagger document * @param apiPath - API path to query * @returns Object containing method definitions */ export declare function getPathMethods(swagger: SwaggerDoc, apiPath: string): Record<string, any>; /** * Get components (schemas, responses, etc.) from Swagger document * @param swagger - Parsed Swagger document * @returns Components object */ export declare function getComponents(swagger: SwaggerDoc): any; //# sourceMappingURL=swagger-parser.d.ts.map