Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: message example issue in migration guide #3673

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions markdown/docs/migration/migrating-to-v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ operations:
```

## Messages instead of message
In v2, channels were defined with one or more messages using the `oneOf` property.
In v2, channels were defined with one or more messages through the operation using the `oneOf` property.

In v3, messages are defined using the [Messages Object](https://www.asyncapi.com/docs/reference/specification/v3.0.0#messagesObject). For a channel with multiple messages, you specify multiple key-value pairs. For a channel with just one message, you use a single key-value pair.

Expand All @@ -201,20 +201,24 @@ asyncapi: 2.6.0
...
channels:
user/signedup:
message:
oneOf:
- messageId: UserMessage
...
- messageId: UserMessage2
...
publish:
...
message:
oneOf:
- messageId: UserMessage
...
- messageId: UserMessage2
...

asyncapi: 2.6.0
...
channels:
user/signedup:
message:
messageId: UserMessage
publish
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix syntax error in v2 example code.

The publish keyword is missing a colon in the v2 example.

Apply this diff to fix the syntax:

-    publish
+    publish:
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
publish
publish:

...
message:
messageId: UserMessage
...
```

```yml
Expand Down
Loading