From f3b4838e255745cdc3dec368ed29e5b321dedc8b Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Thu, 29 Jun 2023 19:40:07 +0300 Subject: docs: add jwt token requirements Former-commit-id: e5b56433686e2180a99293f0ddf339e70b304c67 --- backend/controllers/modController.go | 3 +++ docs/docs.go | 21 +++++++++++++++++++++ docs/swagger.json | 21 +++++++++++++++++++++ docs/swagger.yaml | 15 +++++++++++++++ 4 files changed, 60 insertions(+) diff --git a/backend/controllers/modController.go b/backend/controllers/modController.go index a8e0786..b26f1ae 100644 --- a/backend/controllers/modController.go +++ b/backend/controllers/modController.go @@ -14,6 +14,7 @@ import ( // @Summary Create map summary with specified map id. // @Tags maps // @Produce json +// @Param Authorization header string true "JWT Token" // @Param id path int true "Map ID" // @Param request body models.CreateMapSummaryRequest true "Body" // @Success 200 {object} models.Response{data=models.CreateMapSummaryRequest} @@ -99,6 +100,7 @@ func CreateMapSummary(c *gin.Context) { // @Summary Edit map summary with specified map id. // @Tags maps // @Produce json +// @Param Authorization header string true "JWT Token" // @Param id path int true "Map ID" // @Param request body models.EditMapSummaryRequest true "Body" // @Success 200 {object} models.Response{data=models.EditMapSummaryRequest} @@ -181,6 +183,7 @@ func EditMapSummary(c *gin.Context) { // @Summary Delete map summary with specified map id. // @Tags maps // @Produce json +// @Param Authorization header string true "JWT Token" // @Param id path int true "Map ID" // @Param request body models.DeleteMapSummaryRequest true "Body" // @Success 200 {object} models.Response{data=models.DeleteMapSummaryRequest} diff --git a/docs/docs.go b/docs/docs.go index 8affdab..9368c2c 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -449,6 +449,13 @@ const docTemplate = `{ ], "summary": "Edit map summary with specified map id.", "parameters": [ + { + "type": "string", + "description": "JWT Token", + "name": "Authorization", + "in": "header", + "required": true + }, { "type": "integer", "description": "Map ID", @@ -502,6 +509,13 @@ const docTemplate = `{ ], "summary": "Create map summary with specified map id.", "parameters": [ + { + "type": "string", + "description": "JWT Token", + "name": "Authorization", + "in": "header", + "required": true + }, { "type": "integer", "description": "Map ID", @@ -555,6 +569,13 @@ const docTemplate = `{ ], "summary": "Delete map summary with specified map id.", "parameters": [ + { + "type": "string", + "description": "JWT Token", + "name": "Authorization", + "in": "header", + "required": true + }, { "type": "integer", "description": "Map ID", diff --git a/docs/swagger.json b/docs/swagger.json index af3fa11..3acc883 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -442,6 +442,13 @@ ], "summary": "Edit map summary with specified map id.", "parameters": [ + { + "type": "string", + "description": "JWT Token", + "name": "Authorization", + "in": "header", + "required": true + }, { "type": "integer", "description": "Map ID", @@ -495,6 +502,13 @@ ], "summary": "Create map summary with specified map id.", "parameters": [ + { + "type": "string", + "description": "JWT Token", + "name": "Authorization", + "in": "header", + "required": true + }, { "type": "integer", "description": "Map ID", @@ -548,6 +562,13 @@ ], "summary": "Delete map summary with specified map id.", "parameters": [ + { + "type": "string", + "description": "JWT Token", + "name": "Authorization", + "in": "header", + "required": true + }, { "type": "integer", "description": "Map ID", diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 0c55964..6d06e22 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -468,6 +468,11 @@ paths: /maps/{id}/summary: delete: parameters: + - description: JWT Token + in: header + name: Authorization + required: true + type: string - description: Map ID in: path name: id @@ -526,6 +531,11 @@ paths: - maps post: parameters: + - description: JWT Token + in: header + name: Authorization + required: true + type: string - description: Map ID in: path name: id @@ -558,6 +568,11 @@ paths: - maps put: parameters: + - description: JWT Token + in: header + name: Authorization + required: true + type: string - description: Map ID in: path name: id -- cgit v1.2.3