openapi: 3.0.3 info: version: v1.0.3 title: LE-KO Groups license: name: private url: https://le-ko.deggex.com contact: email: denis@deggex.awsapps.com description: LE-KO Groups servers: - url: https://groups-{env}.le-ko.deggex.com/{basePath} description: Groups endpoint variables: basePath: default: v1 env: default: dev security: - bearerHttpAuthentication: [] tags: - name: groups description: Groups paths: /groups: post: operationId: groupsCreate summary: Create a new group description: ✨ Create a new group tags: - groups parameters: - $ref: '#/components/parameters/CurrentUserId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateRequest' responses: '201': description: Group created content: application/json: schema: $ref: '#/components/schemas/CreateResponse' '400': $ref: '#/components/responses/400' get: operationId: groupsGet summary: Get groups description: ✨ Get groups tags: - groups parameters: - $ref: '#/components/parameters/CurrentUserId' - $ref: '#/components/parameters/GroupName' - $ref: '#/components/parameters/SportId' - $ref: '#/components/parameters/Address' - $ref: '#/components/parameters/MyGroups' - $ref: '#/components/parameters/isFollowing' - name: lat in: query required: false schema: type: number format: double minimum: -90 maximum: 90 - name: lng in: query required: false schema: type: number format: double minimum: -180 maximum: 180 - $ref: '#/components/parameters/isPopular' responses: '200': description: Groups have been found content: application/json: schema: type: array items: $ref: '#/components/schemas/Group' '400': $ref: '#/components/responses/400' /groups/{groupId}: put: operationId: groupsUpdate summary: Update a group description: ✨ Update a group tags: - groups parameters: - $ref: '#/components/parameters/CurrentUserId' - $ref: '#/components/parameters/GroupId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateRequest' responses: '200': description: Group has been updated content: application/json: schema: $ref: '#/components/schemas/Group' '400': $ref: '#/components/responses/400' '403': $ref: '#/components/responses/403' get: operationId: groupsGetOne summary: Get a group description: ✨ Get a group tags: - groups parameters: - $ref: '#/components/parameters/CurrentUserId' - $ref: '#/components/parameters/GroupId' responses: '200': description: Group has been found content: application/json: schema: $ref: '#/components/schemas/Group' '404': $ref: '#/components/responses/404' delete: operationId: groupsDelete summary: Delete a group description: ✨ Delete a group tags: - groups parameters: - $ref: '#/components/parameters/CurrentUserId' - $ref: '#/components/parameters/GroupId' responses: '204': description: Group has been deleted '400': $ref: '#/components/responses/400' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' /groups/{groupId}/follow: post: operationId: groupsFollow summary: Follow a group description: ✨ Follow a group tags: - groups parameters: - $ref: '#/components/parameters/CurrentUserId' - $ref: '#/components/parameters/GroupId' responses: '204': description: Group has been followed '400': $ref: '#/components/responses/400' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' /groups/{groupId}/unfollow: post: operationId: groupsUnfollow summary: Unfollow a group description: ✨ Unfollow a group tags: - groups parameters: - $ref: '#/components/parameters/CurrentUserId' - $ref: '#/components/parameters/GroupId' responses: '204': description: Group has been unfollowed '400': $ref: '#/components/responses/400' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' /groups/{groupId}/participants: get: operationId: groupsParticipantsGet summary: Get participants of a group description: ✨ Get participants of a group tags: - participants parameters: - $ref: '#/components/parameters/CurrentUserId' - $ref: '#/components/parameters/GroupId' - $ref: '#/components/parameters/Muted' responses: '200': description: Participants have been found content: application/json: schema: type: array items: $ref: '#/components/schemas/ParticipantInfo' '400': $ref: '#/components/responses/400' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' /groups/{groupId}/participants/{participantId}/remove: post: operationId: groupsParticipantsRemove summary: Remove a participant from a group description: ✨ Remove a participant from a group tags: - participants parameters: - $ref: '#/components/parameters/CurrentUserId' - $ref: '#/components/parameters/GroupId' - $ref: '#/components/parameters/ParticipantId' responses: '204': description: Participant has been removed '400': $ref: '#/components/responses/400' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' /groups/{groupId}/posts: post: operationId: groupsPost summary: Create a new post description: ✨ Create a new post tags: - posts parameters: - $ref: '#/components/parameters/CurrentUserId' - $ref: '#/components/parameters/GroupId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreatePostRequest' responses: '201': description: Post has been created content: application/json: schema: $ref: '#/components/schemas/CreatePostResponse' '400': $ref: '#/components/responses/400' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' /groups/{groupId}/posts/{postId}: put: operationId: groupsPostUpdate summary: Update a post description: ✨ Update a post tags: - posts parameters: - $ref: '#/components/parameters/CurrentUserId' - $ref: '#/components/parameters/GroupId' - $ref: '#/components/parameters/PostId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdatePostRequest' responses: '204': description: Post has been updated '400': $ref: '#/components/responses/400' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' delete: operationId: groupsPostDelete summary: Delete a post description: ✨ Delete a post tags: - posts parameters: - $ref: '#/components/parameters/CurrentUserId' - $ref: '#/components/parameters/GroupId' - $ref: '#/components/parameters/PostId' responses: '204': description: Post deleted '400': $ref: '#/components/responses/400' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' get: operationId: groupsPostGet summary: Get a post description: ✨ Get a post tags: - posts parameters: - $ref: '#/components/parameters/CurrentUserId' - $ref: '#/components/parameters/GroupId' - $ref: '#/components/parameters/PostId' responses: '200': description: Post retrieved content: application/json: schema: $ref: '#/components/schemas/Post' '400': $ref: '#/components/responses/400' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' /groups/{groupId}/feed: get: operationId: groupsFeed summary: Get a group feed description: ✨ Get a group feed tags: - groups parameters: - $ref: '#/components/parameters/CurrentUserId' - $ref: '#/components/parameters/GroupId' - $ref: '#/components/parameters/ParamPage' - $ref: '#/components/parameters/Limit' responses: '200': description: List of Group Posts content: application/json: schema: $ref: '#/components/schemas/PostsPage' '400': $ref: '#/components/responses/400' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' /groups/{groupId}/posts/suggested: get: operationId: groupsPostsSuggested summary: Get suggested posts description: ✨ Get suggested posts tags: - posts parameters: - $ref: '#/components/parameters/CurrentUserId' - $ref: '#/components/parameters/GroupId' responses: '200': description: Posts have been found content: application/json: schema: type: array items: $ref: '#/components/schemas/Post' '400': $ref: '#/components/responses/400' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' /groups/{groupId}/posts/{postId}/suggest: post: operationId: groupsPostsSuggest summary: Suggest a post description: ✨ Suggest a post tags: - posts parameters: - $ref: '#/components/parameters/CurrentUserId' - $ref: '#/components/parameters/GroupId' - $ref: '#/components/parameters/PostId' responses: '204': description: Post has been suggested '400': $ref: '#/components/responses/400' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' /groups/{groupId}/participants/{participantId}/mute: post: operationId: groupsParticipantsMute summary: Mute a participant description: ✨ Mute a participant tags: - participants parameters: - $ref: '#/components/parameters/CurrentUserId' - $ref: '#/components/parameters/GroupId' - $ref: '#/components/parameters/ParticipantId' responses: '204': description: Participant has been muted '400': $ref: '#/components/responses/400' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' /groups/{groupId}/participants/{participantId}/unmute: post: operationId: groupsParticipantsUnmute summary: Unmute a participant description: ✨ Unmute a participant tags: - participants parameters: - $ref: '#/components/parameters/CurrentUserId' - $ref: '#/components/parameters/GroupId' - $ref: '#/components/parameters/ParticipantId' responses: '204': description: Participant has been unmuted '400': $ref: '#/components/responses/400' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' /groups/{groupId}/posts/{postId}/likes: get: operationId: getAllPostLikes summary: .../groups/{groupId}/posts/{postId}/likes description: ✨ Get Post Likes tags: - likes parameters: - $ref: '#/components/parameters/CurrentUserId' - $ref: '#/components/parameters/GroupId' - $ref: '#/components/parameters/PostId' - $ref: '#/components/parameters/ParamPage' - $ref: '#/components/parameters/Limit' responses: '200': description: Post Likes content: application/json: schema: $ref: '#/components/schemas/LikesPage' '400': $ref: '#/components/responses/400' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' /groups/{groupId}/posts/{postId}/like: put: operationId: groupsPostLike summary: .../groups/{groupId}/posts/{postId}/like description: ✨ Post like toggling tags: - likes parameters: - $ref: '#/components/parameters/CurrentUserId' - $ref: '#/components/parameters/GroupId' - $ref: '#/components/parameters/PostId' responses: '200': description: Post Like has been changed content: application/json: schema: $ref: '#/components/schemas/Like' '400': $ref: '#/components/responses/400' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' /groups/{groupId}/posts/{postId}/comments: get: summary: .../groups/{groupId}/posts/{postId}/comments operationId: getAllComments description: ✨ Comments of specific Post. tags: - comments parameters: - $ref: '#/components/parameters/CurrentUserId' - $ref: '#/components/parameters/GroupId' - $ref: '#/components/parameters/PostId' - $ref: '#/components/parameters/ParamPage' - $ref: '#/components/parameters/Limit' responses: '200': description: Post Comments content: application/json: schema: $ref: '#/components/schemas/CommentsPage' '400': $ref: '#/components/responses/400' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' post: summary: .../groups/{groupId}/posts/{postId}/comments operationId: createComment description: ✨ Create new Post Comment. tags: - comments parameters: - $ref: '#/components/parameters/CurrentUserId' - $ref: '#/components/parameters/GroupId' - $ref: '#/components/parameters/PostId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateComment' responses: '201': description: Post Comment has been created content: application/json: schema: $ref: '#/components/schemas/CreateCommentResponse' '400': $ref: '#/components/responses/400' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' /groups/{groupId}/posts/{postId}/comments/{commentId}: get: summary: .../groups/{groupId}/posts/{postId}/comments/{commentId} operationId: getCommentById description: ✨ Get Post Comment. tags: - comments parameters: - $ref: '#/components/parameters/CurrentUserId' - $ref: '#/components/parameters/GroupId' - $ref: '#/components/parameters/PostId' - $ref: '#/components/parameters/CommentId' responses: '200': description: Post Comment details content: application/json: schema: $ref: '#/components/schemas/Comment' '400': $ref: '#/components/responses/400' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' put: summary: .../groups/{groupId}/posts/{postId}/comments/{commentId} operationId: updateComment description: ✨ Update Post Comment tags: - comments parameters: - $ref: '#/components/parameters/CurrentUserId' - $ref: '#/components/parameters/GroupId' - $ref: '#/components/parameters/PostId' - $ref: '#/components/parameters/CommentId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateComment' responses: '204': description: Post Comment has been deleted '400': $ref: '#/components/responses/400' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' delete: summary: .../comments/{id} operationId: deleteComment description: ✨ Delete Post Comment. tags: - comments parameters: - $ref: '#/components/parameters/CurrentUserId' - $ref: '#/components/parameters/GroupId' - $ref: '#/components/parameters/PostId' - $ref: '#/components/parameters/CommentId' responses: '204': description: Post Comment has been deleted '400': $ref: '#/components/responses/400' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' /groups/{groupId}/posts/{postId}/comments/{commentId}/likes: get: summary: .../groups/{groupId}/posts/{postId}/comments/{commentId}/likes operationId: getAllCommentLikes description: ✨ Get Comment Likes tags: - comments parameters: - $ref: '#/components/parameters/CurrentUserId' - $ref: '#/components/parameters/GroupId' - $ref: '#/components/parameters/PostId' - $ref: '#/components/parameters/CommentId' - $ref: '#/components/parameters/ParamPage' - $ref: '#/components/parameters/Limit' responses: '200': description: Comment Likes content: application/json: schema: $ref: '#/components/schemas/LikesPage' '400': $ref: '#/components/responses/400' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' /groups/{groupId}/posts/{postId}/comments/{commentId}/like: put: summary: .../groups/{groupId}/posts/{postId}/comments/{commentId}/like operationId: toggleCommentLike description: ✨ Comment like toggling tags: - comments parameters: - $ref: '#/components/parameters/CurrentUserId' - $ref: '#/components/parameters/GroupId' - $ref: '#/components/parameters/PostId' - $ref: '#/components/parameters/CommentId' responses: '200': description: Comment Like has been changed content: application/json: schema: $ref: '#/components/schemas/Like' '400': $ref: '#/components/responses/400' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' /users: delete: tags: - groups summary: Delete user data from groups description: | ✨ Deletes all user-related data from the groups system including: - User's group memberships - User's posts and comments - User's likes and interactions - User's group creation history If userId parameter is provided, deletes the specified user (admin only). If userId is not provided, deletes the current user (from x-current-user-id header). operationId: deleteUserFromGroups parameters: - $ref: '#/components/parameters/CurrentUserId' - $ref: '#/components/parameters/UserId' responses: '204': description: User data successfully deleted '400': $ref: '#/components/responses/400' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' security: - bearerHttpAuthentication: [] /users/deletion/check: get: tags: - groups summary: Check if user deletion is available operationId: userDeletionCheck parameters: - $ref: '#/components/parameters/CurrentUserId' - $ref: '#/components/parameters/UserId' responses: '204': description: User deletion is available '400': $ref: '#/components/responses/400' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' security: - bearerHttpAuthentication: [] components: securitySchemes: bearerHttpAuthentication: description: Bearer token using a JWT type: http scheme: bearer bearerFormat: JWT parameters: CurrentUserId: name: x-current-user-id in: header required: true description: Current user ID for authentication and authorization schema: type: string format: uuid example: 4b72d209-debd-45e1-93cc-7640bf7d39bf GroupName: name: groupName in: query required: false schema: $ref: '#/components/schemas/GroupName' SportId: name: sportId in: query required: false schema: $ref: '#/components/schemas/SportId' Address: name: address in: query required: false schema: $ref: '#/components/schemas/Address' MyGroups: name: myGroups in: query required: false schema: type: boolean isFollowing: name: isFollowing in: query required: false schema: type: boolean isPopular: name: isPopular in: query required: false schema: type: boolean GroupId: name: groupId in: path required: true schema: $ref: '#/components/schemas/GroupId' Muted: name: isMuted in: query required: false schema: type: boolean ParticipantId: name: participantId in: path required: true schema: $ref: '#/components/schemas/ParticipantId' PostId: name: postId in: path required: true schema: $ref: '#/components/schemas/PostId' ParamPage: name: page required: false in: query schema: $ref: '#/components/schemas/PageNumber' Limit: name: limit required: false in: query schema: $ref: '#/components/schemas/PageLimit' CommentId: name: commentId in: path required: true schema: $ref: '#/components/schemas/CommentId' UserId: name: userId in: query required: false description: | User ID to delete. If not provided, deletes the current user (from x-current-user-id header). Only admins can delete other users. schema: type: string format: uuid example: 4b72d209-debd-45e1-93cc-7640bf7d39bf schemas: GroupName: type: string example: SomeName description: Group Name maxLength: 60 SportId: type: string example: 4b72d209-debd-45e1-93cc-7640bf7d39bf description: Sport Type UUID format: uuid maxLength: 36 minLength: 36 pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$ Address: type: object properties: formattedAddress: type: string nullable: true street: type: string nullable: true region: type: string nullable: true city: type: string nullable: true GroupId: type: string example: 00000000-0000-1000-9000-510d9bb07630 description: Group ID format: uuid CoverId: type: string example: 00000000-0000-1000-9000-510d9bb07630 description: Cover ID format: uuid AvatarId: type: string example: 00000000-0000-1000-9000-510d9bb07630 description: Avatar ID format: uuid ShortName: type: string example: group_123 description: Short Name for group maxLength: 32 minLength: 5 pattern: ^[a-z0-9_]{5,32}$ PostRules: type: string enum: - Everyone - AdminApproval - OnlyAdmin GroupType: type: string enum: - Public - Private OwnerId: type: string example: 00000000-0000-1000-9000-510d9bb07630 description: Owner ID format: uuid ParticipantId: type: string example: 00000000-0000-1000-9000-510d9bb07630 description: Participant ID format: uuid Group: type: object properties: id: $ref: '#/components/schemas/GroupId' name: type: string description: type: string sportId: $ref: '#/components/schemas/SportId' coverId: $ref: '#/components/schemas/CoverId' avatarId: $ref: '#/components/schemas/AvatarId' shortName: $ref: '#/components/schemas/ShortName' postRules: $ref: '#/components/schemas/PostRules' address: type: string groupType: $ref: '#/components/schemas/GroupType' createdAt: type: string format: date-time updatedAt: type: string format: date-time ownerId: $ref: '#/components/schemas/OwnerId' participantsCount: type: integer participantsIds: type: array items: $ref: '#/components/schemas/ParticipantId' isFollowing: type: boolean distance: type: number format: double minimum: 0 description: Distance in kilometers Error: type: object required: - code - message - endpoint - requestId properties: code: type: string description: Error unique code enum: - validation - internal - oops - unexpected - tooManyRequests - notFound - unauthorized - forbidden message: type: string description: Error message endpoint: type: string requestId: type: string Errors: type: object required: - errors properties: errors: type: array items: $ref: '#/components/schemas/Error' GeosuggestedAddress: type: object required: - formattedAddress - street - region - city properties: formattedAddress: type: string street: type: string nullable: true region: type: string nullable: true city: type: string nullable: true Location: type: object required: - lat - lng properties: lat: type: number format: double minimum: -90 maximum: 90 lng: type: number format: double minimum: -180 maximum: 180 CreateRequest: type: object required: - name - description - shortName - postRules properties: name: type: string maxLength: 60 description: type: string maxLength: 1000 sportId: $ref: '#/components/schemas/SportId' coverId: $ref: '#/components/schemas/CoverId' avatarId: $ref: '#/components/schemas/AvatarId' address: $ref: '#/components/schemas/GeosuggestedAddress' shortName: $ref: '#/components/schemas/ShortName' postRules: $ref: '#/components/schemas/PostRules' location: $ref: '#/components/schemas/Location' CreateResponse: type: object properties: id: $ref: '#/components/schemas/GroupId' UpdateRequest: type: object required: - description - shortName - postRules - name properties: address: $ref: '#/components/schemas/GeosuggestedAddress' name: type: string maxLength: 60 description: type: string maxLength: 1000 sportId: $ref: '#/components/schemas/SportId' coverId: $ref: '#/components/schemas/CoverId' avatarId: $ref: '#/components/schemas/AvatarId' shortName: $ref: '#/components/schemas/ShortName' postRules: $ref: '#/components/schemas/PostRules' location: $ref: '#/components/schemas/Location' ParticipantInfo: type: object required: - userId - isMuted - isAdmin properties: userId: $ref: '#/components/schemas/ParticipantId' isMuted: type: boolean isAdmin: type: boolean MediaId: type: string example: 00000000-0000-1000-9000-510d9bb07630 description: Media ID format: uuid CreatePostRequest: type: object properties: text: type: string maxLength: 1200 mediaIds: type: array maxItems: 6 items: $ref: '#/components/schemas/MediaId' PostId: type: string example: 00000000-0000-1000-9000-510d9bb07630 description: Post ID format: uuid CreatePostResponse: type: object properties: id: $ref: '#/components/schemas/PostId' Post: type: object required: - id - text - createdAt - updatedAt - authorId - groupId - mediaIds - likeCount - commentCount - likedByUser - commentedByUser properties: id: type: string format: uuid text: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time authorId: type: string format: uuid groupId: type: string format: uuid mediaIds: type: array items: $ref: '#/components/schemas/MediaId' likeCount: type: integer commentCount: type: integer likedByUser: type: boolean commentedByUser: type: boolean UpdatePostRequest: type: object required: - text properties: text: type: string maxLength: 1200 mediaIds: type: array maxItems: 6 items: $ref: '#/components/schemas/MediaId' PageNumber: type: integer description: Page number example: 0 minimum: 0 default: 0 PageLimit: type: integer description: Page limit default: 10 minimum: 1 maximum: 100 example: 10 Count: type: integer description: Page entries count example: 10 CurrentPage: type: integer deprecated: true description: Current page example: 0 minimum: 0 default: 0 PageSize: type: integer deprecated: true description: Page size default: 10 minimum: 1 maximum: 100 example: 10 TotalCount: type: integer description: Total count default: 0 minimum: 0 example: 1000 Page: type: object required: - count - page - limit - total properties: data: type: array items: type: object count: $ref: '#/components/schemas/Count' currentPage: $ref: '#/components/schemas/CurrentPage' page: $ref: '#/components/schemas/PageNumber' pageSize: $ref: '#/components/schemas/PageSize' limit: $ref: '#/components/schemas/PageLimit' total: $ref: '#/components/schemas/TotalCount' PostsPage: type: object allOf: - $ref: '#/components/schemas/Page' - type: object properties: data: type: array items: $ref: '#/components/schemas/Post' LikeId: type: string example: 00000000-0000-1000-9000-510d9bb07630 description: Like ID format: uuid CommentId: type: string example: 00000000-0000-1000-9000-510d9bb07630 description: Comment ID format: uuid LikeUserId: type: string example: 00000000-0000-1000-9000-510d9bb07630 description: Like User ID format: uuid DateTime: type: string format: date-time description: Date and time in RFC-3339 example: '2024-11-29T12:09:53+00:00' Like: type: object required: - postId - likeUserId - isLiked properties: likeId: $ref: '#/components/schemas/LikeId' postId: $ref: '#/components/schemas/PostId' commentId: $ref: '#/components/schemas/CommentId' likeUserId: $ref: '#/components/schemas/LikeUserId' isLiked: type: boolean createdAt: $ref: '#/components/schemas/DateTime' LikesPage: type: object allOf: - $ref: '#/components/schemas/Page' - type: object properties: data: type: array items: $ref: '#/components/schemas/Like' CommenterUserId: type: string example: 00000000-0000-1000-9000-510d9bb07630 description: Commenter User ID format: uuid CommentText: type: string example: | ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. description: Comment text format: text maxLength: 2000 minLength: 1 Comment: type: object required: - commentId - postId - commenterUserId - text - likeCount - likedByUser - edited - createdAt - updatedAt properties: commentId: $ref: '#/components/schemas/CommentId' postId: $ref: '#/components/schemas/PostId' commenterUserId: $ref: '#/components/schemas/CommenterUserId' text: $ref: '#/components/schemas/CommentText' likeCount: type: integer likedByUser: type: boolean edited: type: boolean createdAt: $ref: '#/components/schemas/DateTime' updatedAt: $ref: '#/components/schemas/DateTime' CommentsPage: type: object allOf: - $ref: '#/components/schemas/Page' - type: object properties: data: type: array items: $ref: '#/components/schemas/Comment' CreateComment: type: object required: - text properties: text: $ref: '#/components/schemas/CommentText' CreateCommentResponse: type: object properties: id: $ref: '#/components/schemas/CommentId' UpdateComment: type: object required: - text properties: text: $ref: '#/components/schemas/CommentText' responses: '400': description: Bad Request, the request is not valid content: application/json: schema: $ref: '#/components/schemas/Errors' example: errors: - code: 400 message: The request is not valid '403': description: Forbidden, you are not allowed to perform this action content: application/json: schema: $ref: '#/components/schemas/Errors' example: errors: - code: 403 message: You are not allowed to perform this action '404': description: Not found, the resource you are looking for does not exist content: application/json: schema: $ref: '#/components/schemas/Errors' example: errors: - code: 404 message: Resource not found