openapi-graph-core
Version:
A TS library to manage large API projects defined by OpenAPIv3 specification.
32 lines (31 loc) • 1.16 kB
TypeScript
import { EdgesRefDict, Nodes, OpenAPIGraphsBuilderInterface, SchemaNodeInterface } from 'openapi-graph-types';
import { OpenAPIV3 } from 'openapi-types';
export declare function getDefinedSchemasNodes(api: OpenAPIV3.Document): {
[key: string]: SchemaNodeInterface;
};
/**
* It will find all the schemas defined in the specification
*
* @param api source
* @param fn callback which will be executed for every node
*/
export declare function getInlineSchemasNodes(json: any, currentIndex?: number, nodes?: {
[key: string]: SchemaNodeInterface;
}): {
[key: string]: SchemaNodeInterface;
};
export declare function getSchemaNodes(api: OpenAPIV3.Document): Nodes['schemas'];
/**
* It will find all the references defined in the specification
*
* @param api source
* @param fn callback which will be executed for every node
*/
export declare function getRefEdges(json: any, absolutePath: string, edges?: EdgesRefDict): EdgesRefDict;
/**
* Sets the edges' child value
* @param graphs
* @param refs
* @returns
*/
export declare function resolveReference(graphs: OpenAPIGraphsBuilderInterface['graphs'], refs: EdgesRefDict): EdgesRefDict;