From 7f56ba240f71c1f6800d1d51ba278b8d5a968ab3 Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Fri, 22 Dec 2023 12:22:14 +0300 Subject: fix: discussions logic cleanup, docs title changes (#142) --- docs/docs.go | 35 +++++++++++++++++++---------------- docs/swagger.json | 35 +++++++++++++++++++---------------- docs/swagger.yaml | 34 ++++++++++++++++++---------------- 3 files changed, 56 insertions(+), 48 deletions(-) (limited to 'docs') diff --git a/docs/docs.go b/docs/docs.go index fc38d35..812bd64 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -328,7 +328,7 @@ const docTemplate = `{ "application/json" ], "tags": [ - "maps" + "maps / discussions" ], "parameters": [ { @@ -366,7 +366,7 @@ const docTemplate = `{ "application/json" ], "tags": [ - "maps" + "maps / discussions" ], "parameters": [ { @@ -422,7 +422,7 @@ const docTemplate = `{ "application/json" ], "tags": [ - "maps" + "maps / discussions" ], "parameters": [ { @@ -467,7 +467,7 @@ const docTemplate = `{ "application/json" ], "tags": [ - "maps" + "maps / discussions" ], "parameters": [ { @@ -528,7 +528,7 @@ const docTemplate = `{ "application/json" ], "tags": [ - "maps" + "maps / discussions" ], "parameters": [ { @@ -584,12 +584,12 @@ const docTemplate = `{ } }, "delete": { - "description": "Delete map summary with specified map id.", + "description": "Delete map discussion with specified map id.", "produces": [ "application/json" ], "tags": [ - "maps" + "maps / discussions" ], "parameters": [ { @@ -631,7 +631,7 @@ const docTemplate = `{ "application/json" ], "tags": [ - "maps" + "maps / summary" ], "parameters": [ { @@ -687,7 +687,7 @@ const docTemplate = `{ "application/json" ], "tags": [ - "maps" + "maps / leaderboards" ], "parameters": [ { @@ -742,7 +742,7 @@ const docTemplate = `{ "application/json" ], "tags": [ - "maps" + "maps / leaderboards" ], "parameters": [ { @@ -814,7 +814,7 @@ const docTemplate = `{ "application/json" ], "tags": [ - "maps" + "maps / leaderboards" ], "parameters": [ { @@ -856,7 +856,7 @@ const docTemplate = `{ "application/json" ], "tags": [ - "maps" + "maps / summary" ], "parameters": [ { @@ -894,7 +894,7 @@ const docTemplate = `{ "application/json" ], "tags": [ - "maps" + "maps / summary" ], "parameters": [ { @@ -948,7 +948,7 @@ const docTemplate = `{ "application/json" ], "tags": [ - "maps" + "maps / summary" ], "parameters": [ { @@ -1002,7 +1002,7 @@ const docTemplate = `{ "application/json" ], "tags": [ - "maps" + "maps / summary" ], "parameters": [ { @@ -1555,6 +1555,10 @@ const docTemplate = `{ "content": { "type": "string" }, + "created_at": { + "description": "Upvotes int ` + "`" + `json:\"upvotes\"` + "`" + `", + "type": "string" + }, "creator": { "$ref": "#/definitions/models.UserShortWithAvatar" }, @@ -1565,7 +1569,6 @@ const docTemplate = `{ "type": "string" }, "updated_at": { - "description": "Upvotes int ` + "`" + `json:\"upvotes\"` + "`" + `", "type": "string" } } diff --git a/docs/swagger.json b/docs/swagger.json index 32efc4b..5e3fcd7 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -322,7 +322,7 @@ "application/json" ], "tags": [ - "maps" + "maps / discussions" ], "parameters": [ { @@ -360,7 +360,7 @@ "application/json" ], "tags": [ - "maps" + "maps / discussions" ], "parameters": [ { @@ -416,7 +416,7 @@ "application/json" ], "tags": [ - "maps" + "maps / discussions" ], "parameters": [ { @@ -461,7 +461,7 @@ "application/json" ], "tags": [ - "maps" + "maps / discussions" ], "parameters": [ { @@ -522,7 +522,7 @@ "application/json" ], "tags": [ - "maps" + "maps / discussions" ], "parameters": [ { @@ -578,12 +578,12 @@ } }, "delete": { - "description": "Delete map summary with specified map id.", + "description": "Delete map discussion with specified map id.", "produces": [ "application/json" ], "tags": [ - "maps" + "maps / discussions" ], "parameters": [ { @@ -625,7 +625,7 @@ "application/json" ], "tags": [ - "maps" + "maps / summary" ], "parameters": [ { @@ -681,7 +681,7 @@ "application/json" ], "tags": [ - "maps" + "maps / leaderboards" ], "parameters": [ { @@ -736,7 +736,7 @@ "application/json" ], "tags": [ - "maps" + "maps / leaderboards" ], "parameters": [ { @@ -808,7 +808,7 @@ "application/json" ], "tags": [ - "maps" + "maps / leaderboards" ], "parameters": [ { @@ -850,7 +850,7 @@ "application/json" ], "tags": [ - "maps" + "maps / summary" ], "parameters": [ { @@ -888,7 +888,7 @@ "application/json" ], "tags": [ - "maps" + "maps / summary" ], "parameters": [ { @@ -942,7 +942,7 @@ "application/json" ], "tags": [ - "maps" + "maps / summary" ], "parameters": [ { @@ -996,7 +996,7 @@ "application/json" ], "tags": [ - "maps" + "maps / summary" ], "parameters": [ { @@ -1549,6 +1549,10 @@ "content": { "type": "string" }, + "created_at": { + "description": "Upvotes int `json:\"upvotes\"`", + "type": "string" + }, "creator": { "$ref": "#/definitions/models.UserShortWithAvatar" }, @@ -1559,7 +1563,6 @@ "type": "string" }, "updated_at": { - "description": "Upvotes int `json:\"upvotes\"`", "type": "string" } } diff --git a/docs/swagger.yaml b/docs/swagger.yaml index f3a848f..ac29f93 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -130,6 +130,9 @@ definitions: type: array content: type: string + created_at: + description: Upvotes int `json:"upvotes"` + type: string creator: $ref: '#/definitions/models.UserShortWithAvatar' id: @@ -137,7 +140,6 @@ definitions: title: type: string updated_at: - description: Upvotes int `json:"upvotes"` type: string type: object handlers.MapDiscussionComment: @@ -674,7 +676,7 @@ paths: $ref: '#/definitions/handlers.MapDiscussionsResponse' type: object tags: - - maps + - maps / discussions post: description: Create map discussion with specified map id. parameters: @@ -707,10 +709,10 @@ paths: $ref: '#/definitions/handlers.CreateMapDiscussionRequest' type: object tags: - - maps + - maps / discussions /maps/{mapid}/discussions/{discussionid}: delete: - description: Delete map summary with specified map id. + description: Delete map discussion with specified map id. parameters: - description: JWT Token in: header @@ -735,7 +737,7 @@ paths: schema: $ref: '#/definitions/models.Response' tags: - - maps + - maps / discussions get: description: Get map discussion with specified map and discussion id. parameters: @@ -762,7 +764,7 @@ paths: $ref: '#/definitions/handlers.MapDiscussionResponse' type: object tags: - - maps + - maps / discussions post: description: Create map discussion comment with specified map id. parameters: @@ -800,7 +802,7 @@ paths: $ref: '#/definitions/handlers.CreateMapDiscussionCommentRequest' type: object tags: - - maps + - maps / discussions put: description: Edit map discussion with specified map id. parameters: @@ -838,7 +840,7 @@ paths: $ref: '#/definitions/handlers.EditMapDiscussionRequest' type: object tags: - - maps + - maps / discussions /maps/{mapid}/image: put: description: Edit map image with specified map id. @@ -872,7 +874,7 @@ paths: $ref: '#/definitions/handlers.EditMapImageRequest' type: object tags: - - maps + - maps / summary /maps/{mapid}/leaderboards: get: description: Get map leaderboards with specified id. @@ -903,7 +905,7 @@ paths: $ref: '#/definitions/handlers.MapLeaderboardsResponse' type: object tags: - - maps + - maps / leaderboards /maps/{mapid}/record: post: consumes: @@ -950,7 +952,7 @@ paths: $ref: '#/definitions/handlers.RecordResponse' type: object tags: - - maps + - maps / leaderboards /maps/{mapid}/record/{recordid}: delete: description: Delete record with specified map and record id. @@ -978,7 +980,7 @@ paths: schema: $ref: '#/definitions/models.Response' tags: - - maps + - maps / leaderboards /maps/{mapid}/summary: delete: description: Delete map summary with specified map id. @@ -1012,7 +1014,7 @@ paths: $ref: '#/definitions/handlers.DeleteMapSummaryRequest' type: object tags: - - maps + - maps / summary get: description: Get map summary with specified id. parameters: @@ -1034,7 +1036,7 @@ paths: $ref: '#/definitions/handlers.MapSummaryResponse' type: object tags: - - maps + - maps / summary post: description: Create map summary with specified map id. parameters: @@ -1067,7 +1069,7 @@ paths: $ref: '#/definitions/handlers.CreateMapSummaryRequest' type: object tags: - - maps + - maps / summary put: description: Edit map summary with specified map id. parameters: @@ -1100,7 +1102,7 @@ paths: $ref: '#/definitions/handlers.EditMapSummaryRequest' type: object tags: - - maps + - maps / summary /profile: get: consumes: -- cgit v1.2.3