openapi-route-expander
Version:
A utility for resolving $ref in OpenAPI YAML routes, generating new YAML files without $ref, ready for OpenAPI processing.
7 lines (6 loc) • 611 B
TypeScript
export declare function extractFileName(filePath: string): string;
export declare function replaceRelativeToAbsolutePath<T extends Record<string, unknown>>(json: T, basePath: string, fileName: string): T;
export declare function fixTrailingSlash<T extends Record<string, unknown>>(paths: T): T;
export declare function mergeNestedPaths<T extends Record<string, unknown>>(paths: T, filePath: string, pathPrefix?: string): T;
export declare function fixOpenApiAbsoluteRoute<T extends Record<string, unknown>>(json: T, basePath: string): T;
export declare function fixOpenApiYamlStringIssue(yaml: string): string;