forked from asyncapi/bundler
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
345 additions
and
223 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
example/example-data/social-media/comments-service/main.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
asyncapi: 3.0.0 | ||
info: | ||
title: Comments Service | ||
version: 1.0.0 | ||
description: This service is in charge of processing all the events related to comments. | ||
servers: | ||
mosquitto: | ||
host: test.mosquitto.org | ||
protocol: mqtt | ||
tags: | ||
- name: 'env:production' | ||
description: This environment is meant for production use case | ||
- name: 'kind:remote' | ||
description: This server is a remote server. Not exposed by the application | ||
- name: 'visibility:public' | ||
description: This resource is public and available to everyone | ||
bindings: | ||
mqtt: | ||
clientId: comment-service | ||
channels: | ||
commentLiked: | ||
address: comment/liked | ||
messages: | ||
commentLiked: | ||
$ref: '../common/messages.yaml#/commentLiked' | ||
description: >- | ||
Updates the likes count in the database and sends the new count to the | ||
broker. | ||
commentCountChange: | ||
address: 'comment/{commentId}/changed' | ||
messages: | ||
commentChanged: | ||
$ref: '../common/messages.yaml#/commentChanged' | ||
description: >- | ||
Sends the new count to the broker after it has been updated in the | ||
database. | ||
parameters: | ||
commentId: | ||
$ref: '../common/parameters.yaml#/commentId' | ||
operations: | ||
receiveCommentLiked: | ||
action: receive | ||
channel: | ||
$ref: '#/channels/commentLiked' | ||
messages: | ||
- $ref: '#/channels/commentLiked/messages/commentLiked' | ||
sendCommentChange: | ||
action: send | ||
channel: | ||
$ref: '#/channels/commentCountChange' | ||
messages: | ||
- $ref: '#/channels/commentCountChange/messages/commentChanged' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
commentLiked: | ||
description: Message that is being sent when a comment has been liked by someone. | ||
payload: | ||
$ref: './schemas.yaml#/commentLikedPayload' | ||
likeComment: | ||
description: Message that is being sent when someone wants to like a comment. | ||
payload: | ||
$ref: './schemas.yaml#/likeCommentPayload' | ||
commentChanged: | ||
description: Message that is being sent when a comment have been updated. | ||
payload: | ||
$ref: './schemas.yaml#/commentChangedPayload' | ||
updateCommentLikes: | ||
description: Message that is being sent when a comment have been updated. | ||
payload: | ||
$ref: './schemas.yaml#/updateCommentLikesPayload' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
commentId: | ||
description: ID of the comment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
commentLikedPayload: | ||
type: object | ||
title: commentLikedPayload | ||
additionalProperties: false | ||
properties: | ||
commentId: | ||
allOf: | ||
- $ref: '#/commentId' | ||
- description: Id of the comment that was liked | ||
likeCommentPayload: | ||
type: object | ||
title: likeCommentPayload | ||
additionalProperties: false | ||
properties: | ||
commentId: | ||
allOf: | ||
- $ref: '#/commentId' | ||
- description: Id of the comment that should be liked | ||
likedBy: | ||
allOf: | ||
- $ref: '#/userId' | ||
- description: The id of the user that have liked the comment | ||
commentChangedPayload: | ||
type: object | ||
title: commentChangedPayload | ||
additionalProperties: false | ||
properties: | ||
commentId: | ||
allOf: | ||
- $ref: '#/commentId' | ||
- description: Id of the comment that was changed, such as when someone liked it. | ||
likeCount: | ||
type: integer | ||
description: The new like count of how many have liked the comment. | ||
updateCommentLikesPayload: | ||
type: object | ||
title: updateCommentLikesPayload | ||
additionalProperties: false | ||
properties: | ||
commentId: | ||
allOf: | ||
- $ref: '#/commentId' | ||
- description: Id of the comment that was changed, such as when someone liked it. | ||
likeCount: | ||
type: integer | ||
description: The new like count of how many have liked the comment. | ||
commentId: | ||
type: string | ||
userId: | ||
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
websiteWebSocketServer: | ||
host: mycompany.com | ||
pathname: /ws | ||
protocol: ws |
Oops, something went wrong.