Skip to content

Commit

Permalink
Merge branch 'master' into fix_parameter_schema_ref
Browse files Browse the repository at this point in the history
  • Loading branch information
derberg authored Nov 7, 2023
2 parents 8d455b3 + 7e91d4c commit d21dfe4
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
1 change: 1 addition & 0 deletions src/third-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,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 d21dfe4

Please sign in to comment.