-
Notifications
You must be signed in to change notification settings - Fork 597
Update docs #11006
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
base: master
Are you sure you want to change the base?
Update docs #11006
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -129,44 +129,66 @@ Follow the instructions below to create a WebSocket API using the basic flow: | |||||
|
|
||||||
| ### Step 2 - Configure the Topics | ||||||
|
|
||||||
| Topics of a WebSocket API are always **Subscribe (sub) and Publish (pub)**, where the flow of events can be either from the server (backend) to the clients or from the client to the server. By default, the WebSocket API will have a topic with the name `/*`. | ||||||
| Topics of a WebSocket API represents the channels which support actions **Receive and Send**, where the flow of events can be either from the server (backend) to the clients or from the client to the server. | ||||||
|
|
||||||
| 1. Click **Topics** under **API Configurations** and navigate to the **Topics** page. | ||||||
|
|
||||||
| 2. By default, the newly created WebSocket API will have a topic with the name `/*`. | ||||||
|
|
||||||
| 2. Modify the topics as follows and click **Save** to update them. | ||||||
| <a href="{{base_path}}/assets/img/design/create-api/streaming-api/websocket-streaming-api-v3-topics.png"><img src="{{base_path}}/assets/img/design/create-api/streaming-api/websocket-streaming-api-v3-topics.png" width="80%" alt="WebSocket API Topics Page"></a> | ||||||
|
|
||||||
| 1. Optionally, click delete as shown below, to delete an existing topic. | ||||||
| 3. This default channel `/*` will have two default operations `send_/*` and `receive_/*` and are listed inside the respective action of the channel. | ||||||
|
|
||||||
| <a href="{{base_path}}/assets/img/design/create-api/streaming-api/websocket-streaming-api-delete-topic.png"><img src="{{base_path}}/assets/img/design/create-api/streaming-api/websocket-streaming-api-delete-topic.png" width="80%" alt="WebSocket API Delete Topic"></a> | ||||||
| <a href="{{base_path}}/assets/img/design/create-api/streaming-api/websocket-streaming-api-v3-operation.png"><img src="{{base_path}}/assets/img/design/create-api/streaming-api/websocket-streaming-api-v3-operation.png" width="80%" alt="WebSocket API Channel Operations"></a> | ||||||
|
|
||||||
| 2. Select the **Types**, enter the **Topic Name**, and click **+** as shown below, to add a new topic. | ||||||
| 4. Modify the topics as follows and click **Save** to update them. | ||||||
|
|
||||||
| <table><tr><td>Topic Name</td><td><code>/notifications</code></td> </tr></table> | ||||||
| 1. Optionally, click delete as shown below, to delete an existing topic or an operation. | ||||||
|
|
||||||
| <a href="{{base_path}}/assets/img/design/create-api/streaming-api/websocket-streaming-api-add-topic.png"><img src="{{base_path}}/assets/img/design/create-api/streaming-api/websocket-streaming-api-add-topic.png" width="80%" alt="WebSocket API Add Topic"></a> | ||||||
| <a href="{{base_path}}/assets/img/design/create-api/streaming-api/websocket-streaming-api-v3-delete-topic-operation.png"><img src="{{base_path}}/assets/img/design/create-api/streaming-api/websocket-streaming-api-v3-delete-topic-operation.png" width="80%" alt="WebSocket API Delete Topic"></a> | ||||||
|
|
||||||
| The newly added topic is displayed as follows. | ||||||
| 2. Select a **Type**, enter the **Address** of the channel to be created, enter the **Operation Name** to be added to the selected channel, and click **+** as shown below, to add a new topic. | ||||||
|
|
||||||
| <a href="{{base_path}}/assets/img/design/create-api/streaming-api/websocket-streaming-api-newly-added-topic.png"><img src="{{base_path}}/assets/img/design/create-api/streaming-api/websocket-streaming-api-newly-added-topic.png" width="80%" alt="WebSocket API Newly Added Topic"></a> | ||||||
| <table> | ||||||
| <tr><td>Channel Address</td><td><code>/notifications</code></td> </tr> | ||||||
| <tr><td>Operation Name</td><td><code>sendNotifications</code></td> </tr> | ||||||
| </table> | ||||||
|
|
||||||
| 3. Optionally, provide a URL Mapping to the topic. | ||||||
| <a href="{{base_path}}/assets/img/design/create-api/streaming-api/websocket-streaming-api-v3-add-channel.png"><img src="{{base_path}}/assets/img/design/create-api/streaming-api/websocket-streaming-api-v3-add-channel.png" width="80%" alt="WebSocket API Add Channel"></a> | ||||||
|
|
||||||
| The newly added topic is displayed as follows. Expand the topic to view the newly added operation. | ||||||
|
|
||||||
| <a href="{{base_path}}/assets/img/design/create-api/streaming-api/websocket-streaming-api-v3-new-channel.png"><img src="{{base_path}}/assets/img/design/create-api/streaming-api/websocket-streaming-api-v3-new-channel.png" width="80%" alt="WebSocket API Newly Added Topic"></a> | ||||||
|
|
||||||
| 3. You can also add a new operation to an existing topic by selecting the respective channel address from the dropdown. | ||||||
|
|
||||||
| <a href="{{base_path}}/assets/img/design/create-api/streaming-api/websocket-streaming-api-v3-add-operation.png"><img src="{{base_path}}/assets/img/design/create-api/streaming-api/websocket-streaming-api-v3-add-operation.png" width="80%" alt="WebSocket API Add Operation"></a> | ||||||
|
|
||||||
| Expand the topic to view the newly added operation. | ||||||
|
|
||||||
| <a href="{{base_path}}/assets/img/design/create-api/streaming-api/websocket-streaming-api-v3-new-operation.png"><img src="{{base_path}}/assets/img/design/create-api/streaming-api/websocket-streaming-api-v3-new-operation.png" width="80%" alt="WebSocket API Newly Added Operation"></a> | ||||||
|
|
||||||
| 4. Optionally, provide a URL Mapping to the topic. | ||||||
|
|
||||||
| The provided URL Mapping will be appended to the WebSocket endpoint URL that you provided when creating the API, and the traffic via this topic will be sent to the resulting URL. | ||||||
|
|
||||||
| Expand **both** PUB and SUB under the created topic, provide the same URL Mapping for both and click **Save**. | ||||||
| Expand **both** SEND and RECEIVE under the created topic, provide the same URL Mapping for both and click **Save**. | ||||||
|
|
||||||
| <table><tr><td> Description</td> <td>Chat room notifications</td> </tr> | ||||||
| <tr><td>URL Mapping</td> <td><code>/notifications</code></td> </tr></table> | ||||||
|
|
||||||
| <a href="{{base_path}}/assets/img/design/create-api/streaming-api/wesocket-streaming-api-add-topic-url-mapping.png"><img src="{{base_path}}/assets/img/design/create-api/streaming-api/wesocket-streaming-api-add-topic-url-mapping.png" width="80%" alt="WebSocket API Topic URL Mapping"></a> | ||||||
| <a href="{{base_path}}/assets/img/design/create-api/streaming-api/wesocket-streaming-api-v3-add-topic-url-mapping.png"><img src="{{base_path}}/assets/img/design/create-api/streaming-api/wesocket-streaming-api-v3-add-topic-url-mapping.png" width="80%" alt="WebSocket API Topic URL Mapping"></a> | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix probable broken screenshot path. Line 180 uses 🖼️ Proposed path fix-<a href="{{base_path}}/assets/img/design/create-api/streaming-api/wesocket-streaming-api-v3-add-topic-url-mapping.png"><img src="{{base_path}}/assets/img/design/create-api/streaming-api/wesocket-streaming-api-v3-add-topic-url-mapping.png" width="80%" alt="WebSocket API Topic URL Mapping"></a>
+<a href="{{base_path}}/assets/img/design/create-api/streaming-api/websocket-streaming-api-v3-add-topic-url-mapping.png"><img src="{{base_path}}/assets/img/design/create-api/streaming-api/websocket-streaming-api-v3-add-topic-url-mapping.png" width="80%" alt="WebSocket API Topic URL Mapping"></a>📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
|
|
||||||
| ### Step 3 - View the AsyncAPI Definition | ||||||
|
|
||||||
| Click **AsyncAPI Definition** under **API Configurations**. | ||||||
|
|
||||||
| !!! note | ||||||
| The API definition will be generated in AsyncAPI V3.0.0. | ||||||
|
|
||||||
| The AsyncAPI definition of the streaming API, which you just created, appears. | ||||||
|
|
||||||
| <a href="{{base_path}}/assets/img/design/create-api/streaming-api/websocket-streaming-api-asyncapi.png"><img src="{{base_path}}/assets/img/design/create-api/streaming-api/websocket-streaming-api-asyncapi.png" width="65%" alt="WebSocket API AsyncAPI Definition"></a> | ||||||
| <a href="{{base_path}}/assets/img/design/create-api/streaming-api/websocket-streaming-api-v3-asyncapi.png"><img src="{{base_path}}/assets/img/design/create-api/streaming-api/websocket-streaming-api-v3-asyncapi.png" width="65%" alt="WebSocket API AsyncAPI Definition"></a> | ||||||
|
|
||||||
| ### Step 4 - Configure the Runtime Configurations | ||||||
|
|
||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix source wording mismatch in Topics step.
Line 76 still says topics are created from the “provided URL”, but this walkthrough now uses file upload (Lines 40-42). Please make the sentence source-agnostic (e.g., “provided AsyncAPI definition”).
✏️ Proposed text fix
🤖 Prompt for AI Agents