Skip to content

Commit

Permalink
Add 400 to the openapi doc and fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
ljdelight committed Dec 19, 2023
1 parent 56d0200 commit 49c4825
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class CommentController @Inject() (
// "comment" field is missing in the request body
BadRequest(
Json.toJson(
StatusMessage("KO", JsString("Required comment object in request body no found."))
StatusMessage("KO", JsString("Required comment object in request body not found."))
)
)
}
Expand Down Expand Up @@ -179,7 +179,7 @@ class CommentController @Inject() (
// "comment" field is missing in the request body
BadRequest(
Json.toJson(
StatusMessage("KO", JsString("Required comment object in request body no found."))
StatusMessage("KO", JsString("Required comment object in request body not found."))
)
)
}
Expand Down Expand Up @@ -255,7 +255,7 @@ class CommentController @Inject() (
// "comment" field is missing in the request body
BadRequest(
Json.toJson(
StatusMessage("KO", JsString("Required comment object in request body no found."))
StatusMessage("KO", JsString("Required comment object in request body not found."))
)
)
}
Expand Down
8 changes: 8 additions & 0 deletions conf/v2_route/comment.api
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ GET /challengeComments/user/:id @org.maproulette.fr
# application/json:
# schema:
# $ref: '#/components/schemas/org.maproulette.framework.model.Comment'
# '400':
# description: If the request lacks the comment or the comment is empty
# '404':
# description: If the Task is not found
# parameters:
Expand Down Expand Up @@ -127,6 +129,8 @@ POST /task/:id/comment @org.maproulette.framework.c
# application/json:
# schema:
# $ref: '#/components/schemas/TaskBundle'
# '400':
# description: If the request lacks the comment or the comment is empty
# '404':
# description: If the bundle is not found
# parameters:
Expand Down Expand Up @@ -163,6 +167,8 @@ POST /taskBundle/:id/comment @org.maproulette.framework.c
# application/json:
# schema:
# $ref: '#/components/schemas/org.maproulette.framework.model.Comment'
# '400':
# description: If the request lacks the comment or the comment is empty
# '401':
# description: If the user is not the original user who made the comment or a super user
# '404':
Expand Down Expand Up @@ -216,6 +222,8 @@ DELETE /task/:id/comment/:commentId @org.maproulette.framework.c
# application/json:
# schema:
# $ref: '#/components/schemas/org.maproulette.framework.model.ChallengeComment'
# '400':
# description: If the request lacks the comment or the comment is empty
# '404':
# description: If the Challenge is not found
# parameters:
Expand Down

0 comments on commit 49c4825

Please sign in to comment.