aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-06-29 19:35:54 +0300
committerArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-06-29 19:35:54 +0300
commitf187bc7df9b25acdbbf07f13063c9ea0111a6a3b (patch)
tree2958d58af18bdd2b20921260c4624c5e0a1064f5
parentdocs: updated for add/edit/delete map summary (diff)
downloadlphub-f187bc7df9b25acdbbf07f13063c9ea0111a6a3b.tar.gz
lphub-f187bc7df9b25acdbbf07f13063c9ea0111a6a3b.tar.bz2
lphub-f187bc7df9b25acdbbf07f13063c9ea0111a6a3b.zip
docs: fix delete map summary
Former-commit-id: c94adce2fb9a6210f2732a35075bbe49adebc532
-rw-r--r--backend/controllers/modController.go2
-rw-r--r--docs/docs.go53
-rw-r--r--docs/swagger.json53
-rw-r--r--docs/swagger.yaml38
4 files changed, 142 insertions, 4 deletions
diff --git a/backend/controllers/modController.go b/backend/controllers/modController.go
index 9398b2c..a8e0786 100644
--- a/backend/controllers/modController.go
+++ b/backend/controllers/modController.go
@@ -185,7 +185,7 @@ func EditMapSummary(c *gin.Context) {
185// @Param request body models.DeleteMapSummaryRequest true "Body" 185// @Param request body models.DeleteMapSummaryRequest true "Body"
186// @Success 200 {object} models.Response{data=models.DeleteMapSummaryRequest} 186// @Success 200 {object} models.Response{data=models.DeleteMapSummaryRequest}
187// @Failure 400 {object} models.Response 187// @Failure 400 {object} models.Response
188// @Router /maps/{id}/summary [post] 188// @Router /maps/{id}/summary [delete]
189func DeleteMapSummary(c *gin.Context) { 189func DeleteMapSummary(c *gin.Context) {
190 // Check if user exists 190 // Check if user exists
191 user, exists := c.Get("user") 191 user, exists := c.Get("user")
diff --git a/docs/docs.go b/docs/docs.go
index 40632e3..8affdab 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -500,6 +500,59 @@ const docTemplate = `{
500 "tags": [ 500 "tags": [
501 "maps" 501 "maps"
502 ], 502 ],
503 "summary": "Create map summary with specified map id.",
504 "parameters": [
505 {
506 "type": "integer",
507 "description": "Map ID",
508 "name": "id",
509 "in": "path",
510 "required": true
511 },
512 {
513 "description": "Body",
514 "name": "request",
515 "in": "body",
516 "required": true,
517 "schema": {
518 "$ref": "#/definitions/models.CreateMapSummaryRequest"
519 }
520 }
521 ],
522 "responses": {
523 "200": {
524 "description": "OK",
525 "schema": {
526 "allOf": [
527 {
528 "$ref": "#/definitions/models.Response"
529 },
530 {
531 "type": "object",
532 "properties": {
533 "data": {
534 "$ref": "#/definitions/models.CreateMapSummaryRequest"
535 }
536 }
537 }
538 ]
539 }
540 },
541 "400": {
542 "description": "Bad Request",
543 "schema": {
544 "$ref": "#/definitions/models.Response"
545 }
546 }
547 }
548 },
549 "delete": {
550 "produces": [
551 "application/json"
552 ],
553 "tags": [
554 "maps"
555 ],
503 "summary": "Delete map summary with specified map id.", 556 "summary": "Delete map summary with specified map id.",
504 "parameters": [ 557 "parameters": [
505 { 558 {
diff --git a/docs/swagger.json b/docs/swagger.json
index 7e251ca..af3fa11 100644
--- a/docs/swagger.json
+++ b/docs/swagger.json
@@ -493,6 +493,59 @@
493 "tags": [ 493 "tags": [
494 "maps" 494 "maps"
495 ], 495 ],
496 "summary": "Create map summary with specified map id.",
497 "parameters": [
498 {
499 "type": "integer",
500 "description": "Map ID",
501 "name": "id",
502 "in": "path",
503 "required": true
504 },
505 {
506 "description": "Body",
507 "name": "request",
508 "in": "body",
509 "required": true,
510 "schema": {
511 "$ref": "#/definitions/models.CreateMapSummaryRequest"
512 }
513 }
514 ],
515 "responses": {
516 "200": {
517 "description": "OK",
518 "schema": {
519 "allOf": [
520 {
521 "$ref": "#/definitions/models.Response"
522 },
523 {
524 "type": "object",
525 "properties": {
526 "data": {
527 "$ref": "#/definitions/models.CreateMapSummaryRequest"
528 }
529 }
530 }
531 ]
532 }
533 },
534 "400": {
535 "description": "Bad Request",
536 "schema": {
537 "$ref": "#/definitions/models.Response"
538 }
539 }
540 }
541 },
542 "delete": {
543 "produces": [
544 "application/json"
545 ],
546 "tags": [
547 "maps"
548 ],
496 "summary": "Delete map summary with specified map id.", 549 "summary": "Delete map summary with specified map id.",
497 "parameters": [ 550 "parameters": [
498 { 551 {
diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index 5309f67..0c55964 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -466,6 +466,38 @@ paths:
466 tags: 466 tags:
467 - maps 467 - maps
468 /maps/{id}/summary: 468 /maps/{id}/summary:
469 delete:
470 parameters:
471 - description: Map ID
472 in: path
473 name: id
474 required: true
475 type: integer
476 - description: Body
477 in: body
478 name: request
479 required: true
480 schema:
481 $ref: '#/definitions/models.DeleteMapSummaryRequest'
482 produces:
483 - application/json
484 responses:
485 "200":
486 description: OK
487 schema:
488 allOf:
489 - $ref: '#/definitions/models.Response'
490 - properties:
491 data:
492 $ref: '#/definitions/models.DeleteMapSummaryRequest'
493 type: object
494 "400":
495 description: Bad Request
496 schema:
497 $ref: '#/definitions/models.Response'
498 summary: Delete map summary with specified map id.
499 tags:
500 - maps
469 get: 501 get:
470 parameters: 502 parameters:
471 - description: Map ID 503 - description: Map ID
@@ -504,7 +536,7 @@ paths:
504 name: request 536 name: request
505 required: true 537 required: true
506 schema: 538 schema:
507 $ref: '#/definitions/models.DeleteMapSummaryRequest' 539 $ref: '#/definitions/models.CreateMapSummaryRequest'
508 produces: 540 produces:
509 - application/json 541 - application/json
510 responses: 542 responses:
@@ -515,13 +547,13 @@ paths:
515 - $ref: '#/definitions/models.Response' 547 - $ref: '#/definitions/models.Response'
516 - properties: 548 - properties:
517 data: 549 data:
518 $ref: '#/definitions/models.DeleteMapSummaryRequest' 550 $ref: '#/definitions/models.CreateMapSummaryRequest'
519 type: object 551 type: object
520 "400": 552 "400":
521 description: Bad Request 553 description: Bad Request
522 schema: 554 schema:
523 $ref: '#/definitions/models.Response' 555 $ref: '#/definitions/models.Response'
524 summary: Delete map summary with specified map id. 556 summary: Create map summary with specified map id.
525 tags: 557 tags:
526 - maps 558 - maps
527 put: 559 put: