@redocly/respect-core
Version:
API testing framework core
16 lines • 531 B
JavaScript
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