UNPKG

@redocly/respect-core

Version:
16 lines 531 B
import { bundle } from '@redocly/openapi-core'; export async function bundleOpenApi(options) { const { descriptionPath, externalRefResolver, base } = options; const bundled = await bundle({ base, ref: descriptionPath, config: options.config, dereference: true, externalRefResolver, }); if (!bundled) { throw new Error(`Could not find source description file '${descriptionPath}'.`); } return bundled.bundle.parsed; } //# sourceMappingURL=bundle-openapi.js.map