From 28045d2635dff2c2b18cbcdc0da424b0ec7da0ac Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Mon, 11 Dec 2023 16:34:10 +0300 Subject: feat: add discussion comment posting (#59) --- docs/docs.go | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ docs/swagger.json | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ docs/swagger.yaml | 40 ++++++++++++++++++++++++++++++++++ 3 files changed, 170 insertions(+) (limited to 'docs') diff --git a/docs/docs.go b/docs/docs.go index f689ba6..c2c1bab 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -522,6 +522,60 @@ const docTemplate = `{ } } }, + "post": { + "description": "Create map discussion comment with specified map id.", + "produces": [ + "application/json" + ], + "tags": [ + "maps" + ], + "parameters": [ + { + "type": "string", + "description": "JWT Token", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "type": "integer", + "description": "Map ID", + "name": "mapid", + "in": "path", + "required": true + }, + { + "description": "Body", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/handlers.CreateMapDiscussionCommentRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/models.Response" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/handlers.CreateMapDiscussionCommentRequest" + } + } + } + ] + } + } + } + }, "delete": { "description": "Delete map summary with specified map id.", "produces": [ @@ -1325,6 +1379,17 @@ const docTemplate = `{ } } }, + "handlers.CreateMapDiscussionCommentRequest": { + "type": "object", + "required": [ + "comment" + ], + "properties": { + "comment": { + "type": "string" + } + } + }, "handlers.CreateMapDiscussionRequest": { "type": "object", "required": [ diff --git a/docs/swagger.json b/docs/swagger.json index a38240e..043fb6b 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -516,6 +516,60 @@ } } }, + "post": { + "description": "Create map discussion comment with specified map id.", + "produces": [ + "application/json" + ], + "tags": [ + "maps" + ], + "parameters": [ + { + "type": "string", + "description": "JWT Token", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "type": "integer", + "description": "Map ID", + "name": "mapid", + "in": "path", + "required": true + }, + { + "description": "Body", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/handlers.CreateMapDiscussionCommentRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/models.Response" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/handlers.CreateMapDiscussionCommentRequest" + } + } + } + ] + } + } + } + }, "delete": { "description": "Delete map summary with specified map id.", "produces": [ @@ -1319,6 +1373,17 @@ } } }, + "handlers.CreateMapDiscussionCommentRequest": { + "type": "object", + "required": [ + "comment" + ], + "properties": { + "comment": { + "type": "string" + } + } + }, "handlers.CreateMapDiscussionRequest": { "type": "object", "required": [ diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 3249483..9de09a3 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -18,6 +18,13 @@ definitions: game: $ref: '#/definitions/models.Game' type: object + handlers.CreateMapDiscussionCommentRequest: + properties: + comment: + type: string + required: + - comment + type: object handlers.CreateMapDiscussionRequest: properties: content: @@ -772,6 +779,39 @@ paths: type: object tags: - maps + post: + description: Create map discussion comment with specified map id. + parameters: + - description: JWT Token + in: header + name: Authorization + required: true + type: string + - description: Map ID + in: path + name: mapid + required: true + type: integer + - description: Body + in: body + name: request + required: true + schema: + $ref: '#/definitions/handlers.CreateMapDiscussionCommentRequest' + produces: + - application/json + responses: + "200": + description: OK + schema: + allOf: + - $ref: '#/definitions/models.Response' + - properties: + data: + $ref: '#/definitions/handlers.CreateMapDiscussionCommentRequest' + type: object + tags: + - maps put: description: Edit map discussion with specified map id. parameters: -- cgit v1.2.3