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: