diff --git a/api/swagger.yaml b/api/swagger.yaml index dc750dc..18392dd 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -323,7 +323,7 @@ paths: /comments/new: post: tags: - - Comment Endpoints. + - Comment Endpoints security: - token: [ ] summary: Submit a comment. @@ -350,7 +350,7 @@ paths: post_id: a1b2c3d4 responses: 200: - description: The created post ID + description: The created comment ID content: application/json: schema: @@ -366,7 +366,62 @@ paths: $ref: '#/components/responses/Unprocessable' 500: $ref: '#/components/responses/ServerError' - + /comment/{id}/upvote: + post: + tags: + - Comment Endpoints + summary: Upvote a comment. + description: Add an upvote to a specified comment. If you have already upvoted a point, it is retracted. + security: + - token: [] + parameters: + - name: id + in: path + required: true + description: The comment ID to upvote. + schema: + type: string + responses: + 200: + description: Your upvote has successfully been registered. + content: + application/json: + schema: + type: object + 401: + $ref: '#/components/responses/InvalidToken' + 404: + $ref: '#/components/responses/NotFound' + 500: + $ref: '#/components/responses/ServerError' + /comment/{id}/downvote: + post: + tags: + - Comment Endpoints + summary: Downvote a comment + description: Add an downvote to a specified comment. If you have already downvoted a point, it is retracted. + security: + - token: [] + parameters: + - name: id + in: path + required: true + description: The comment ID to downvote. + schema: + type: string + responses: + 200: + description: Your downvote has successfully been registered. + content: + application/json: + schema: + type: object + 401: + $ref: '#/components/responses/InvalidToken' + 404: + $ref: '#/components/responses/NotFound' + 500: + $ref: '#/components/responses/ServerError' components: parameters: AfterParam: