Skip to content

Commit

Permalink
chore: modify docs add /v3
Browse files Browse the repository at this point in the history
  • Loading branch information
ppolariss committed Jul 18, 2024
1 parent 6619cb5 commit 6f6cc12
Show file tree
Hide file tree
Showing 4 changed files with 363 additions and 363 deletions.
6 changes: 3 additions & 3 deletions danke/api/review.go
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ func GetRandomReviewV1(c *fiber.Ctx) (err error) {
// @Summary List sensitive reviews, admin only
// @Tags Review
// @Produce application/json
// @Router /reviews/_sensitive [get]
// @Router /v3/reviews/_sensitive [get]
// @Param object query schema.SensitiveReviewRequest false "query"
// @Success 200 {array} schema.SensitiveReviewResponse
// @Failure 404 {object} common.HttpBaseError
Expand Down Expand Up @@ -507,8 +507,8 @@ func ListSensitiveReviews(c *fiber.Ctx) (err error) {
// @Summary Modify A Review's actual_sensitive, admin only
// @Tags Review
// @Produce application/json
// @Router /reviews/{id}/_sensitive [put]
// @Router /reviews/{id}/_sensitive [patch]
// @Router /v3/reviews/{id}/_sensitive [put]
// @Router /v3/reviews/{id}/_sensitive [patch]
// @Param id path int true "id"
// @Param json body schema.ModifySensitiveReviewRequest true "json"
// @Success 200 {object} schema.SensitiveReviewResponse
Expand Down
272 changes: 136 additions & 136 deletions danke/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,58 +374,6 @@ const docTemplate = `{
}
}
},
"/reviews/_sensitive": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Review"
],
"summary": "List sensitive reviews, admin only",
"parameters": [
{
"type": "boolean",
"name": "all",
"in": "query"
},
{
"type": "string",
"name": "offset",
"in": "query"
},
{
"type": "boolean",
"name": "open",
"in": "query"
},
{
"maximum": 10,
"type": "integer",
"default": 10,
"name": "size",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/schema.SensitiveReviewResponse"
}
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/common.HttpBaseError"
}
}
}
}
},
"/reviews/me": {
"get": {
"description": "list my reviews, old version. load history and achievements, no ` + "`" + `is_me` + "`" + ` field",
Expand Down Expand Up @@ -537,90 +485,6 @@ const docTemplate = `{
}
}
},
"/reviews/{id}/_sensitive": {
"put": {
"produces": [
"application/json"
],
"tags": [
"Review"
],
"summary": "Modify A Review's actual_sensitive, admin only",
"parameters": [
{
"type": "integer",
"description": "id",
"name": "id",
"in": "path",
"required": true
},
{
"description": "json",
"name": "json",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.ModifySensitiveReviewRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/schema.SensitiveReviewResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/common.HttpBaseError"
}
}
}
},
"patch": {
"produces": [
"application/json"
],
"tags": [
"Review"
],
"summary": "Modify A Review's actual_sensitive, admin only",
"parameters": [
{
"type": "integer",
"description": "id",
"name": "id",
"in": "path",
"required": true
},
{
"description": "json",
"name": "json",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.ModifySensitiveReviewRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/schema.SensitiveReviewResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/common.HttpBaseError"
}
}
}
}
},
"/reviews/{review_id}": {
"put": {
"description": "modify a review, admin or owner can modify",
Expand Down Expand Up @@ -937,6 +801,142 @@ const docTemplate = `{
}
}
}
},
"/v3/reviews/_sensitive": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Review"
],
"summary": "List sensitive reviews, admin only",
"parameters": [
{
"type": "boolean",
"name": "all",
"in": "query"
},
{
"type": "string",
"name": "offset",
"in": "query"
},
{
"type": "boolean",
"name": "open",
"in": "query"
},
{
"maximum": 10,
"type": "integer",
"default": 10,
"name": "size",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/schema.SensitiveReviewResponse"
}
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/common.HttpBaseError"
}
}
}
}
},
"/v3/reviews/{id}/_sensitive": {
"put": {
"produces": [
"application/json"
],
"tags": [
"Review"
],
"summary": "Modify A Review's actual_sensitive, admin only",
"parameters": [
{
"type": "integer",
"description": "id",
"name": "id",
"in": "path",
"required": true
},
{
"description": "json",
"name": "json",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.ModifySensitiveReviewRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/schema.SensitiveReviewResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/common.HttpBaseError"
}
}
}
},
"patch": {
"produces": [
"application/json"
],
"tags": [
"Review"
],
"summary": "Modify A Review's actual_sensitive, admin only",
"parameters": [
{
"type": "integer",
"description": "id",
"name": "id",
"in": "path",
"required": true
},
{
"description": "json",
"name": "json",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.ModifySensitiveReviewRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/schema.SensitiveReviewResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/common.HttpBaseError"
}
}
}
}
}
},
"definitions": {
Expand Down
Loading

0 comments on commit 6f6cc12

Please sign in to comment.