mcp-openapi-schema-explorer
Version:
MCP OpenAPI schema explorer
27 lines (26 loc) • 1.06 kB
TypeScript
import { OpenAPIV3 } from 'openapi-types';
import { RenderableSpecObject, RenderContext, RenderResultItem } from './types.js';
/**
* Wraps an OpenAPIV3.PathsObject to make it renderable.
* Handles rendering the list of all paths and methods.
*/
export declare class RenderablePaths implements RenderableSpecObject {
private paths;
constructor(paths: OpenAPIV3.PathsObject | undefined);
/**
* Renders a token-efficient list of all paths and their methods.
* Corresponds to the `openapi://paths` URI.
*/
renderList(context: RenderContext): RenderResultItem[];
/**
* Renders the detail view. For the Paths object level, this isn't
* typically used directly. Details are requested per path or operation.
*/
renderDetail(context: RenderContext): RenderResultItem[];
/**
* Gets the PathItemObject for a specific path.
* @param path - The decoded path string.
* @returns The PathItemObject or undefined if not found.
*/
getPathItem(path: string): OpenAPIV3.PathItemObject | undefined;
}