aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-08-20 12:51:26 +0300
committerArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-08-20 12:51:26 +0300
commitca7acc2fdc6e6c8371ca5bbeeaabb02d11bb1bee (patch)
tree1196cbb2b253ecaddd80934cc849cfd52f68b3e4 /docs
parentfix: change map history from timestamp to date (diff)
downloadlphub-ca7acc2fdc6e6c8371ca5bbeeaabb02d11bb1bee.tar.gz
lphub-ca7acc2fdc6e6c8371ca5bbeeaabb02d11bb1bee.tar.bz2
lphub-ca7acc2fdc6e6c8371ca5bbeeaabb02d11bb1bee.zip
refactor: move structs around for better understanding
Former-commit-id: 0030a6b0c7b228772d8e27f5722ee6de1718786b
Diffstat (limited to '')
-rw-r--r--docs/docs.go300
-rw-r--r--docs/swagger.json300
-rw-r--r--docs/swagger.yaml216
3 files changed, 408 insertions, 408 deletions
diff --git a/docs/docs.go b/docs/docs.go
index 423afad..df01379 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -50,7 +50,7 @@ const docTemplate = `{
50 "type": "object", 50 "type": "object",
51 "properties": { 51 "properties": {
52 "data": { 52 "data": {
53 "$ref": "#/definitions/models.ChapterMapsResponse" 53 "$ref": "#/definitions/controllers.ChapterMapsResponse"
54 } 54 }
55 } 55 }
56 } 56 }
@@ -173,7 +173,7 @@ const docTemplate = `{
173 "type": "object", 173 "type": "object",
174 "properties": { 174 "properties": {
175 "data": { 175 "data": {
176 "$ref": "#/definitions/models.ChaptersResponse" 176 "$ref": "#/definitions/controllers.ChaptersResponse"
177 } 177 }
178 } 178 }
179 } 179 }
@@ -213,7 +213,7 @@ const docTemplate = `{
213 "type": "object", 213 "type": "object",
214 "properties": { 214 "properties": {
215 "data": { 215 "data": {
216 "$ref": "#/definitions/models.LoginResponse" 216 "$ref": "#/definitions/controllers.LoginResponse"
217 } 217 }
218 } 218 }
219 } 219 }
@@ -259,7 +259,7 @@ const docTemplate = `{
259 "in": "body", 259 "in": "body",
260 "required": true, 260 "required": true,
261 "schema": { 261 "schema": {
262 "$ref": "#/definitions/models.EditMapImageRequest" 262 "$ref": "#/definitions/controllers.EditMapImageRequest"
263 } 263 }
264 } 264 }
265 ], 265 ],
@@ -275,7 +275,7 @@ const docTemplate = `{
275 "type": "object", 275 "type": "object",
276 "properties": { 276 "properties": {
277 "data": { 277 "data": {
278 "$ref": "#/definitions/models.EditMapImageRequest" 278 "$ref": "#/definitions/controllers.EditMapImageRequest"
279 } 279 }
280 } 280 }
281 } 281 }
@@ -414,7 +414,7 @@ const docTemplate = `{
414 "type": "object", 414 "type": "object",
415 "properties": { 415 "properties": {
416 "data": { 416 "data": {
417 "$ref": "#/definitions/models.RecordResponse" 417 "$ref": "#/definitions/controllers.RecordResponse"
418 } 418 }
419 } 419 }
420 } 420 }
@@ -466,7 +466,7 @@ const docTemplate = `{
466 "type": "object", 466 "type": "object",
467 "properties": { 467 "properties": {
468 "data": { 468 "data": {
469 "$ref": "#/definitions/models.MapSummaryResponse" 469 "$ref": "#/definitions/controllers.MapSummaryResponse"
470 } 470 }
471 } 471 }
472 } 472 }
@@ -510,7 +510,7 @@ const docTemplate = `{
510 "in": "body", 510 "in": "body",
511 "required": true, 511 "required": true,
512 "schema": { 512 "schema": {
513 "$ref": "#/definitions/models.EditMapSummaryRequest" 513 "$ref": "#/definitions/controllers.EditMapSummaryRequest"
514 } 514 }
515 } 515 }
516 ], 516 ],
@@ -526,7 +526,7 @@ const docTemplate = `{
526 "type": "object", 526 "type": "object",
527 "properties": { 527 "properties": {
528 "data": { 528 "data": {
529 "$ref": "#/definitions/models.EditMapSummaryRequest" 529 "$ref": "#/definitions/controllers.EditMapSummaryRequest"
530 } 530 }
531 } 531 }
532 } 532 }
@@ -570,7 +570,7 @@ const docTemplate = `{
570 "in": "body", 570 "in": "body",
571 "required": true, 571 "required": true,
572 "schema": { 572 "schema": {
573 "$ref": "#/definitions/models.CreateMapSummaryRequest" 573 "$ref": "#/definitions/controllers.CreateMapSummaryRequest"
574 } 574 }
575 } 575 }
576 ], 576 ],
@@ -586,7 +586,7 @@ const docTemplate = `{
586 "type": "object", 586 "type": "object",
587 "properties": { 587 "properties": {
588 "data": { 588 "data": {
589 "$ref": "#/definitions/models.CreateMapSummaryRequest" 589 "$ref": "#/definitions/controllers.CreateMapSummaryRequest"
590 } 590 }
591 } 591 }
592 } 592 }
@@ -630,7 +630,7 @@ const docTemplate = `{
630 "in": "body", 630 "in": "body",
631 "required": true, 631 "required": true,
632 "schema": { 632 "schema": {
633 "$ref": "#/definitions/models.DeleteMapSummaryRequest" 633 "$ref": "#/definitions/controllers.DeleteMapSummaryRequest"
634 } 634 }
635 } 635 }
636 ], 636 ],
@@ -646,7 +646,7 @@ const docTemplate = `{
646 "type": "object", 646 "type": "object",
647 "properties": { 647 "properties": {
648 "data": { 648 "data": {
649 "$ref": "#/definitions/models.DeleteMapSummaryRequest" 649 "$ref": "#/definitions/controllers.DeleteMapSummaryRequest"
650 } 650 }
651 } 651 }
652 } 652 }
@@ -695,7 +695,7 @@ const docTemplate = `{
695 "type": "object", 695 "type": "object",
696 "properties": { 696 "properties": {
697 "data": { 697 "data": {
698 "$ref": "#/definitions/models.ProfileResponse" 698 "$ref": "#/definitions/controllers.ProfileResponse"
699 } 699 }
700 } 700 }
701 } 701 }
@@ -796,7 +796,7 @@ const docTemplate = `{
796 "type": "object", 796 "type": "object",
797 "properties": { 797 "properties": {
798 "data": { 798 "data": {
799 "$ref": "#/definitions/models.ProfileResponse" 799 "$ref": "#/definitions/controllers.ProfileResponse"
800 } 800 }
801 } 801 }
802 } 802 }
@@ -839,7 +839,7 @@ const docTemplate = `{
839 "type": "object", 839 "type": "object",
840 "properties": { 840 "properties": {
841 "data": { 841 "data": {
842 "$ref": "#/definitions/models.RankingsResponse" 842 "$ref": "#/definitions/controllers.RankingsResponse"
843 } 843 }
844 } 844 }
845 } 845 }
@@ -884,7 +884,7 @@ const docTemplate = `{
884 "type": "object", 884 "type": "object",
885 "properties": { 885 "properties": {
886 "data": { 886 "data": {
887 "$ref": "#/definitions/models.SearchResponse" 887 "$ref": "#/definitions/controllers.SearchResponse"
888 } 888 }
889 } 889 }
890 } 890 }
@@ -921,7 +921,7 @@ const docTemplate = `{
921 "type": "object", 921 "type": "object",
922 "properties": { 922 "properties": {
923 "data": { 923 "data": {
924 "$ref": "#/definitions/models.LoginResponse" 924 "$ref": "#/definitions/controllers.LoginResponse"
925 } 925 }
926 } 926 }
927 } 927 }
@@ -956,7 +956,7 @@ const docTemplate = `{
956 "type": "object", 956 "type": "object",
957 "properties": { 957 "properties": {
958 "data": { 958 "data": {
959 "$ref": "#/definitions/models.LoginResponse" 959 "$ref": "#/definitions/controllers.LoginResponse"
960 } 960 }
961 } 961 }
962 } 962 }
@@ -1005,7 +1005,7 @@ const docTemplate = `{
1005 "type": "object", 1005 "type": "object",
1006 "properties": { 1006 "properties": {
1007 "data": { 1007 "data": {
1008 "$ref": "#/definitions/models.ProfileResponse" 1008 "$ref": "#/definitions/controllers.ProfileResponse"
1009 } 1009 }
1010 } 1010 }
1011 } 1011 }
@@ -1029,29 +1029,7 @@ const docTemplate = `{
1029 } 1029 }
1030 }, 1030 },
1031 "definitions": { 1031 "definitions": {
1032 "models.Category": { 1032 "controllers.ChapterMapsResponse": {
1033 "type": "object",
1034 "properties": {
1035 "id": {
1036 "type": "integer"
1037 },
1038 "name": {
1039 "type": "string"
1040 }
1041 }
1042 },
1043 "models.Chapter": {
1044 "type": "object",
1045 "properties": {
1046 "id": {
1047 "type": "integer"
1048 },
1049 "name": {
1050 "type": "string"
1051 }
1052 }
1053 },
1054 "models.ChapterMapsResponse": {
1055 "type": "object", 1033 "type": "object",
1056 "properties": { 1034 "properties": {
1057 "chapter": { 1035 "chapter": {
@@ -1065,7 +1043,7 @@ const docTemplate = `{
1065 } 1043 }
1066 } 1044 }
1067 }, 1045 },
1068 "models.ChaptersResponse": { 1046 "controllers.ChaptersResponse": {
1069 "type": "object", 1047 "type": "object",
1070 "properties": { 1048 "properties": {
1071 "chapters": { 1049 "chapters": {
@@ -1079,7 +1057,7 @@ const docTemplate = `{
1079 } 1057 }
1080 } 1058 }
1081 }, 1059 },
1082 "models.CreateMapSummaryRequest": { 1060 "controllers.CreateMapSummaryRequest": {
1083 "type": "object", 1061 "type": "object",
1084 "required": [ 1062 "required": [
1085 "category_id", 1063 "category_id",
@@ -1109,7 +1087,7 @@ const docTemplate = `{
1109 } 1087 }
1110 } 1088 }
1111 }, 1089 },
1112 "models.DeleteMapSummaryRequest": { 1090 "controllers.DeleteMapSummaryRequest": {
1113 "type": "object", 1091 "type": "object",
1114 "required": [ 1092 "required": [
1115 "route_id" 1093 "route_id"
@@ -1120,7 +1098,7 @@ const docTemplate = `{
1120 } 1098 }
1121 } 1099 }
1122 }, 1100 },
1123 "models.EditMapImageRequest": { 1101 "controllers.EditMapImageRequest": {
1124 "type": "object", 1102 "type": "object",
1125 "required": [ 1103 "required": [
1126 "image" 1104 "image"
@@ -1131,7 +1109,7 @@ const docTemplate = `{
1131 } 1109 }
1132 } 1110 }
1133 }, 1111 },
1134 "models.EditMapSummaryRequest": { 1112 "controllers.EditMapSummaryRequest": {
1135 "type": "object", 1113 "type": "object",
1136 "required": [ 1114 "required": [
1137 "description", 1115 "description",
@@ -1161,24 +1139,143 @@ const docTemplate = `{
1161 } 1139 }
1162 } 1140 }
1163 }, 1141 },
1164 "models.Game": { 1142 "controllers.LoginResponse": {
1143 "type": "object",
1144 "properties": {
1145 "token": {
1146 "type": "string"
1147 }
1148 }
1149 },
1150 "controllers.MapSummaryResponse": {
1151 "type": "object",
1152 "properties": {
1153 "map": {
1154 "$ref": "#/definitions/models.Map"
1155 },
1156 "summary": {
1157 "$ref": "#/definitions/models.MapSummary"
1158 }
1159 }
1160 },
1161 "controllers.ProfileResponse": {
1162 "type": "object",
1163 "properties": {
1164 "avatar_link": {
1165 "type": "string"
1166 },
1167 "country_code": {
1168 "type": "string"
1169 },
1170 "profile": {
1171 "type": "boolean"
1172 },
1173 "scores_mp": {
1174 "type": "array",
1175 "items": {
1176 "$ref": "#/definitions/controllers.ScoreResponse"
1177 }
1178 },
1179 "scores_sp": {
1180 "type": "array",
1181 "items": {
1182 "$ref": "#/definitions/controllers.ScoreResponse"
1183 }
1184 },
1185 "steam_id": {
1186 "type": "string"
1187 },
1188 "user_name": {
1189 "type": "string"
1190 }
1191 }
1192 },
1193 "controllers.RankingsResponse": {
1194 "type": "object",
1195 "properties": {
1196 "rankings_mp": {
1197 "type": "array",
1198 "items": {
1199 "$ref": "#/definitions/models.UserRanking"
1200 }
1201 },
1202 "rankings_sp": {
1203 "type": "array",
1204 "items": {
1205 "$ref": "#/definitions/models.UserRanking"
1206 }
1207 }
1208 }
1209 },
1210 "controllers.RecordResponse": {
1211 "type": "object",
1212 "properties": {
1213 "score_count": {
1214 "type": "integer"
1215 },
1216 "score_time": {
1217 "type": "integer"
1218 }
1219 }
1220 },
1221 "controllers.ScoreResponse": {
1222 "type": "object",
1223 "properties": {
1224 "map_id": {
1225 "type": "integer"
1226 },
1227 "records": {}
1228 }
1229 },
1230 "controllers.SearchResponse": {
1231 "type": "object",
1232 "properties": {
1233 "maps": {
1234 "type": "array",
1235 "items": {
1236 "$ref": "#/definitions/models.MapShort"
1237 }
1238 },
1239 "players": {
1240 "type": "array",
1241 "items": {
1242 "$ref": "#/definitions/models.UserShort"
1243 }
1244 }
1245 }
1246 },
1247 "models.Category": {
1165 "type": "object", 1248 "type": "object",
1166 "properties": { 1249 "properties": {
1167 "id": { 1250 "id": {
1168 "type": "integer" 1251 "type": "integer"
1169 }, 1252 },
1170 "is_coop": { 1253 "name": {
1171 "type": "boolean" 1254 "type": "string"
1255 }
1256 }
1257 },
1258 "models.Chapter": {
1259 "type": "object",
1260 "properties": {
1261 "id": {
1262 "type": "integer"
1172 }, 1263 },
1173 "name": { 1264 "name": {
1174 "type": "string" 1265 "type": "string"
1175 } 1266 }
1176 } 1267 }
1177 }, 1268 },
1178 "models.LoginResponse": { 1269 "models.Game": {
1179 "type": "object", 1270 "type": "object",
1180 "properties": { 1271 "properties": {
1181 "token": { 1272 "id": {
1273 "type": "integer"
1274 },
1275 "is_coop": {
1276 "type": "boolean"
1277 },
1278 "name": {
1182 "type": "string" 1279 "type": "string"
1183 } 1280 }
1184 } 1281 }
@@ -1271,77 +1368,6 @@ const docTemplate = `{
1271 } 1368 }
1272 } 1369 }
1273 }, 1370 },
1274 "models.MapSummaryResponse": {
1275 "type": "object",
1276 "properties": {
1277 "map": {
1278 "$ref": "#/definitions/models.Map"
1279 },
1280 "summary": {
1281 "$ref": "#/definitions/models.MapSummary"
1282 }
1283 }
1284 },
1285 "models.ProfileResponse": {
1286 "type": "object",
1287 "properties": {
1288 "avatar_link": {
1289 "type": "string"
1290 },
1291 "country_code": {
1292 "type": "string"
1293 },
1294 "profile": {
1295 "type": "boolean"
1296 },
1297 "scores_mp": {
1298 "type": "array",
1299 "items": {
1300 "$ref": "#/definitions/models.ScoreResponse"
1301 }
1302 },
1303 "scores_sp": {
1304 "type": "array",
1305 "items": {
1306 "$ref": "#/definitions/models.ScoreResponse"
1307 }
1308 },
1309 "steam_id": {
1310 "type": "string"
1311 },
1312 "user_name": {
1313 "type": "string"
1314 }
1315 }
1316 },
1317 "models.RankingsResponse": {
1318 "type": "object",
1319 "properties": {
1320 "rankings_mp": {
1321 "type": "array",
1322 "items": {
1323 "$ref": "#/definitions/models.UserRanking"
1324 }
1325 },
1326 "rankings_sp": {
1327 "type": "array",
1328 "items": {
1329 "$ref": "#/definitions/models.UserRanking"
1330 }
1331 }
1332 }
1333 },
1334 "models.RecordResponse": {
1335 "type": "object",
1336 "properties": {
1337 "score_count": {
1338 "type": "integer"
1339 },
1340 "score_time": {
1341 "type": "integer"
1342 }
1343 }
1344 },
1345 "models.Response": { 1371 "models.Response": {
1346 "type": "object", 1372 "type": "object",
1347 "properties": { 1373 "properties": {
@@ -1354,32 +1380,6 @@ const docTemplate = `{
1354 } 1380 }
1355 } 1381 }
1356 }, 1382 },
1357 "models.ScoreResponse": {
1358 "type": "object",
1359 "properties": {
1360 "map_id": {
1361 "type": "integer"
1362 },
1363 "records": {}
1364 }
1365 },
1366 "models.SearchResponse": {
1367 "type": "object",
1368 "properties": {
1369 "maps": {
1370 "type": "array",
1371 "items": {
1372 "$ref": "#/definitions/models.MapShort"
1373 }
1374 },
1375 "players": {
1376 "type": "array",
1377 "items": {
1378 "$ref": "#/definitions/models.UserShort"
1379 }
1380 }
1381 }
1382 },
1383 "models.UserRanking": { 1383 "models.UserRanking": {
1384 "type": "object", 1384 "type": "object",
1385 "properties": { 1385 "properties": {
diff --git a/docs/swagger.json b/docs/swagger.json
index 2e1a789..0f3dade 100644
--- a/docs/swagger.json
+++ b/docs/swagger.json
@@ -43,7 +43,7 @@
43 "type": "object", 43 "type": "object",
44 "properties": { 44 "properties": {
45 "data": { 45 "data": {
46 "$ref": "#/definitions/models.ChapterMapsResponse" 46 "$ref": "#/definitions/controllers.ChapterMapsResponse"
47 } 47 }
48 } 48 }
49 } 49 }
@@ -166,7 +166,7 @@
166 "type": "object", 166 "type": "object",
167 "properties": { 167 "properties": {
168 "data": { 168 "data": {
169 "$ref": "#/definitions/models.ChaptersResponse" 169 "$ref": "#/definitions/controllers.ChaptersResponse"
170 } 170 }
171 } 171 }
172 } 172 }
@@ -206,7 +206,7 @@
206 "type": "object", 206 "type": "object",
207 "properties": { 207 "properties": {
208 "data": { 208 "data": {
209 "$ref": "#/definitions/models.LoginResponse" 209 "$ref": "#/definitions/controllers.LoginResponse"
210 } 210 }
211 } 211 }
212 } 212 }
@@ -252,7 +252,7 @@
252 "in": "body", 252 "in": "body",
253 "required": true, 253 "required": true,
254 "schema": { 254 "schema": {
255 "$ref": "#/definitions/models.EditMapImageRequest" 255 "$ref": "#/definitions/controllers.EditMapImageRequest"
256 } 256 }
257 } 257 }
258 ], 258 ],
@@ -268,7 +268,7 @@
268 "type": "object", 268 "type": "object",
269 "properties": { 269 "properties": {
270 "data": { 270 "data": {
271 "$ref": "#/definitions/models.EditMapImageRequest" 271 "$ref": "#/definitions/controllers.EditMapImageRequest"
272 } 272 }
273 } 273 }
274 } 274 }
@@ -407,7 +407,7 @@
407 "type": "object", 407 "type": "object",
408 "properties": { 408 "properties": {
409 "data": { 409 "data": {
410 "$ref": "#/definitions/models.RecordResponse" 410 "$ref": "#/definitions/controllers.RecordResponse"
411 } 411 }
412 } 412 }
413 } 413 }
@@ -459,7 +459,7 @@
459 "type": "object", 459 "type": "object",
460 "properties": { 460 "properties": {
461 "data": { 461 "data": {
462 "$ref": "#/definitions/models.MapSummaryResponse" 462 "$ref": "#/definitions/controllers.MapSummaryResponse"
463 } 463 }
464 } 464 }
465 } 465 }
@@ -503,7 +503,7 @@
503 "in": "body", 503 "in": "body",
504 "required": true, 504 "required": true,
505 "schema": { 505 "schema": {
506 "$ref": "#/definitions/models.EditMapSummaryRequest" 506 "$ref": "#/definitions/controllers.EditMapSummaryRequest"
507 } 507 }
508 } 508 }
509 ], 509 ],
@@ -519,7 +519,7 @@
519 "type": "object", 519 "type": "object",
520 "properties": { 520 "properties": {
521 "data": { 521 "data": {
522 "$ref": "#/definitions/models.EditMapSummaryRequest" 522 "$ref": "#/definitions/controllers.EditMapSummaryRequest"
523 } 523 }
524 } 524 }
525 } 525 }
@@ -563,7 +563,7 @@
563 "in": "body", 563 "in": "body",
564 "required": true, 564 "required": true,
565 "schema": { 565 "schema": {
566 "$ref": "#/definitions/models.CreateMapSummaryRequest" 566 "$ref": "#/definitions/controllers.CreateMapSummaryRequest"
567 } 567 }
568 } 568 }
569 ], 569 ],
@@ -579,7 +579,7 @@
579 "type": "object", 579 "type": "object",
580 "properties": { 580 "properties": {
581 "data": { 581 "data": {
582 "$ref": "#/definitions/models.CreateMapSummaryRequest" 582 "$ref": "#/definitions/controllers.CreateMapSummaryRequest"
583 } 583 }
584 } 584 }
585 } 585 }
@@ -623,7 +623,7 @@
623 "in": "body", 623 "in": "body",
624 "required": true, 624 "required": true,
625 "schema": { 625 "schema": {
626 "$ref": "#/definitions/models.DeleteMapSummaryRequest" 626 "$ref": "#/definitions/controllers.DeleteMapSummaryRequest"
627 } 627 }
628 } 628 }
629 ], 629 ],
@@ -639,7 +639,7 @@
639 "type": "object", 639 "type": "object",
640 "properties": { 640 "properties": {
641 "data": { 641 "data": {
642 "$ref": "#/definitions/models.DeleteMapSummaryRequest" 642 "$ref": "#/definitions/controllers.DeleteMapSummaryRequest"
643 } 643 }
644 } 644 }
645 } 645 }
@@ -688,7 +688,7 @@
688 "type": "object", 688 "type": "object",
689 "properties": { 689 "properties": {
690 "data": { 690 "data": {
691 "$ref": "#/definitions/models.ProfileResponse" 691 "$ref": "#/definitions/controllers.ProfileResponse"
692 } 692 }
693 } 693 }
694 } 694 }
@@ -789,7 +789,7 @@
789 "type": "object", 789 "type": "object",
790 "properties": { 790 "properties": {
791 "data": { 791 "data": {
792 "$ref": "#/definitions/models.ProfileResponse" 792 "$ref": "#/definitions/controllers.ProfileResponse"
793 } 793 }
794 } 794 }
795 } 795 }
@@ -832,7 +832,7 @@
832 "type": "object", 832 "type": "object",
833 "properties": { 833 "properties": {
834 "data": { 834 "data": {
835 "$ref": "#/definitions/models.RankingsResponse" 835 "$ref": "#/definitions/controllers.RankingsResponse"
836 } 836 }
837 } 837 }
838 } 838 }
@@ -877,7 +877,7 @@
877 "type": "object", 877 "type": "object",
878 "properties": { 878 "properties": {
879 "data": { 879 "data": {
880 "$ref": "#/definitions/models.SearchResponse" 880 "$ref": "#/definitions/controllers.SearchResponse"
881 } 881 }
882 } 882 }
883 } 883 }
@@ -914,7 +914,7 @@
914 "type": "object", 914 "type": "object",
915 "properties": { 915 "properties": {
916 "data": { 916 "data": {
917 "$ref": "#/definitions/models.LoginResponse" 917 "$ref": "#/definitions/controllers.LoginResponse"
918 } 918 }
919 } 919 }
920 } 920 }
@@ -949,7 +949,7 @@
949 "type": "object", 949 "type": "object",
950 "properties": { 950 "properties": {
951 "data": { 951 "data": {
952 "$ref": "#/definitions/models.LoginResponse" 952 "$ref": "#/definitions/controllers.LoginResponse"
953 } 953 }
954 } 954 }
955 } 955 }
@@ -998,7 +998,7 @@
998 "type": "object", 998 "type": "object",
999 "properties": { 999 "properties": {
1000 "data": { 1000 "data": {
1001 "$ref": "#/definitions/models.ProfileResponse" 1001 "$ref": "#/definitions/controllers.ProfileResponse"
1002 } 1002 }
1003 } 1003 }
1004 } 1004 }
@@ -1022,29 +1022,7 @@
1022 } 1022 }
1023 }, 1023 },
1024 "definitions": { 1024 "definitions": {
1025 "models.Category": { 1025 "controllers.ChapterMapsResponse": {
1026 "type": "object",
1027 "properties": {
1028 "id": {
1029 "type": "integer"
1030 },
1031 "name": {
1032 "type": "string"
1033 }
1034 }
1035 },
1036 "models.Chapter": {
1037 "type": "object",
1038 "properties": {
1039 "id": {
1040 "type": "integer"
1041 },
1042 "name": {
1043 "type": "string"
1044 }
1045 }
1046 },
1047 "models.ChapterMapsResponse": {
1048 "type": "object", 1026 "type": "object",
1049 "properties": { 1027 "properties": {
1050 "chapter": { 1028 "chapter": {
@@ -1058,7 +1036,7 @@
1058 } 1036 }
1059 } 1037 }
1060 }, 1038 },
1061 "models.ChaptersResponse": { 1039 "controllers.ChaptersResponse": {
1062 "type": "object", 1040 "type": "object",
1063 "properties": { 1041 "properties": {
1064 "chapters": { 1042 "chapters": {
@@ -1072,7 +1050,7 @@
1072 } 1050 }
1073 } 1051 }
1074 }, 1052 },
1075 "models.CreateMapSummaryRequest": { 1053 "controllers.CreateMapSummaryRequest": {
1076 "type": "object", 1054 "type": "object",
1077 "required": [ 1055 "required": [
1078 "category_id", 1056 "category_id",
@@ -1102,7 +1080,7 @@
1102 } 1080 }
1103 } 1081 }
1104 }, 1082 },
1105 "models.DeleteMapSummaryRequest": { 1083 "controllers.DeleteMapSummaryRequest": {
1106 "type": "object", 1084 "type": "object",
1107 "required": [ 1085 "required": [
1108 "route_id" 1086 "route_id"
@@ -1113,7 +1091,7 @@
1113 } 1091 }
1114 } 1092 }
1115 }, 1093 },
1116 "models.EditMapImageRequest": { 1094 "controllers.EditMapImageRequest": {
1117 "type": "object", 1095 "type": "object",
1118 "required": [ 1096 "required": [
1119 "image" 1097 "image"
@@ -1124,7 +1102,7 @@
1124 } 1102 }
1125 } 1103 }
1126 }, 1104 },
1127 "models.EditMapSummaryRequest": { 1105 "controllers.EditMapSummaryRequest": {
1128 "type": "object", 1106 "type": "object",
1129 "required": [ 1107 "required": [
1130 "description", 1108 "description",
@@ -1154,24 +1132,143 @@
1154 } 1132 }
1155 } 1133 }
1156 }, 1134 },
1157 "models.Game": { 1135 "controllers.LoginResponse": {
1136 "type": "object",
1137 "properties": {
1138 "token": {
1139 "type": "string"
1140 }
1141 }
1142 },
1143 "controllers.MapSummaryResponse": {
1144 "type": "object",
1145 "properties": {
1146 "map": {
1147 "$ref": "#/definitions/models.Map"
1148 },
1149 "summary": {
1150 "$ref": "#/definitions/models.MapSummary"
1151 }
1152 }
1153 },
1154 "controllers.ProfileResponse": {
1155 "type": "object",
1156 "properties": {
1157 "avatar_link": {
1158 "type": "string"
1159 },
1160 "country_code": {
1161 "type": "string"
1162 },
1163 "profile": {
1164 "type": "boolean"
1165 },
1166 "scores_mp": {
1167 "type": "array",
1168 "items": {
1169 "$ref": "#/definitions/controllers.ScoreResponse"
1170 }
1171 },
1172 "scores_sp": {
1173 "type": "array",
1174 "items": {
1175 "$ref": "#/definitions/controllers.ScoreResponse"
1176 }
1177 },
1178 "steam_id": {
1179 "type": "string"
1180 },
1181 "user_name": {
1182 "type": "string"
1183 }
1184 }
1185 },
1186 "controllers.RankingsResponse": {
1187 "type": "object",
1188 "properties": {
1189 "rankings_mp": {
1190 "type": "array",
1191 "items": {
1192 "$ref": "#/definitions/models.UserRanking"
1193 }
1194 },
1195 "rankings_sp": {
1196 "type": "array",
1197 "items": {
1198 "$ref": "#/definitions/models.UserRanking"
1199 }
1200 }
1201 }
1202 },
1203 "controllers.RecordResponse": {
1204 "type": "object",
1205 "properties": {
1206 "score_count": {
1207 "type": "integer"
1208 },
1209 "score_time": {
1210 "type": "integer"
1211 }
1212 }
1213 },
1214 "controllers.ScoreResponse": {
1215 "type": "object",
1216 "properties": {
1217 "map_id": {
1218 "type": "integer"
1219 },
1220 "records": {}
1221 }
1222 },
1223 "controllers.SearchResponse": {
1224 "type": "object",
1225 "properties": {
1226 "maps": {
1227 "type": "array",
1228 "items": {
1229 "$ref": "#/definitions/models.MapShort"
1230 }
1231 },
1232 "players": {
1233 "type": "array",
1234 "items": {
1235 "$ref": "#/definitions/models.UserShort"
1236 }
1237 }
1238 }
1239 },
1240 "models.Category": {
1158 "type": "object", 1241 "type": "object",
1159 "properties": { 1242 "properties": {
1160 "id": { 1243 "id": {
1161 "type": "integer" 1244 "type": "integer"
1162 }, 1245 },
1163 "is_coop": { 1246 "name": {
1164 "type": "boolean" 1247 "type": "string"
1248 }
1249 }
1250 },
1251 "models.Chapter": {
1252 "type": "object",
1253 "properties": {
1254 "id": {
1255 "type": "integer"
1165 }, 1256 },
1166 "name": { 1257 "name": {
1167 "type": "string" 1258 "type": "string"
1168 } 1259 }
1169 } 1260 }
1170 }, 1261 },
1171 "models.LoginResponse": { 1262 "models.Game": {
1172 "type": "object", 1263 "type": "object",
1173 "properties": { 1264 "properties": {
1174 "token": { 1265 "id": {
1266 "type": "integer"
1267 },
1268 "is_coop": {
1269 "type": "boolean"
1270 },
1271 "name": {
1175 "type": "string" 1272 "type": "string"
1176 } 1273 }
1177 } 1274 }
@@ -1264,77 +1361,6 @@
1264 } 1361 }
1265 } 1362 }
1266 }, 1363 },
1267 "models.MapSummaryResponse": {
1268 "type": "object",
1269 "properties": {
1270 "map": {
1271 "$ref": "#/definitions/models.Map"
1272 },
1273 "summary": {
1274 "$ref": "#/definitions/models.MapSummary"
1275 }
1276 }
1277 },
1278 "models.ProfileResponse": {
1279 "type": "object",
1280 "properties": {
1281 "avatar_link": {
1282 "type": "string"
1283 },
1284 "country_code": {
1285 "type": "string"
1286 },
1287 "profile": {
1288 "type": "boolean"
1289 },
1290 "scores_mp": {
1291 "type": "array",
1292 "items": {
1293 "$ref": "#/definitions/models.ScoreResponse"
1294 }
1295 },
1296 "scores_sp": {
1297 "type": "array",
1298 "items": {
1299 "$ref": "#/definitions/models.ScoreResponse"
1300 }
1301 },
1302 "steam_id": {
1303 "type": "string"
1304 },
1305 "user_name": {
1306 "type": "string"
1307 }
1308 }
1309 },
1310 "models.RankingsResponse": {
1311 "type": "object",
1312 "properties": {
1313 "rankings_mp": {
1314 "type": "array",
1315 "items": {
1316 "$ref": "#/definitions/models.UserRanking"
1317 }
1318 },
1319 "rankings_sp": {
1320 "type": "array",
1321 "items": {
1322 "$ref": "#/definitions/models.UserRanking"
1323 }
1324 }
1325 }
1326 },
1327 "models.RecordResponse": {
1328 "type": "object",
1329 "properties": {
1330 "score_count": {
1331 "type": "integer"
1332 },
1333 "score_time": {
1334 "type": "integer"
1335 }
1336 }
1337 },
1338 "models.Response": { 1364 "models.Response": {
1339 "type": "object", 1365 "type": "object",
1340 "properties": { 1366 "properties": {
@@ -1347,32 +1373,6 @@
1347 } 1373 }
1348 } 1374 }
1349 }, 1375 },
1350 "models.ScoreResponse": {
1351 "type": "object",
1352 "properties": {
1353 "map_id": {
1354 "type": "integer"
1355 },
1356 "records": {}
1357 }
1358 },
1359 "models.SearchResponse": {
1360 "type": "object",
1361 "properties": {
1362 "maps": {
1363 "type": "array",
1364 "items": {
1365 "$ref": "#/definitions/models.MapShort"
1366 }
1367 },
1368 "players": {
1369 "type": "array",
1370 "items": {
1371 "$ref": "#/definitions/models.UserShort"
1372 }
1373 }
1374 }
1375 },
1376 "models.UserRanking": { 1376 "models.UserRanking": {
1377 "type": "object", 1377 "type": "object",
1378 "properties": { 1378 "properties": {
diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index 7571073..f50fecb 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -1,20 +1,6 @@
1basePath: /v1 1basePath: /v1
2definitions: 2definitions:
3 models.Category: 3 controllers.ChapterMapsResponse:
4 properties:
5 id:
6 type: integer
7 name:
8 type: string
9 type: object
10 models.Chapter:
11 properties:
12 id:
13 type: integer
14 name:
15 type: string
16 type: object
17 models.ChapterMapsResponse:
18 properties: 4 properties:
19 chapter: 5 chapter:
20 $ref: '#/definitions/models.Chapter' 6 $ref: '#/definitions/models.Chapter'
@@ -23,7 +9,7 @@ definitions:
23 $ref: '#/definitions/models.MapShort' 9 $ref: '#/definitions/models.MapShort'
24 type: array 10 type: array
25 type: object 11 type: object
26 models.ChaptersResponse: 12 controllers.ChaptersResponse:
27 properties: 13 properties:
28 chapters: 14 chapters:
29 items: 15 items:
@@ -32,7 +18,7 @@ definitions:
32 game: 18 game:
33 $ref: '#/definitions/models.Game' 19 $ref: '#/definitions/models.Game'
34 type: object 20 type: object
35 models.CreateMapSummaryRequest: 21 controllers.CreateMapSummaryRequest:
36 properties: 22 properties:
37 category_id: 23 category_id:
38 type: integer 24 type: integer
@@ -53,21 +39,21 @@ definitions:
53 - score_count 39 - score_count
54 - user_name 40 - user_name
55 type: object 41 type: object
56 models.DeleteMapSummaryRequest: 42 controllers.DeleteMapSummaryRequest:
57 properties: 43 properties:
58 route_id: 44 route_id:
59 type: integer 45 type: integer
60 required: 46 required:
61 - route_id 47 - route_id
62 type: object 48 type: object
63 models.EditMapImageRequest: 49 controllers.EditMapImageRequest:
64 properties: 50 properties:
65 image: 51 image:
66 type: string 52 type: string
67 required: 53 required:
68 - image 54 - image
69 type: object 55 type: object
70 models.EditMapSummaryRequest: 56 controllers.EditMapSummaryRequest:
71 properties: 57 properties:
72 description: 58 description:
73 type: string 59 type: string
@@ -88,18 +74,95 @@ definitions:
88 - score_count 74 - score_count
89 - user_name 75 - user_name
90 type: object 76 type: object
91 models.Game: 77 controllers.LoginResponse:
78 properties:
79 token:
80 type: string
81 type: object
82 controllers.MapSummaryResponse:
83 properties:
84 map:
85 $ref: '#/definitions/models.Map'
86 summary:
87 $ref: '#/definitions/models.MapSummary'
88 type: object
89 controllers.ProfileResponse:
90 properties:
91 avatar_link:
92 type: string
93 country_code:
94 type: string
95 profile:
96 type: boolean
97 scores_mp:
98 items:
99 $ref: '#/definitions/controllers.ScoreResponse'
100 type: array
101 scores_sp:
102 items:
103 $ref: '#/definitions/controllers.ScoreResponse'
104 type: array
105 steam_id:
106 type: string
107 user_name:
108 type: string
109 type: object
110 controllers.RankingsResponse:
111 properties:
112 rankings_mp:
113 items:
114 $ref: '#/definitions/models.UserRanking'
115 type: array
116 rankings_sp:
117 items:
118 $ref: '#/definitions/models.UserRanking'
119 type: array
120 type: object
121 controllers.RecordResponse:
122 properties:
123 score_count:
124 type: integer
125 score_time:
126 type: integer
127 type: object
128 controllers.ScoreResponse:
129 properties:
130 map_id:
131 type: integer
132 records: {}
133 type: object
134 controllers.SearchResponse:
135 properties:
136 maps:
137 items:
138 $ref: '#/definitions/models.MapShort'
139 type: array
140 players:
141 items:
142 $ref: '#/definitions/models.UserShort'
143 type: array
144 type: object
145 models.Category:
92 properties: 146 properties:
93 id: 147 id:
94 type: integer 148 type: integer
95 is_coop:
96 type: boolean
97 name: 149 name:
98 type: string 150 type: string
99 type: object 151 type: object
100 models.LoginResponse: 152 models.Chapter:
101 properties: 153 properties:
102 token: 154 id:
155 type: integer
156 name:
157 type: string
158 type: object
159 models.Game:
160 properties:
161 id:
162 type: integer
163 is_coop:
164 type: boolean
165 name:
103 type: string 166 type: string
104 type: object 167 type: object
105 models.Map: 168 models.Map:
@@ -159,52 +222,6 @@ definitions:
159 $ref: '#/definitions/models.MapRoute' 222 $ref: '#/definitions/models.MapRoute'
160 type: array 223 type: array
161 type: object 224 type: object
162 models.MapSummaryResponse:
163 properties:
164 map:
165 $ref: '#/definitions/models.Map'
166 summary:
167 $ref: '#/definitions/models.MapSummary'
168 type: object
169 models.ProfileResponse:
170 properties:
171 avatar_link:
172 type: string
173 country_code:
174 type: string
175 profile:
176 type: boolean
177 scores_mp:
178 items:
179 $ref: '#/definitions/models.ScoreResponse'
180 type: array
181 scores_sp:
182 items:
183 $ref: '#/definitions/models.ScoreResponse'
184 type: array
185 steam_id:
186 type: string
187 user_name:
188 type: string
189 type: object
190 models.RankingsResponse:
191 properties:
192 rankings_mp:
193 items:
194 $ref: '#/definitions/models.UserRanking'
195 type: array
196 rankings_sp:
197 items:
198 $ref: '#/definitions/models.UserRanking'
199 type: array
200 type: object
201 models.RecordResponse:
202 properties:
203 score_count:
204 type: integer
205 score_time:
206 type: integer
207 type: object
208 models.Response: 225 models.Response:
209 properties: 226 properties:
210 data: {} 227 data: {}
@@ -213,23 +230,6 @@ definitions:
213 success: 230 success:
214 type: boolean 231 type: boolean
215 type: object 232 type: object
216 models.ScoreResponse:
217 properties:
218 map_id:
219 type: integer
220 records: {}
221 type: object
222 models.SearchResponse:
223 properties:
224 maps:
225 items:
226 $ref: '#/definitions/models.MapShort'
227 type: array
228 players:
229 items:
230 $ref: '#/definitions/models.UserShort'
231 type: array
232 type: object
233 models.UserRanking: 233 models.UserRanking:
234 properties: 234 properties:
235 total_score: 235 total_score:
@@ -275,7 +275,7 @@ paths:
275 - $ref: '#/definitions/models.Response' 275 - $ref: '#/definitions/models.Response'
276 - properties: 276 - properties:
277 data: 277 data:
278 $ref: '#/definitions/models.ChapterMapsResponse' 278 $ref: '#/definitions/controllers.ChapterMapsResponse'
279 type: object 279 type: object
280 "400": 280 "400":
281 description: Bad Request 281 description: Bad Request
@@ -349,7 +349,7 @@ paths:
349 - $ref: '#/definitions/models.Response' 349 - $ref: '#/definitions/models.Response'
350 - properties: 350 - properties:
351 data: 351 data:
352 $ref: '#/definitions/models.ChaptersResponse' 352 $ref: '#/definitions/controllers.ChaptersResponse'
353 type: object 353 type: object
354 "400": 354 "400":
355 description: Bad Request 355 description: Bad Request
@@ -372,7 +372,7 @@ paths:
372 - $ref: '#/definitions/models.Response' 372 - $ref: '#/definitions/models.Response'
373 - properties: 373 - properties:
374 data: 374 data:
375 $ref: '#/definitions/models.LoginResponse' 375 $ref: '#/definitions/controllers.LoginResponse'
376 type: object 376 type: object
377 "400": 377 "400":
378 description: Bad Request 378 description: Bad Request
@@ -399,7 +399,7 @@ paths:
399 name: request 399 name: request
400 required: true 400 required: true
401 schema: 401 schema:
402 $ref: '#/definitions/models.EditMapImageRequest' 402 $ref: '#/definitions/controllers.EditMapImageRequest'
403 produces: 403 produces:
404 - application/json 404 - application/json
405 responses: 405 responses:
@@ -410,7 +410,7 @@ paths:
410 - $ref: '#/definitions/models.Response' 410 - $ref: '#/definitions/models.Response'
411 - properties: 411 - properties:
412 data: 412 data:
413 $ref: '#/definitions/models.EditMapImageRequest' 413 $ref: '#/definitions/controllers.EditMapImageRequest'
414 type: object 414 type: object
415 "400": 415 "400":
416 description: Bad Request 416 description: Bad Request
@@ -493,7 +493,7 @@ paths:
493 - $ref: '#/definitions/models.Response' 493 - $ref: '#/definitions/models.Response'
494 - properties: 494 - properties:
495 data: 495 data:
496 $ref: '#/definitions/models.RecordResponse' 496 $ref: '#/definitions/controllers.RecordResponse'
497 type: object 497 type: object
498 "400": 498 "400":
499 description: Bad Request 499 description: Bad Request
@@ -524,7 +524,7 @@ paths:
524 name: request 524 name: request
525 required: true 525 required: true
526 schema: 526 schema:
527 $ref: '#/definitions/models.DeleteMapSummaryRequest' 527 $ref: '#/definitions/controllers.DeleteMapSummaryRequest'
528 produces: 528 produces:
529 - application/json 529 - application/json
530 responses: 530 responses:
@@ -535,7 +535,7 @@ paths:
535 - $ref: '#/definitions/models.Response' 535 - $ref: '#/definitions/models.Response'
536 - properties: 536 - properties:
537 data: 537 data:
538 $ref: '#/definitions/models.DeleteMapSummaryRequest' 538 $ref: '#/definitions/controllers.DeleteMapSummaryRequest'
539 type: object 539 type: object
540 "400": 540 "400":
541 description: Bad Request 541 description: Bad Request
@@ -561,7 +561,7 @@ paths:
561 - $ref: '#/definitions/models.Response' 561 - $ref: '#/definitions/models.Response'
562 - properties: 562 - properties:
563 data: 563 data:
564 $ref: '#/definitions/models.MapSummaryResponse' 564 $ref: '#/definitions/controllers.MapSummaryResponse'
565 type: object 565 type: object
566 "400": 566 "400":
567 description: Bad Request 567 description: Bad Request
@@ -587,7 +587,7 @@ paths:
587 name: request 587 name: request
588 required: true 588 required: true
589 schema: 589 schema:
590 $ref: '#/definitions/models.CreateMapSummaryRequest' 590 $ref: '#/definitions/controllers.CreateMapSummaryRequest'
591 produces: 591 produces:
592 - application/json 592 - application/json
593 responses: 593 responses:
@@ -598,7 +598,7 @@ paths:
598 - $ref: '#/definitions/models.Response' 598 - $ref: '#/definitions/models.Response'
599 - properties: 599 - properties:
600 data: 600 data:
601 $ref: '#/definitions/models.CreateMapSummaryRequest' 601 $ref: '#/definitions/controllers.CreateMapSummaryRequest'
602 type: object 602 type: object
603 "400": 603 "400":
604 description: Bad Request 604 description: Bad Request
@@ -624,7 +624,7 @@ paths:
624 name: request 624 name: request
625 required: true 625 required: true
626 schema: 626 schema:
627 $ref: '#/definitions/models.EditMapSummaryRequest' 627 $ref: '#/definitions/controllers.EditMapSummaryRequest'
628 produces: 628 produces:
629 - application/json 629 - application/json
630 responses: 630 responses:
@@ -635,7 +635,7 @@ paths:
635 - $ref: '#/definitions/models.Response' 635 - $ref: '#/definitions/models.Response'
636 - properties: 636 - properties:
637 data: 637 data:
638 $ref: '#/definitions/models.EditMapSummaryRequest' 638 $ref: '#/definitions/controllers.EditMapSummaryRequest'
639 type: object 639 type: object
640 "400": 640 "400":
641 description: Bad Request 641 description: Bad Request
@@ -664,7 +664,7 @@ paths:
664 - $ref: '#/definitions/models.Response' 664 - $ref: '#/definitions/models.Response'
665 - properties: 665 - properties:
666 data: 666 data:
667 $ref: '#/definitions/models.ProfileResponse' 667 $ref: '#/definitions/controllers.ProfileResponse'
668 type: object 668 type: object
669 "400": 669 "400":
670 description: Bad Request 670 description: Bad Request
@@ -696,7 +696,7 @@ paths:
696 - $ref: '#/definitions/models.Response' 696 - $ref: '#/definitions/models.Response'
697 - properties: 697 - properties:
698 data: 698 data:
699 $ref: '#/definitions/models.ProfileResponse' 699 $ref: '#/definitions/controllers.ProfileResponse'
700 type: object 700 type: object
701 "400": 701 "400":
702 description: Bad Request 702 description: Bad Request
@@ -753,7 +753,7 @@ paths:
753 - $ref: '#/definitions/models.Response' 753 - $ref: '#/definitions/models.Response'
754 - properties: 754 - properties:
755 data: 755 data:
756 $ref: '#/definitions/models.RankingsResponse' 756 $ref: '#/definitions/controllers.RankingsResponse'
757 type: object 757 type: object
758 "400": 758 "400":
759 description: Bad Request 759 description: Bad Request
@@ -779,7 +779,7 @@ paths:
779 - $ref: '#/definitions/models.Response' 779 - $ref: '#/definitions/models.Response'
780 - properties: 780 - properties:
781 data: 781 data:
782 $ref: '#/definitions/models.SearchResponse' 782 $ref: '#/definitions/controllers.SearchResponse'
783 type: object 783 type: object
784 "400": 784 "400":
785 description: Bad Request 785 description: Bad Request
@@ -800,7 +800,7 @@ paths:
800 - $ref: '#/definitions/models.Response' 800 - $ref: '#/definitions/models.Response'
801 - properties: 801 - properties:
802 data: 802 data:
803 $ref: '#/definitions/models.LoginResponse' 803 $ref: '#/definitions/controllers.LoginResponse'
804 type: object 804 type: object
805 "404": 805 "404":
806 description: Not Found 806 description: Not Found
@@ -820,7 +820,7 @@ paths:
820 - $ref: '#/definitions/models.Response' 820 - $ref: '#/definitions/models.Response'
821 - properties: 821 - properties:
822 data: 822 data:
823 $ref: '#/definitions/models.LoginResponse' 823 $ref: '#/definitions/controllers.LoginResponse'
824 type: object 824 type: object
825 "404": 825 "404":
826 description: Not Found 826 description: Not Found
@@ -849,7 +849,7 @@ paths:
849 - $ref: '#/definitions/models.Response' 849 - $ref: '#/definitions/models.Response'
850 - properties: 850 - properties:
851 data: 851 data:
852 $ref: '#/definitions/models.ProfileResponse' 852 $ref: '#/definitions/controllers.ProfileResponse'
853 type: object 853 type: object
854 "400": 854 "400":
855 description: Bad Request 855 description: Bad Request