Skip to content

Commit

Permalink
feat: remove messageId when converting to 3.0.0 (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
fmvilas authored Nov 7, 2023
1 parent 4571928 commit 63547e6
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 4 deletions.
1 change: 1 addition & 0 deletions src/third-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ function convertMessages(data: ConvertMessagesObjectData): Record<string, any>{
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 = {
Expand Down
2 changes: 0 additions & 2 deletions test/output/3.0.0/from-2.6.0-with-deep-local-references.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ channels:
subscribe.message.0:
$ref: '#/components/messages/turnOnOff'
customMessageId:
messageId: customMessageId
payload:
type: object
properties:
Expand Down Expand Up @@ -61,7 +60,6 @@ components:
subscribe.message.0:
$ref: '#/components/messages/turnOnOff'
customMessageId:
messageId: customMessageId
payload:
type: object
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ components:
subscribe.message.0:
$ref: '#/components/messages/turnOnOff'
customMessageId:
messageId: customMessageId
payload:
type: object
subscribe.message.2:
Expand Down
1 change: 0 additions & 1 deletion test/output/3.0.0/from-2.6.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ channels:
subscribe.message.0:
$ref: '#/components/messages/turnOnOff'
customMessageId:
messageId: customMessageId
payload:
type: object
subscribe.message.2:
Expand Down

0 comments on commit 63547e6

Please sign in to comment.