UNPKG

openapi-graph-core

Version:

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

19 lines (18 loc) 714 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.OpenAPIGraphs = void 0; const _1 = require("."); const utils_1 = require("../utils"); const utils_2 = require("../utils"); const OpenAPIGraphs = class OpenAPIGraphsImpl { constructor(rootPath, options = utils_2.defaultOpenAPIGraphLibConfig) { this.rootPath = rootPath; utils_2.setOpenAPIGraphLibConfig({ ...utils_2.openAPIGraphLibConfig, ...options }); } async build() { const apis = await utils_1.fetcher(this.rootPath); utils_2.log(`Found ${apis.length} openAPI definitions`); this.builder = new _1.OpenAPIGraphsBuilder(apis); } }; exports.OpenAPIGraphs = OpenAPIGraphs;