From 677d0b765987fb1bb2bd27d22d15c181df645b47 Mon Sep 17 00:00:00 2001 From: blam Date: Fri, 15 Nov 2024 16:20:49 -0700 Subject: [PATCH] chore: fixing issues with the build Signed-off-by: blam --- .../catalog-backend-module-openapi/src/lib/bundle.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/plugins/catalog-backend-module-openapi/src/lib/bundle.ts b/plugins/catalog-backend-module-openapi/src/lib/bundle.ts index 59f7e5791f..b2b186dff1 100644 --- a/plugins/catalog-backend-module-openapi/src/lib/bundle.ts +++ b/plugins/catalog-backend-module-openapi/src/lib/bundle.ts @@ -13,7 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import $RefParser from '@apidevtools/json-schema-ref-parser'; +import { + $RefParser, + ParserOptions, + ResolverOptions, +} from '@apidevtools/json-schema-ref-parser'; import { parse, stringify } from 'yaml'; import * as path from 'path'; @@ -36,7 +40,7 @@ export async function bundleFileWithRefs( read: BundlerRead, resolveUrl: BundlerResolveUrl, ): Promise { - const fileUrlReaderResolver: $RefParser.ResolverOptions = { + const fileUrlReaderResolver: ResolverOptions = { canRead: file => { const protocol = getProtocol(file.url); return protocol === undefined || protocol === 'file'; @@ -47,7 +51,7 @@ export async function bundleFileWithRefs( return await read(url); }, }; - const httpUrlReaderResolver: $RefParser.ResolverOptions = { + const httpUrlReaderResolver: ResolverOptions = { canRead: ref => { const protocol = getProtocol(ref.url); return protocol === 'http' || protocol === 'https'; @@ -58,7 +62,7 @@ export async function bundleFileWithRefs( }, }; - const options: $RefParser.Options = { + const options: ParserOptions = { resolve: { file: fileUrlReaderResolver, http: httpUrlReaderResolver,