From a4a3a263a9292430b1409d5ebb1172430931664e Mon Sep 17 00:00:00 2001 From: PeteAudinate <99274874+PeteAudinate@users.noreply.github.com> Date: Mon, 16 Oct 2023 10:50:15 +0100 Subject: [PATCH] fix: downgrade AnyModel error to a warning (#1561) This is needed to prevent the asyncapi CLI from aborting when an AnyModel is encountered. --- src/helpers/CommonModelToMetaModel.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/CommonModelToMetaModel.ts b/src/helpers/CommonModelToMetaModel.ts index 9b08baa446..a1f46b2bc9 100644 --- a/src/helpers/CommonModelToMetaModel.ts +++ b/src/helpers/CommonModelToMetaModel.ts @@ -92,7 +92,7 @@ export function convertToMetaModel( if (booleanModel !== undefined) { return booleanModel; } - Logger.error('Failed to convert to MetaModel, defaulting to AnyModel'); + Logger.warn('Failed to convert to MetaModel, defaulting to AnyModel'); return new AnyModel(modelName, jsonSchemaModel.originalInput); } function isEnumModel(jsonSchemaModel: CommonModel): boolean {