Skip to content

Commit

Permalink
chore: add delete review api docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ppolariss committed Apr 8, 2024
1 parent 9e7831e commit ad2382a
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 0 deletions.
45 changes: 45 additions & 0 deletions danke/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,51 @@ const docTemplate = `{
}
}
},
"delete": {
"description": "delete a review, admin or owner can delete",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Review"
],
"summary": "delete a review",
"parameters": [
{
"type": "integer",
"description": "review id",
"name": "review_id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/common.HttpError"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/common.HttpError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/common.HttpError"
}
}
}
},
"patch": {
"description": "vote for a review",
"consumes": [
Expand Down
45 changes: 45 additions & 0 deletions danke/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,51 @@
}
}
},
"delete": {
"description": "delete a review, admin or owner can delete",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Review"
],
"summary": "delete a review",
"parameters": [
{
"type": "integer",
"description": "review id",
"name": "review_id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/common.HttpError"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/common.HttpError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/common.HttpError"
}
}
}
},
"patch": {
"description": "vote for a review",
"consumes": [
Expand Down
30 changes: 30 additions & 0 deletions danke/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,36 @@ paths:
tags:
- CourseGroup
/reviews/{review_id}:
delete:
consumes:
- application/json
description: delete a review, admin or owner can delete
parameters:
- description: review id
in: path
name: review_id
required: true
type: integer
produces:
- application/json
responses:
"204":
description: No Content
"400":
description: Bad Request
schema:
$ref: '#/definitions/common.HttpError'
"403":
description: Forbidden
schema:
$ref: '#/definitions/common.HttpError'
"404":
description: Not Found
schema:
$ref: '#/definitions/common.HttpError'
summary: delete a review
tags:
- Review
patch:
consumes:
- application/json
Expand Down

0 comments on commit ad2382a

Please sign in to comment.