From 63547e6d2b9ac633e4fe74a225a9db1871f576a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=20M=C3=A9ndez?= Date: Tue, 7 Nov 2023 11:33:39 +0100 Subject: [PATCH 1/2] feat: remove messageId when converting to 3.0.0 (#202) --- src/third-version.ts | 1 + test/output/3.0.0/from-2.6.0-with-deep-local-references.yml | 2 -- .../3.0.0/from-2.6.0-with-servers-and-channels-components.yml | 1 - test/output/3.0.0/from-2.6.0.yml | 1 - 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/third-version.ts b/src/third-version.ts index 406cdb21..b5d91153 100644 --- a/src/third-version.ts +++ b/src/third-version.ts @@ -325,6 +325,7 @@ function convertMessages(data: ConvertMessagesObjectData): Record{ const messages = {...data.messages}; // Convert schema formats to union schemas Object.entries(messages).forEach(([_, message]) => { + delete message.messageId; if(message.schemaFormat !== undefined) { const payloadSchema = message.payload; message.payload = { diff --git a/test/output/3.0.0/from-2.6.0-with-deep-local-references.yml b/test/output/3.0.0/from-2.6.0-with-deep-local-references.yml index aac96226..c01b937a 100644 --- a/test/output/3.0.0/from-2.6.0-with-deep-local-references.yml +++ b/test/output/3.0.0/from-2.6.0-with-deep-local-references.yml @@ -23,7 +23,6 @@ channels: subscribe.message.0: $ref: '#/components/messages/turnOnOff' customMessageId: - messageId: customMessageId payload: type: object properties: @@ -61,7 +60,6 @@ components: subscribe.message.0: $ref: '#/components/messages/turnOnOff' customMessageId: - messageId: customMessageId payload: type: object properties: diff --git a/test/output/3.0.0/from-2.6.0-with-servers-and-channels-components.yml b/test/output/3.0.0/from-2.6.0-with-servers-and-channels-components.yml index 5401a259..622eca88 100644 --- a/test/output/3.0.0/from-2.6.0-with-servers-and-channels-components.yml +++ b/test/output/3.0.0/from-2.6.0-with-servers-and-channels-components.yml @@ -94,7 +94,6 @@ components: subscribe.message.0: $ref: '#/components/messages/turnOnOff' customMessageId: - messageId: customMessageId payload: type: object subscribe.message.2: diff --git a/test/output/3.0.0/from-2.6.0.yml b/test/output/3.0.0/from-2.6.0.yml index 93cdabbb..3c97a876 100644 --- a/test/output/3.0.0/from-2.6.0.yml +++ b/test/output/3.0.0/from-2.6.0.yml @@ -96,7 +96,6 @@ channels: subscribe.message.0: $ref: '#/components/messages/turnOnOff' customMessageId: - messageId: customMessageId payload: type: object subscribe.message.2: From 7e91d4ccd858ba922ac9349ee2a93ef9a726dcac Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Tue, 7 Nov 2023 11:37:28 +0100 Subject: [PATCH 2/2] chore(release): v1.4.0 (#203) --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 936b7f56..9e302749 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@asyncapi/converter", - "version": "1.3.3", + "version": "1.4.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@asyncapi/converter", - "version": "1.3.3", + "version": "1.4.0", "license": "Apache-2.0", "dependencies": { "@asyncapi/parser": "^2.1.1", diff --git a/package.json b/package.json index f8467201..748ebb08 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/converter", - "version": "1.3.3", + "version": "1.4.0", "description": "Convert AsyncAPI documents from older to newer versions.", "main": "lib/index.js", "types": "lib/index.d.ts",