UNPKG

openapi-graph-core

Version:

A TS library to manage large API projects defined by OpenAPIv3 specification.

25 lines (24 loc) 1.04 kB
/** * The main goal is to find all openAPI specification given a path. * Therefore, it will loop over all files and creating a structured object * as a result * */ import { OpenAPIContent } from 'openapi-graph-types'; export declare function fetcher(paths: string[]): Promise<OpenAPIContent[]>; export declare function fetcher(path: string): Promise<OpenAPIContent[]>; /** * Finds all the valid OpenApi specifications given a directory and returns a * list of all the specification contents * * @param projectPath of the project where the specifications are suppose to be * @returns a list of OpenAPIContent which has the path, openAPI version * and the content for every specification found inside of the given path */ declare function loadsSwaggerFiles(projectPath: string): Promise<OpenAPIContent[]>; declare function getFiles(fromPath?: string, paths?: string[]): Promise<string[]>; export declare const testables: { loadsSwaggerFiles: typeof loadsSwaggerFiles; getFiles: typeof getFiles; }; export {};