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

docs: small social media system example #651

Merged
merged 14 commits into from
Dec 21, 2021
10 changes: 7 additions & 3 deletions examples/social-media/common/messages.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
commentLiked:
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:
commentChanged:
description: Message that is being sent when a comment have been updated.
payload:
$ref: './schemas.yaml#/commentChangedPayload'
$ref: './schemas.yaml#/commentChanged'
updateCommentLikes:
description: Message that is being sent when a comment have been updated.
payload:
$ref: './schemas.yaml#/updateCommentLikesPayload'
12 changes: 12 additions & 0 deletions examples/social-media/common/schemas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ likeCommentPayload:
allOf:
- $ref: '#/commentId'
- description: Id of the comment that should be liked
likedBy:
allOf:
- $ref: '#/commentId'
jonaslagoni marked this conversation as resolved.
Show resolved Hide resolved
- description: The id of the user that have liked the comment
commentChangedPayload:
type: object
title: commentChangedPayload
Expand All @@ -25,6 +29,9 @@ commentChangedPayload:
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
Expand All @@ -34,5 +41,10 @@ updateCommentLikesPayload:
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