Skip to content

Create Comment service requirements

What does this MR do?

creating the comment microservice

Relevant screenshots

Creating A Comment:

params required{ post_id user_id body }

Successful Post Request Showing what is required and what is returned from request returns 201: image

With jwt authorisation checking that the user_id hidden in jwt matches the jwt being user_id the post request:

image

Failed Post Request - Bad Request, incomplete params with valid JWT returns 400: image

image

Works for all empty params which are needed to complete request

Failed Post Request complete params with empty JWT token returns 401:

image

image

Return List of Comments: Param required post_id

Successful Get Request with valid JWT token returns 200: image image

Failed Get Request with bad request no param filled returns 400: image image

Failed Get request with no JWT returns 401: image image

Failed Get Request with invalid JWT returns 403: image image

Failed Get Request with param post_id that doesnt exist returns 404: image image

JWT was tested with bearer token in postman.

Relevant issues

Not sure how I can return a 404 error when I my microservice shouldn't have access to User microservice, I'm unable to check if the user exists or not. Same with posts

Closes #20 (closed)

Merge request reports