diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/docs.go | 118 | ||||
| -rw-r--r-- | docs/swagger.json | 112 | ||||
| -rw-r--r-- | docs/swagger.yaml | 78 |
3 files changed, 228 insertions, 80 deletions
diff --git a/docs/docs.go b/docs/docs.go index a0aad6f..090d3e8 100644 --- a/docs/docs.go +++ b/docs/docs.go | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | // Package docs GENERATED BY SWAG; DO NOT EDIT | 1 | // Code generated by swaggo/swag. DO NOT EDIT. |
| 2 | // This file was generated by swaggo/swag | 2 | |
| 3 | package docs | 3 | package docs |
| 4 | 4 | ||
| 5 | import "github.com/swaggo/swag" | 5 | import "github.com/swaggo/swag" |
| @@ -345,26 +345,16 @@ const docTemplate = `{ | |||
| 345 | "required": true | 345 | "required": true |
| 346 | }, | 346 | }, |
| 347 | { | 347 | { |
| 348 | "type": "array", | 348 | "type": "file", |
| 349 | "items": { | 349 | "description": "Host Demo", |
| 350 | "type": "file" | 350 | "name": "host_demo", |
| 351 | }, | ||
| 352 | "description": "Demos", | ||
| 353 | "name": "demos", | ||
| 354 | "in": "formData", | 351 | "in": "formData", |
| 355 | "required": true | 352 | "required": true |
| 356 | }, | 353 | }, |
| 357 | { | 354 | { |
| 358 | "type": "integer", | 355 | "type": "file", |
| 359 | "description": "Score Count", | 356 | "description": "Partner Demo", |
| 360 | "name": "score_count", | 357 | "name": "partner_demo", |
| 361 | "in": "formData", | ||
| 362 | "required": true | ||
| 363 | }, | ||
| 364 | { | ||
| 365 | "type": "integer", | ||
| 366 | "description": "Score Time", | ||
| 367 | "name": "score_time", | ||
| 368 | "in": "formData", | 358 | "in": "formData", |
| 369 | "required": true | 359 | "required": true |
| 370 | }, | 360 | }, |
| @@ -461,6 +451,50 @@ const docTemplate = `{ | |||
| 461 | } | 451 | } |
| 462 | } | 452 | } |
| 463 | } | 453 | } |
| 454 | }, | ||
| 455 | "put": { | ||
| 456 | "produces": [ | ||
| 457 | "application/json" | ||
| 458 | ], | ||
| 459 | "tags": [ | ||
| 460 | "maps" | ||
| 461 | ], | ||
| 462 | "summary": "Edit map summary with specified map id.", | ||
| 463 | "parameters": [ | ||
| 464 | { | ||
| 465 | "type": "integer", | ||
| 466 | "description": "Map ID", | ||
| 467 | "name": "id", | ||
| 468 | "in": "path", | ||
| 469 | "required": true | ||
| 470 | } | ||
| 471 | ], | ||
| 472 | "responses": { | ||
| 473 | "200": { | ||
| 474 | "description": "OK", | ||
| 475 | "schema": { | ||
| 476 | "allOf": [ | ||
| 477 | { | ||
| 478 | "$ref": "#/definitions/models.Response" | ||
| 479 | }, | ||
| 480 | { | ||
| 481 | "type": "object", | ||
| 482 | "properties": { | ||
| 483 | "data": { | ||
| 484 | "$ref": "#/definitions/models.EditMapSummaryRequest" | ||
| 485 | } | ||
| 486 | } | ||
| 487 | } | ||
| 488 | ] | ||
| 489 | } | ||
| 490 | }, | ||
| 491 | "400": { | ||
| 492 | "description": "Bad Request", | ||
| 493 | "schema": { | ||
| 494 | "$ref": "#/definitions/models.Response" | ||
| 495 | } | ||
| 496 | } | ||
| 497 | } | ||
| 464 | } | 498 | } |
| 465 | }, | 499 | }, |
| 466 | "/profile": { | 500 | "/profile": { |
| @@ -843,6 +877,37 @@ const docTemplate = `{ | |||
| 843 | } | 877 | } |
| 844 | } | 878 | } |
| 845 | }, | 879 | }, |
| 880 | "models.EditMapSummaryRequest": { | ||
| 881 | "type": "object", | ||
| 882 | "required": [ | ||
| 883 | "description", | ||
| 884 | "record_date", | ||
| 885 | "route_id", | ||
| 886 | "score_count", | ||
| 887 | "showcase", | ||
| 888 | "user_name" | ||
| 889 | ], | ||
| 890 | "properties": { | ||
| 891 | "description": { | ||
| 892 | "type": "string" | ||
| 893 | }, | ||
| 894 | "record_date": { | ||
| 895 | "type": "string" | ||
| 896 | }, | ||
| 897 | "route_id": { | ||
| 898 | "type": "integer" | ||
| 899 | }, | ||
| 900 | "score_count": { | ||
| 901 | "type": "integer" | ||
| 902 | }, | ||
| 903 | "showcase": { | ||
| 904 | "type": "string" | ||
| 905 | }, | ||
| 906 | "user_name": { | ||
| 907 | "type": "string" | ||
| 908 | } | ||
| 909 | } | ||
| 910 | }, | ||
| 846 | "models.Game": { | 911 | "models.Game": { |
| 847 | "type": "object", | 912 | "type": "object", |
| 848 | "properties": { | 913 | "properties": { |
| @@ -874,6 +939,9 @@ const docTemplate = `{ | |||
| 874 | "id": { | 939 | "id": { |
| 875 | "type": "integer" | 940 | "type": "integer" |
| 876 | }, | 941 | }, |
| 942 | "image": { | ||
| 943 | "type": "string" | ||
| 944 | }, | ||
| 877 | "map_name": { | 945 | "map_name": { |
| 878 | "type": "string" | 946 | "type": "string" |
| 879 | } | 947 | } |
| @@ -1003,24 +1071,12 @@ const docTemplate = `{ | |||
| 1003 | }, | 1071 | }, |
| 1004 | "models.RecordRequest": { | 1072 | "models.RecordRequest": { |
| 1005 | "type": "object", | 1073 | "type": "object", |
| 1006 | "required": [ | ||
| 1007 | "is_partner_orange", | ||
| 1008 | "partner_id", | ||
| 1009 | "score_count", | ||
| 1010 | "score_time" | ||
| 1011 | ], | ||
| 1012 | "properties": { | 1074 | "properties": { |
| 1013 | "is_partner_orange": { | 1075 | "is_partner_orange": { |
| 1014 | "type": "boolean" | 1076 | "type": "boolean" |
| 1015 | }, | 1077 | }, |
| 1016 | "partner_id": { | 1078 | "partner_id": { |
| 1017 | "type": "string" | 1079 | "type": "string" |
| 1018 | }, | ||
| 1019 | "score_count": { | ||
| 1020 | "type": "integer" | ||
| 1021 | }, | ||
| 1022 | "score_time": { | ||
| 1023 | "type": "integer" | ||
| 1024 | } | 1080 | } |
| 1025 | } | 1081 | } |
| 1026 | }, | 1082 | }, |
| @@ -1100,6 +1156,8 @@ var SwaggerInfo = &swag.Spec{ | |||
| 1100 | Description: "Backend API endpoints for the Least Portals Database.", | 1156 | Description: "Backend API endpoints for the Least Portals Database.", |
| 1101 | InfoInstanceName: "swagger", | 1157 | InfoInstanceName: "swagger", |
| 1102 | SwaggerTemplate: docTemplate, | 1158 | SwaggerTemplate: docTemplate, |
| 1159 | LeftDelim: "{{", | ||
| 1160 | RightDelim: "}}", | ||
| 1103 | } | 1161 | } |
| 1104 | 1162 | ||
| 1105 | func init() { | 1163 | func init() { |
diff --git a/docs/swagger.json b/docs/swagger.json index 2279ff6..62079b1 100644 --- a/docs/swagger.json +++ b/docs/swagger.json | |||
| @@ -338,26 +338,16 @@ | |||
| 338 | "required": true | 338 | "required": true |
| 339 | }, | 339 | }, |
| 340 | { | 340 | { |
| 341 | "type": "array", | 341 | "type": "file", |
| 342 | "items": { | 342 | "description": "Host Demo", |
| 343 | "type": "file" | 343 | "name": "host_demo", |
| 344 | }, | ||
| 345 | "description": "Demos", | ||
| 346 | "name": "demos", | ||
| 347 | "in": "formData", | 344 | "in": "formData", |
| 348 | "required": true | 345 | "required": true |
| 349 | }, | 346 | }, |
| 350 | { | 347 | { |
| 351 | "type": "integer", | 348 | "type": "file", |
| 352 | "description": "Score Count", | 349 | "description": "Partner Demo", |
| 353 | "name": "score_count", | 350 | "name": "partner_demo", |
| 354 | "in": "formData", | ||
| 355 | "required": true | ||
| 356 | }, | ||
| 357 | { | ||
| 358 | "type": "integer", | ||
| 359 | "description": "Score Time", | ||
| 360 | "name": "score_time", | ||
| 361 | "in": "formData", | 351 | "in": "formData", |
| 362 | "required": true | 352 | "required": true |
| 363 | }, | 353 | }, |
| @@ -454,6 +444,50 @@ | |||
| 454 | } | 444 | } |
| 455 | } | 445 | } |
| 456 | } | 446 | } |
| 447 | }, | ||
| 448 | "put": { | ||
| 449 | "produces": [ | ||
| 450 | "application/json" | ||
| 451 | ], | ||
| 452 | "tags": [ | ||
| 453 | "maps" | ||
| 454 | ], | ||
| 455 | "summary": "Edit map summary with specified map id.", | ||
| 456 | "parameters": [ | ||
| 457 | { | ||
| 458 | "type": "integer", | ||
| 459 | "description": "Map ID", | ||
| 460 | "name": "id", | ||
| 461 | "in": "path", | ||
| 462 | "required": true | ||
| 463 | } | ||
| 464 | ], | ||
| 465 | "responses": { | ||
| 466 | "200": { | ||
| 467 | "description": "OK", | ||
| 468 | "schema": { | ||
| 469 | "allOf": [ | ||
| 470 | { | ||
| 471 | "$ref": "#/definitions/models.Response" | ||
| 472 | }, | ||
| 473 | { | ||
| 474 | "type": "object", | ||
| 475 | "properties": { | ||
| 476 | "data": { | ||
| 477 | "$ref": "#/definitions/models.EditMapSummaryRequest" | ||
| 478 | } | ||
| 479 | } | ||
| 480 | } | ||
| 481 | ] | ||
| 482 | } | ||
| 483 | }, | ||
| 484 | "400": { | ||
| 485 | "description": "Bad Request", | ||
| 486 | "schema": { | ||
| 487 | "$ref": "#/definitions/models.Response" | ||
| 488 | } | ||
| 489 | } | ||
| 490 | } | ||
| 457 | } | 491 | } |
| 458 | }, | 492 | }, |
| 459 | "/profile": { | 493 | "/profile": { |
| @@ -836,6 +870,37 @@ | |||
| 836 | } | 870 | } |
| 837 | } | 871 | } |
| 838 | }, | 872 | }, |
| 873 | "models.EditMapSummaryRequest": { | ||
| 874 | "type": "object", | ||
| 875 | "required": [ | ||
| 876 | "description", | ||
| 877 | "record_date", | ||
| 878 | "route_id", | ||
| 879 | "score_count", | ||
| 880 | "showcase", | ||
| 881 | "user_name" | ||
| 882 | ], | ||
| 883 | "properties": { | ||
| 884 | "description": { | ||
| 885 | "type": "string" | ||
| 886 | }, | ||
| 887 | "record_date": { | ||
| 888 | "type": "string" | ||
| 889 | }, | ||
| 890 | "route_id": { | ||
| 891 | "type": "integer" | ||
| 892 | }, | ||
| 893 | "score_count": { | ||
| 894 | "type": "integer" | ||
| 895 | }, | ||
| 896 | "showcase": { | ||
| 897 | "type": "string" | ||
| 898 | }, | ||
| 899 | "user_name": { | ||
| 900 | "type": "string" | ||
| 901 | } | ||
| 902 | } | ||
| 903 | }, | ||
| 839 | "models.Game": { | 904 | "models.Game": { |
| 840 | "type": "object", | 905 | "type": "object", |
| 841 | "properties": { | 906 | "properties": { |
| @@ -867,6 +932,9 @@ | |||
| 867 | "id": { | 932 | "id": { |
| 868 | "type": "integer" | 933 | "type": "integer" |
| 869 | }, | 934 | }, |
| 935 | "image": { | ||
| 936 | "type": "string" | ||
| 937 | }, | ||
| 870 | "map_name": { | 938 | "map_name": { |
| 871 | "type": "string" | 939 | "type": "string" |
| 872 | } | 940 | } |
| @@ -996,24 +1064,12 @@ | |||
| 996 | }, | 1064 | }, |
| 997 | "models.RecordRequest": { | 1065 | "models.RecordRequest": { |
| 998 | "type": "object", | 1066 | "type": "object", |
| 999 | "required": [ | ||
| 1000 | "is_partner_orange", | ||
| 1001 | "partner_id", | ||
| 1002 | "score_count", | ||
| 1003 | "score_time" | ||
| 1004 | ], | ||
| 1005 | "properties": { | 1067 | "properties": { |
| 1006 | "is_partner_orange": { | 1068 | "is_partner_orange": { |
| 1007 | "type": "boolean" | 1069 | "type": "boolean" |
| 1008 | }, | 1070 | }, |
| 1009 | "partner_id": { | 1071 | "partner_id": { |
| 1010 | "type": "string" | 1072 | "type": "string" |
| 1011 | }, | ||
| 1012 | "score_count": { | ||
| 1013 | "type": "integer" | ||
| 1014 | }, | ||
| 1015 | "score_time": { | ||
| 1016 | "type": "integer" | ||
| 1017 | } | 1073 | } |
| 1018 | } | 1074 | } |
| 1019 | }, | 1075 | }, |
diff --git a/docs/swagger.yaml b/docs/swagger.yaml index ba4775a..9d58620 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml | |||
| @@ -32,6 +32,28 @@ definitions: | |||
| 32 | game: | 32 | game: |
| 33 | $ref: '#/definitions/models.Game' | 33 | $ref: '#/definitions/models.Game' |
| 34 | type: object | 34 | type: object |
| 35 | models.EditMapSummaryRequest: | ||
| 36 | properties: | ||
| 37 | description: | ||
| 38 | type: string | ||
| 39 | record_date: | ||
| 40 | type: string | ||
| 41 | route_id: | ||
| 42 | type: integer | ||
| 43 | score_count: | ||
| 44 | type: integer | ||
| 45 | showcase: | ||
| 46 | type: string | ||
| 47 | user_name: | ||
| 48 | type: string | ||
| 49 | required: | ||
| 50 | - description | ||
| 51 | - record_date | ||
| 52 | - route_id | ||
| 53 | - score_count | ||
| 54 | - showcase | ||
| 55 | - user_name | ||
| 56 | type: object | ||
| 35 | models.Game: | 57 | models.Game: |
| 36 | properties: | 58 | properties: |
| 37 | id: | 59 | id: |
| @@ -52,6 +74,8 @@ definitions: | |||
| 52 | type: string | 74 | type: string |
| 53 | id: | 75 | id: |
| 54 | type: integer | 76 | type: integer |
| 77 | image: | ||
| 78 | type: string | ||
| 55 | map_name: | 79 | map_name: |
| 56 | type: string | 80 | type: string |
| 57 | type: object | 81 | type: object |
| @@ -140,15 +164,6 @@ definitions: | |||
| 140 | type: boolean | 164 | type: boolean |
| 141 | partner_id: | 165 | partner_id: |
| 142 | type: string | 166 | type: string |
| 143 | score_count: | ||
| 144 | type: integer | ||
| 145 | score_time: | ||
| 146 | type: integer | ||
| 147 | required: | ||
| 148 | - is_partner_orange | ||
| 149 | - partner_id | ||
| 150 | - score_count | ||
| 151 | - score_time | ||
| 152 | type: object | 167 | type: object |
| 153 | models.Response: | 168 | models.Response: |
| 154 | properties: | 169 | properties: |
| @@ -388,23 +403,16 @@ paths: | |||
| 388 | name: Authorization | 403 | name: Authorization |
| 389 | required: true | 404 | required: true |
| 390 | type: string | 405 | type: string |
| 391 | - description: Demos | 406 | - description: Host Demo |
| 392 | in: formData | ||
| 393 | items: | ||
| 394 | type: file | ||
| 395 | name: demos | ||
| 396 | required: true | ||
| 397 | type: array | ||
| 398 | - description: Score Count | ||
| 399 | in: formData | 407 | in: formData |
| 400 | name: score_count | 408 | name: host_demo |
| 401 | required: true | 409 | required: true |
| 402 | type: integer | 410 | type: file |
| 403 | - description: Score Time | 411 | - description: Partner Demo |
| 404 | in: formData | 412 | in: formData |
| 405 | name: score_time | 413 | name: partner_demo |
| 406 | required: true | 414 | required: true |
| 407 | type: integer | 415 | type: file |
| 408 | - description: Is Partner Orange | 416 | - description: Is Partner Orange |
| 409 | in: formData | 417 | in: formData |
| 410 | name: is_partner_orange | 418 | name: is_partner_orange |
| @@ -465,6 +473,32 @@ paths: | |||
| 465 | summary: Get map summary with specified id. | 473 | summary: Get map summary with specified id. |
| 466 | tags: | 474 | tags: |
| 467 | - maps | 475 | - maps |
| 476 | put: | ||
| 477 | parameters: | ||
| 478 | - description: Map ID | ||
| 479 | in: path | ||
| 480 | name: id | ||
| 481 | required: true | ||
| 482 | type: integer | ||
| 483 | produces: | ||
| 484 | - application/json | ||
| 485 | responses: | ||
| 486 | "200": | ||
| 487 | description: OK | ||
| 488 | schema: | ||
| 489 | allOf: | ||
| 490 | - $ref: '#/definitions/models.Response' | ||
| 491 | - properties: | ||
| 492 | data: | ||
| 493 | $ref: '#/definitions/models.EditMapSummaryRequest' | ||
| 494 | type: object | ||
| 495 | "400": | ||
| 496 | description: Bad Request | ||
| 497 | schema: | ||
| 498 | $ref: '#/definitions/models.Response' | ||
| 499 | summary: Edit map summary with specified map id. | ||
| 500 | tags: | ||
| 501 | - maps | ||
| 468 | /profile: | 502 | /profile: |
| 469 | get: | 503 | get: |
| 470 | consumes: | 504 | consumes: |