aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-06-29 19:40:07 +0300
committerArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-06-29 19:40:07 +0300
commitf3b4838e255745cdc3dec368ed29e5b321dedc8b (patch)
treeae634de28ac524a022ca702009b6625940380927
parentdocs: fix delete map summary (diff)
downloadlphub-f3b4838e255745cdc3dec368ed29e5b321dedc8b.tar.gz
lphub-f3b4838e255745cdc3dec368ed29e5b321dedc8b.tar.bz2
lphub-f3b4838e255745cdc3dec368ed29e5b321dedc8b.zip
docs: add jwt token requirements
Former-commit-id: e5b56433686e2180a99293f0ddf339e70b304c67
Diffstat (limited to '')
-rw-r--r--backend/controllers/modController.go3
-rw-r--r--docs/docs.go21
-rw-r--r--docs/swagger.json21
-rw-r--r--docs/swagger.yaml15
4 files changed, 60 insertions, 0 deletions
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 (
14// @Summary Create map summary with specified map id. 14// @Summary Create map summary with specified map id.
15// @Tags maps 15// @Tags maps
16// @Produce json 16// @Produce json
17// @Param Authorization header string true "JWT Token"
17// @Param id path int true "Map ID" 18// @Param id path int true "Map ID"
18// @Param request body models.CreateMapSummaryRequest true "Body" 19// @Param request body models.CreateMapSummaryRequest true "Body"
19// @Success 200 {object} models.Response{data=models.CreateMapSummaryRequest} 20// @Success 200 {object} models.Response{data=models.CreateMapSummaryRequest}
@@ -99,6 +100,7 @@ func CreateMapSummary(c *gin.Context) {
99// @Summary Edit map summary with specified map id. 100// @Summary Edit map summary with specified map id.
100// @Tags maps 101// @Tags maps
101// @Produce json 102// @Produce json
103// @Param Authorization header string true "JWT Token"
102// @Param id path int true "Map ID" 104// @Param id path int true "Map ID"
103// @Param request body models.EditMapSummaryRequest true "Body" 105// @Param request body models.EditMapSummaryRequest true "Body"
104// @Success 200 {object} models.Response{data=models.EditMapSummaryRequest} 106// @Success 200 {object} models.Response{data=models.EditMapSummaryRequest}
@@ -181,6 +183,7 @@ func EditMapSummary(c *gin.Context) {
181// @Summary Delete map summary with specified map id. 183// @Summary Delete map summary with specified map id.
182// @Tags maps 184// @Tags maps
183// @Produce json 185// @Produce json
186// @Param Authorization header string true "JWT Token"
184// @Param id path int true "Map ID" 187// @Param id path int true "Map ID"
185// @Param request body models.DeleteMapSummaryRequest true "Body" 188// @Param request body models.DeleteMapSummaryRequest true "Body"
186// @Success 200 {object} models.Response{data=models.DeleteMapSummaryRequest} 189// @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
@@ -450,6 +450,13 @@ const docTemplate = `{
450 "summary": "Edit map summary with specified map id.", 450 "summary": "Edit map summary with specified map id.",
451 "parameters": [ 451 "parameters": [
452 { 452 {
453 "type": "string",
454 "description": "JWT Token",
455 "name": "Authorization",
456 "in": "header",
457 "required": true
458 },
459 {
453 "type": "integer", 460 "type": "integer",
454 "description": "Map ID", 461 "description": "Map ID",
455 "name": "id", 462 "name": "id",
@@ -503,6 +510,13 @@ const docTemplate = `{
503 "summary": "Create map summary with specified map id.", 510 "summary": "Create map summary with specified map id.",
504 "parameters": [ 511 "parameters": [
505 { 512 {
513 "type": "string",
514 "description": "JWT Token",
515 "name": "Authorization",
516 "in": "header",
517 "required": true
518 },
519 {
506 "type": "integer", 520 "type": "integer",
507 "description": "Map ID", 521 "description": "Map ID",
508 "name": "id", 522 "name": "id",
@@ -556,6 +570,13 @@ const docTemplate = `{
556 "summary": "Delete map summary with specified map id.", 570 "summary": "Delete map summary with specified map id.",
557 "parameters": [ 571 "parameters": [
558 { 572 {
573 "type": "string",
574 "description": "JWT Token",
575 "name": "Authorization",
576 "in": "header",
577 "required": true
578 },
579 {
559 "type": "integer", 580 "type": "integer",
560 "description": "Map ID", 581 "description": "Map ID",
561 "name": "id", 582 "name": "id",
diff --git a/docs/swagger.json b/docs/swagger.json
index af3fa11..3acc883 100644
--- a/docs/swagger.json
+++ b/docs/swagger.json
@@ -443,6 +443,13 @@
443 "summary": "Edit map summary with specified map id.", 443 "summary": "Edit map summary with specified map id.",
444 "parameters": [ 444 "parameters": [
445 { 445 {
446 "type": "string",
447 "description": "JWT Token",
448 "name": "Authorization",
449 "in": "header",
450 "required": true
451 },
452 {
446 "type": "integer", 453 "type": "integer",
447 "description": "Map ID", 454 "description": "Map ID",
448 "name": "id", 455 "name": "id",
@@ -496,6 +503,13 @@
496 "summary": "Create map summary with specified map id.", 503 "summary": "Create map summary with specified map id.",
497 "parameters": [ 504 "parameters": [
498 { 505 {
506 "type": "string",
507 "description": "JWT Token",
508 "name": "Authorization",
509 "in": "header",
510 "required": true
511 },
512 {
499 "type": "integer", 513 "type": "integer",
500 "description": "Map ID", 514 "description": "Map ID",
501 "name": "id", 515 "name": "id",
@@ -549,6 +563,13 @@
549 "summary": "Delete map summary with specified map id.", 563 "summary": "Delete map summary with specified map id.",
550 "parameters": [ 564 "parameters": [
551 { 565 {
566 "type": "string",
567 "description": "JWT Token",
568 "name": "Authorization",
569 "in": "header",
570 "required": true
571 },
572 {
552 "type": "integer", 573 "type": "integer",
553 "description": "Map ID", 574 "description": "Map ID",
554 "name": "id", 575 "name": "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:
468 /maps/{id}/summary: 468 /maps/{id}/summary:
469 delete: 469 delete:
470 parameters: 470 parameters:
471 - description: JWT Token
472 in: header
473 name: Authorization
474 required: true
475 type: string
471 - description: Map ID 476 - description: Map ID
472 in: path 477 in: path
473 name: id 478 name: id
@@ -526,6 +531,11 @@ paths:
526 - maps 531 - maps
527 post: 532 post:
528 parameters: 533 parameters:
534 - description: JWT Token
535 in: header
536 name: Authorization
537 required: true
538 type: string
529 - description: Map ID 539 - description: Map ID
530 in: path 540 in: path
531 name: id 541 name: id
@@ -558,6 +568,11 @@ paths:
558 - maps 568 - maps
559 put: 569 put:
560 parameters: 570 parameters:
571 - description: JWT Token
572 in: header
573 name: Authorization
574 required: true
575 type: string
561 - description: Map ID 576 - description: Map ID
562 in: path 577 in: path
563 name: id 578 name: id