aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-06-29 19:35:02 +0300
committerArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-06-29 19:35:02 +0300
commit7d27b7bde11fa117f37ce18e0807ef299b69c700 (patch)
tree6a5e6e86aa0ed88c52bdabfbca8b0b5528c3b125
parentfeat: delete map summary (diff)
downloadlphub-7d27b7bde11fa117f37ce18e0807ef299b69c700.tar.gz
lphub-7d27b7bde11fa117f37ce18e0807ef299b69c700.tar.bz2
lphub-7d27b7bde11fa117f37ce18e0807ef299b69c700.zip
docs: updated for add/edit/delete map summary
Former-commit-id: 0f2f20f84b5a52d747f18fba771bc88478f8c059
-rw-r--r--docs/docs.go96
-rw-r--r--docs/swagger.json96
-rw-r--r--docs/swagger.yaml66
3 files changed, 232 insertions, 26 deletions
diff --git a/docs/docs.go b/docs/docs.go
index 8318e14..40632e3 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -492,6 +492,59 @@ const docTemplate = `{
492 } 492 }
493 } 493 }
494 } 494 }
495 },
496 "post": {
497 "produces": [
498 "application/json"
499 ],
500 "tags": [
501 "maps"
502 ],
503 "summary": "Delete 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.DeleteMapSummaryRequest"
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.DeleteMapSummaryRequest"
535 }
536 }
537 }
538 ]
539 }
540 },
541 "400": {
542 "description": "Bad Request",
543 "schema": {
544 "$ref": "#/definitions/models.Response"
545 }
546 }
547 }
495 } 548 }
496 }, 549 },
497 "/profile": { 550 "/profile": {
@@ -874,24 +927,49 @@ const docTemplate = `{
874 } 927 }
875 } 928 }
876 }, 929 },
877 "models.EditMapSummaryRequest": { 930 "models.CreateMapSummaryRequest": {
878 "type": "object", 931 "type": "object",
879 "required": [ 932 "required": [
880 "image" 933 "category_id",
934 "description",
935 "record_date",
936 "score_count",
937 "showcase",
938 "user_name"
881 ], 939 ],
882 "properties": { 940 "properties": {
883 "image": { 941 "category_id": {
942 "type": "integer"
943 },
944 "description": {
884 "type": "string" 945 "type": "string"
885 }, 946 },
886 "routes": { 947 "record_date": {
887 "type": "array", 948 "type": "string"
888 "items": { 949 },
889 "$ref": "#/definitions/models.EditMapSummaryRequestDetails" 950 "score_count": {
890 } 951 "type": "integer"
952 },
953 "showcase": {
954 "type": "string"
955 },
956 "user_name": {
957 "type": "string"
891 } 958 }
892 } 959 }
893 }, 960 },
894 "models.EditMapSummaryRequestDetails": { 961 "models.DeleteMapSummaryRequest": {
962 "type": "object",
963 "required": [
964 "route_id"
965 ],
966 "properties": {
967 "route_id": {
968 "type": "integer"
969 }
970 }
971 },
972 "models.EditMapSummaryRequest": {
895 "type": "object", 973 "type": "object",
896 "required": [ 974 "required": [
897 "description", 975 "description",
diff --git a/docs/swagger.json b/docs/swagger.json
index 212ebee..7e251ca 100644
--- a/docs/swagger.json
+++ b/docs/swagger.json
@@ -485,6 +485,59 @@
485 } 485 }
486 } 486 }
487 } 487 }
488 },
489 "post": {
490 "produces": [
491 "application/json"
492 ],
493 "tags": [
494 "maps"
495 ],
496 "summary": "Delete 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.DeleteMapSummaryRequest"
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.DeleteMapSummaryRequest"
528 }
529 }
530 }
531 ]
532 }
533 },
534 "400": {
535 "description": "Bad Request",
536 "schema": {
537 "$ref": "#/definitions/models.Response"
538 }
539 }
540 }
488 } 541 }
489 }, 542 },
490 "/profile": { 543 "/profile": {
@@ -867,24 +920,49 @@
867 } 920 }
868 } 921 }
869 }, 922 },
870 "models.EditMapSummaryRequest": { 923 "models.CreateMapSummaryRequest": {
871 "type": "object", 924 "type": "object",
872 "required": [ 925 "required": [
873 "image" 926 "category_id",
927 "description",
928 "record_date",
929 "score_count",
930 "showcase",
931 "user_name"
874 ], 932 ],
875 "properties": { 933 "properties": {
876 "image": { 934 "category_id": {
935 "type": "integer"
936 },
937 "description": {
877 "type": "string" 938 "type": "string"
878 }, 939 },
879 "routes": { 940 "record_date": {
880 "type": "array", 941 "type": "string"
881 "items": { 942 },
882 "$ref": "#/definitions/models.EditMapSummaryRequestDetails" 943 "score_count": {
883 } 944 "type": "integer"
945 },
946 "showcase": {
947 "type": "string"
948 },
949 "user_name": {
950 "type": "string"
884 } 951 }
885 } 952 }
886 }, 953 },
887 "models.EditMapSummaryRequestDetails": { 954 "models.DeleteMapSummaryRequest": {
955 "type": "object",
956 "required": [
957 "route_id"
958 ],
959 "properties": {
960 "route_id": {
961 "type": "integer"
962 }
963 }
964 },
965 "models.EditMapSummaryRequest": {
888 "type": "object", 966 "type": "object",
889 "required": [ 967 "required": [
890 "description", 968 "description",
diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index ba20f6d..5309f67 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -32,18 +32,36 @@ definitions:
32 game: 32 game:
33 $ref: '#/definitions/models.Game' 33 $ref: '#/definitions/models.Game'
34 type: object 34 type: object
35 models.EditMapSummaryRequest: 35 models.CreateMapSummaryRequest:
36 properties: 36 properties:
37 image: 37 category_id:
38 type: integer
39 description:
38 type: string 40 type: string
39 routes: 41 record_date:
40 items: 42 type: string
41 $ref: '#/definitions/models.EditMapSummaryRequestDetails' 43 score_count:
42 type: array 44 type: integer
45 showcase:
46 type: string
47 user_name:
48 type: string
49 required:
50 - category_id
51 - description
52 - record_date
53 - score_count
54 - showcase
55 - user_name
56 type: object
57 models.DeleteMapSummaryRequest:
58 properties:
59 route_id:
60 type: integer
43 required: 61 required:
44 - image 62 - route_id
45 type: object 63 type: object
46 models.EditMapSummaryRequestDetails: 64 models.EditMapSummaryRequest:
47 properties: 65 properties:
48 description: 66 description:
49 type: string 67 type: string
@@ -474,6 +492,38 @@ paths:
474 summary: Get map summary with specified id. 492 summary: Get map summary with specified id.
475 tags: 493 tags:
476 - maps 494 - maps
495 post:
496 parameters:
497 - description: Map ID
498 in: path
499 name: id
500 required: true
501 type: integer
502 - description: Body
503 in: body
504 name: request
505 required: true
506 schema:
507 $ref: '#/definitions/models.DeleteMapSummaryRequest'
508 produces:
509 - application/json
510 responses:
511 "200":
512 description: OK
513 schema:
514 allOf:
515 - $ref: '#/definitions/models.Response'
516 - properties:
517 data:
518 $ref: '#/definitions/models.DeleteMapSummaryRequest'
519 type: object
520 "400":
521 description: Bad Request
522 schema:
523 $ref: '#/definitions/models.Response'
524 summary: Delete map summary with specified map id.
525 tags:
526 - maps
477 put: 527 put:
478 parameters: 528 parameters:
479 - description: Map ID 529 - description: Map ID