diff options
Diffstat (limited to 'docs/swagger.json')
| -rw-r--r-- | docs/swagger.json | 119 |
1 files changed, 55 insertions, 64 deletions
diff --git a/docs/swagger.json b/docs/swagger.json index cf37a5a..22e30d2 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/controllers.ChapterMapsResponse" | 46 | "$ref": "#/definitions/handlers.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/controllers.ChaptersResponse" | 169 | "$ref": "#/definitions/handlers.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/controllers.LoginResponse" | 209 | "$ref": "#/definitions/handlers.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/controllers.EditMapImageRequest" | 255 | "$ref": "#/definitions/handlers.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/controllers.EditMapImageRequest" | 271 | "$ref": "#/definitions/handlers.EditMapImageRequest" |
| 272 | } | 272 | } |
| 273 | } | 273 | } |
| 274 | } | 274 | } |
| @@ -314,19 +314,7 @@ | |||
| 314 | "type": "object", | 314 | "type": "object", |
| 315 | "properties": { | 315 | "properties": { |
| 316 | "data": { | 316 | "data": { |
| 317 | "allOf": [ | 317 | "$ref": "#/definitions/handlers.MapLeaderboardsResponse" |
| 318 | { | ||
| 319 | "$ref": "#/definitions/models.Map" | ||
| 320 | }, | ||
| 321 | { | ||
| 322 | "type": "object", | ||
| 323 | "properties": { | ||
| 324 | "data": { | ||
| 325 | "$ref": "#/definitions/models.MapRecords" | ||
| 326 | } | ||
| 327 | } | ||
| 328 | } | ||
| 329 | ] | ||
| 330 | } | 318 | } |
| 331 | } | 319 | } |
| 332 | } | 320 | } |
| @@ -407,7 +395,7 @@ | |||
| 407 | "type": "object", | 395 | "type": "object", |
| 408 | "properties": { | 396 | "properties": { |
| 409 | "data": { | 397 | "data": { |
| 410 | "$ref": "#/definitions/controllers.RecordResponse" | 398 | "$ref": "#/definitions/handlers.RecordResponse" |
| 411 | } | 399 | } |
| 412 | } | 400 | } |
| 413 | } | 401 | } |
| @@ -459,7 +447,7 @@ | |||
| 459 | "type": "object", | 447 | "type": "object", |
| 460 | "properties": { | 448 | "properties": { |
| 461 | "data": { | 449 | "data": { |
| 462 | "$ref": "#/definitions/controllers.MapSummaryResponse" | 450 | "$ref": "#/definitions/handlers.MapSummaryResponse" |
| 463 | } | 451 | } |
| 464 | } | 452 | } |
| 465 | } | 453 | } |
| @@ -503,7 +491,7 @@ | |||
| 503 | "in": "body", | 491 | "in": "body", |
| 504 | "required": true, | 492 | "required": true, |
| 505 | "schema": { | 493 | "schema": { |
| 506 | "$ref": "#/definitions/controllers.EditMapSummaryRequest" | 494 | "$ref": "#/definitions/handlers.EditMapSummaryRequest" |
| 507 | } | 495 | } |
| 508 | } | 496 | } |
| 509 | ], | 497 | ], |
| @@ -519,7 +507,7 @@ | |||
| 519 | "type": "object", | 507 | "type": "object", |
| 520 | "properties": { | 508 | "properties": { |
| 521 | "data": { | 509 | "data": { |
| 522 | "$ref": "#/definitions/controllers.EditMapSummaryRequest" | 510 | "$ref": "#/definitions/handlers.EditMapSummaryRequest" |
| 523 | } | 511 | } |
| 524 | } | 512 | } |
| 525 | } | 513 | } |
| @@ -563,7 +551,7 @@ | |||
| 563 | "in": "body", | 551 | "in": "body", |
| 564 | "required": true, | 552 | "required": true, |
| 565 | "schema": { | 553 | "schema": { |
| 566 | "$ref": "#/definitions/controllers.CreateMapSummaryRequest" | 554 | "$ref": "#/definitions/handlers.CreateMapSummaryRequest" |
| 567 | } | 555 | } |
| 568 | } | 556 | } |
| 569 | ], | 557 | ], |
| @@ -579,7 +567,7 @@ | |||
| 579 | "type": "object", | 567 | "type": "object", |
| 580 | "properties": { | 568 | "properties": { |
| 581 | "data": { | 569 | "data": { |
| 582 | "$ref": "#/definitions/controllers.CreateMapSummaryRequest" | 570 | "$ref": "#/definitions/handlers.CreateMapSummaryRequest" |
| 583 | } | 571 | } |
| 584 | } | 572 | } |
| 585 | } | 573 | } |
| @@ -623,7 +611,7 @@ | |||
| 623 | "in": "body", | 611 | "in": "body", |
| 624 | "required": true, | 612 | "required": true, |
| 625 | "schema": { | 613 | "schema": { |
| 626 | "$ref": "#/definitions/controllers.DeleteMapSummaryRequest" | 614 | "$ref": "#/definitions/handlers.DeleteMapSummaryRequest" |
| 627 | } | 615 | } |
| 628 | } | 616 | } |
| 629 | ], | 617 | ], |
| @@ -639,7 +627,7 @@ | |||
| 639 | "type": "object", | 627 | "type": "object", |
| 640 | "properties": { | 628 | "properties": { |
| 641 | "data": { | 629 | "data": { |
| 642 | "$ref": "#/definitions/controllers.DeleteMapSummaryRequest" | 630 | "$ref": "#/definitions/handlers.DeleteMapSummaryRequest" |
| 643 | } | 631 | } |
| 644 | } | 632 | } |
| 645 | } | 633 | } |
| @@ -688,7 +676,7 @@ | |||
| 688 | "type": "object", | 676 | "type": "object", |
| 689 | "properties": { | 677 | "properties": { |
| 690 | "data": { | 678 | "data": { |
| 691 | "$ref": "#/definitions/controllers.ProfileResponse" | 679 | "$ref": "#/definitions/handlers.ProfileResponse" |
| 692 | } | 680 | } |
| 693 | } | 681 | } |
| 694 | } | 682 | } |
| @@ -789,7 +777,7 @@ | |||
| 789 | "type": "object", | 777 | "type": "object", |
| 790 | "properties": { | 778 | "properties": { |
| 791 | "data": { | 779 | "data": { |
| 792 | "$ref": "#/definitions/controllers.ProfileResponse" | 780 | "$ref": "#/definitions/handlers.ProfileResponse" |
| 793 | } | 781 | } |
| 794 | } | 782 | } |
| 795 | } | 783 | } |
| @@ -832,7 +820,7 @@ | |||
| 832 | "type": "object", | 820 | "type": "object", |
| 833 | "properties": { | 821 | "properties": { |
| 834 | "data": { | 822 | "data": { |
| 835 | "$ref": "#/definitions/controllers.RankingsResponse" | 823 | "$ref": "#/definitions/handlers.RankingsResponse" |
| 836 | } | 824 | } |
| 837 | } | 825 | } |
| 838 | } | 826 | } |
| @@ -877,7 +865,7 @@ | |||
| 877 | "type": "object", | 865 | "type": "object", |
| 878 | "properties": { | 866 | "properties": { |
| 879 | "data": { | 867 | "data": { |
| 880 | "$ref": "#/definitions/controllers.SearchResponse" | 868 | "$ref": "#/definitions/handlers.SearchResponse" |
| 881 | } | 869 | } |
| 882 | } | 870 | } |
| 883 | } | 871 | } |
| @@ -914,7 +902,7 @@ | |||
| 914 | "type": "object", | 902 | "type": "object", |
| 915 | "properties": { | 903 | "properties": { |
| 916 | "data": { | 904 | "data": { |
| 917 | "$ref": "#/definitions/controllers.LoginResponse" | 905 | "$ref": "#/definitions/handlers.LoginResponse" |
| 918 | } | 906 | } |
| 919 | } | 907 | } |
| 920 | } | 908 | } |
| @@ -949,7 +937,7 @@ | |||
| 949 | "type": "object", | 937 | "type": "object", |
| 950 | "properties": { | 938 | "properties": { |
| 951 | "data": { | 939 | "data": { |
| 952 | "$ref": "#/definitions/controllers.LoginResponse" | 940 | "$ref": "#/definitions/handlers.LoginResponse" |
| 953 | } | 941 | } |
| 954 | } | 942 | } |
| 955 | } | 943 | } |
| @@ -998,7 +986,7 @@ | |||
| 998 | "type": "object", | 986 | "type": "object", |
| 999 | "properties": { | 987 | "properties": { |
| 1000 | "data": { | 988 | "data": { |
| 1001 | "$ref": "#/definitions/controllers.ProfileResponse" | 989 | "$ref": "#/definitions/handlers.ProfileResponse" |
| 1002 | } | 990 | } |
| 1003 | } | 991 | } |
| 1004 | } | 992 | } |
| @@ -1022,7 +1010,7 @@ | |||
| 1022 | } | 1010 | } |
| 1023 | }, | 1011 | }, |
| 1024 | "definitions": { | 1012 | "definitions": { |
| 1025 | "controllers.ChapterMapsResponse": { | 1013 | "handlers.ChapterMapsResponse": { |
| 1026 | "type": "object", | 1014 | "type": "object", |
| 1027 | "properties": { | 1015 | "properties": { |
| 1028 | "chapter": { | 1016 | "chapter": { |
| @@ -1036,7 +1024,7 @@ | |||
| 1036 | } | 1024 | } |
| 1037 | } | 1025 | } |
| 1038 | }, | 1026 | }, |
| 1039 | "controllers.ChaptersResponse": { | 1027 | "handlers.ChaptersResponse": { |
| 1040 | "type": "object", | 1028 | "type": "object", |
| 1041 | "properties": { | 1029 | "properties": { |
| 1042 | "chapters": { | 1030 | "chapters": { |
| @@ -1050,7 +1038,7 @@ | |||
| 1050 | } | 1038 | } |
| 1051 | } | 1039 | } |
| 1052 | }, | 1040 | }, |
| 1053 | "controllers.CreateMapSummaryRequest": { | 1041 | "handlers.CreateMapSummaryRequest": { |
| 1054 | "type": "object", | 1042 | "type": "object", |
| 1055 | "required": [ | 1043 | "required": [ |
| 1056 | "category_id", | 1044 | "category_id", |
| @@ -1080,7 +1068,7 @@ | |||
| 1080 | } | 1068 | } |
| 1081 | } | 1069 | } |
| 1082 | }, | 1070 | }, |
| 1083 | "controllers.DeleteMapSummaryRequest": { | 1071 | "handlers.DeleteMapSummaryRequest": { |
| 1084 | "type": "object", | 1072 | "type": "object", |
| 1085 | "required": [ | 1073 | "required": [ |
| 1086 | "route_id" | 1074 | "route_id" |
| @@ -1091,7 +1079,7 @@ | |||
| 1091 | } | 1079 | } |
| 1092 | } | 1080 | } |
| 1093 | }, | 1081 | }, |
| 1094 | "controllers.EditMapImageRequest": { | 1082 | "handlers.EditMapImageRequest": { |
| 1095 | "type": "object", | 1083 | "type": "object", |
| 1096 | "required": [ | 1084 | "required": [ |
| 1097 | "image" | 1085 | "image" |
| @@ -1102,7 +1090,7 @@ | |||
| 1102 | } | 1090 | } |
| 1103 | } | 1091 | } |
| 1104 | }, | 1092 | }, |
| 1105 | "controllers.EditMapSummaryRequest": { | 1093 | "handlers.EditMapSummaryRequest": { |
| 1106 | "type": "object", | 1094 | "type": "object", |
| 1107 | "required": [ | 1095 | "required": [ |
| 1108 | "description", | 1096 | "description", |
| @@ -1132,7 +1120,7 @@ | |||
| 1132 | } | 1120 | } |
| 1133 | } | 1121 | } |
| 1134 | }, | 1122 | }, |
| 1135 | "controllers.LoginResponse": { | 1123 | "handlers.LoginResponse": { |
| 1136 | "type": "object", | 1124 | "type": "object", |
| 1137 | "properties": { | 1125 | "properties": { |
| 1138 | "token": { | 1126 | "token": { |
| @@ -1140,7 +1128,16 @@ | |||
| 1140 | } | 1128 | } |
| 1141 | } | 1129 | } |
| 1142 | }, | 1130 | }, |
| 1143 | "controllers.MapSummaryResponse": { | 1131 | "handlers.MapLeaderboardsResponse": { |
| 1132 | "type": "object", | ||
| 1133 | "properties": { | ||
| 1134 | "map": { | ||
| 1135 | "$ref": "#/definitions/models.Map" | ||
| 1136 | }, | ||
| 1137 | "records": {} | ||
| 1138 | } | ||
| 1139 | }, | ||
| 1140 | "handlers.MapSummaryResponse": { | ||
| 1144 | "type": "object", | 1141 | "type": "object", |
| 1145 | "properties": { | 1142 | "properties": { |
| 1146 | "map": { | 1143 | "map": { |
| @@ -1151,21 +1148,21 @@ | |||
| 1151 | } | 1148 | } |
| 1152 | } | 1149 | } |
| 1153 | }, | 1150 | }, |
| 1154 | "controllers.ProfileRankings": { | 1151 | "handlers.ProfileRankings": { |
| 1155 | "type": "object", | 1152 | "type": "object", |
| 1156 | "properties": { | 1153 | "properties": { |
| 1157 | "cooperative": { | 1154 | "cooperative": { |
| 1158 | "$ref": "#/definitions/controllers.ProfileRankingsDetails" | 1155 | "$ref": "#/definitions/handlers.ProfileRankingsDetails" |
| 1159 | }, | 1156 | }, |
| 1160 | "overall": { | 1157 | "overall": { |
| 1161 | "$ref": "#/definitions/controllers.ProfileRankingsDetails" | 1158 | "$ref": "#/definitions/handlers.ProfileRankingsDetails" |
| 1162 | }, | 1159 | }, |
| 1163 | "singleplayer": { | 1160 | "singleplayer": { |
| 1164 | "$ref": "#/definitions/controllers.ProfileRankingsDetails" | 1161 | "$ref": "#/definitions/handlers.ProfileRankingsDetails" |
| 1165 | } | 1162 | } |
| 1166 | } | 1163 | } |
| 1167 | }, | 1164 | }, |
| 1168 | "controllers.ProfileRankingsDetails": { | 1165 | "handlers.ProfileRankingsDetails": { |
| 1169 | "type": "object", | 1166 | "type": "object", |
| 1170 | "properties": { | 1167 | "properties": { |
| 1171 | "completion_count": { | 1168 | "completion_count": { |
| @@ -1179,24 +1176,24 @@ | |||
| 1179 | } | 1176 | } |
| 1180 | } | 1177 | } |
| 1181 | }, | 1178 | }, |
| 1182 | "controllers.ProfileRecords": { | 1179 | "handlers.ProfileRecords": { |
| 1183 | "type": "object", | 1180 | "type": "object", |
| 1184 | "properties": { | 1181 | "properties": { |
| 1185 | "portal2_cooperative": { | 1182 | "portal2_cooperative": { |
| 1186 | "type": "array", | 1183 | "type": "array", |
| 1187 | "items": { | 1184 | "items": { |
| 1188 | "$ref": "#/definitions/controllers.ProfileRecordsDetails" | 1185 | "$ref": "#/definitions/handlers.ProfileRecordsDetails" |
| 1189 | } | 1186 | } |
| 1190 | }, | 1187 | }, |
| 1191 | "portal2_singleplayer": { | 1188 | "portal2_singleplayer": { |
| 1192 | "type": "array", | 1189 | "type": "array", |
| 1193 | "items": { | 1190 | "items": { |
| 1194 | "$ref": "#/definitions/controllers.ProfileRecordsDetails" | 1191 | "$ref": "#/definitions/handlers.ProfileRecordsDetails" |
| 1195 | } | 1192 | } |
| 1196 | } | 1193 | } |
| 1197 | } | 1194 | } |
| 1198 | }, | 1195 | }, |
| 1199 | "controllers.ProfileRecordsDetails": { | 1196 | "handlers.ProfileRecordsDetails": { |
| 1200 | "type": "object", | 1197 | "type": "object", |
| 1201 | "properties": { | 1198 | "properties": { |
| 1202 | "map_id": { | 1199 | "map_id": { |
| @@ -1208,12 +1205,12 @@ | |||
| 1208 | "scores": { | 1205 | "scores": { |
| 1209 | "type": "array", | 1206 | "type": "array", |
| 1210 | "items": { | 1207 | "items": { |
| 1211 | "$ref": "#/definitions/controllers.ProfileScores" | 1208 | "$ref": "#/definitions/handlers.ProfileScores" |
| 1212 | } | 1209 | } |
| 1213 | } | 1210 | } |
| 1214 | } | 1211 | } |
| 1215 | }, | 1212 | }, |
| 1216 | "controllers.ProfileResponse": { | 1213 | "handlers.ProfileResponse": { |
| 1217 | "type": "object", | 1214 | "type": "object", |
| 1218 | "properties": { | 1215 | "properties": { |
| 1219 | "avatar_link": { | 1216 | "avatar_link": { |
| @@ -1229,10 +1226,10 @@ | |||
| 1229 | "type": "boolean" | 1226 | "type": "boolean" |
| 1230 | }, | 1227 | }, |
| 1231 | "rankings": { | 1228 | "rankings": { |
| 1232 | "$ref": "#/definitions/controllers.ProfileRankings" | 1229 | "$ref": "#/definitions/handlers.ProfileRankings" |
| 1233 | }, | 1230 | }, |
| 1234 | "records": { | 1231 | "records": { |
| 1235 | "$ref": "#/definitions/controllers.ProfileRecords" | 1232 | "$ref": "#/definitions/handlers.ProfileRecords" |
| 1236 | }, | 1233 | }, |
| 1237 | "steam_id": { | 1234 | "steam_id": { |
| 1238 | "type": "string" | 1235 | "type": "string" |
| @@ -1248,7 +1245,7 @@ | |||
| 1248 | } | 1245 | } |
| 1249 | } | 1246 | } |
| 1250 | }, | 1247 | }, |
| 1251 | "controllers.ProfileScores": { | 1248 | "handlers.ProfileScores": { |
| 1252 | "type": "object", | 1249 | "type": "object", |
| 1253 | "properties": { | 1250 | "properties": { |
| 1254 | "date": { | 1251 | "date": { |
| @@ -1265,7 +1262,7 @@ | |||
| 1265 | } | 1262 | } |
| 1266 | } | 1263 | } |
| 1267 | }, | 1264 | }, |
| 1268 | "controllers.RankingsResponse": { | 1265 | "handlers.RankingsResponse": { |
| 1269 | "type": "object", | 1266 | "type": "object", |
| 1270 | "properties": { | 1267 | "properties": { |
| 1271 | "rankings_mp": { | 1268 | "rankings_mp": { |
| @@ -1282,7 +1279,7 @@ | |||
| 1282 | } | 1279 | } |
| 1283 | } | 1280 | } |
| 1284 | }, | 1281 | }, |
| 1285 | "controllers.RecordResponse": { | 1282 | "handlers.RecordResponse": { |
| 1286 | "type": "object", | 1283 | "type": "object", |
| 1287 | "properties": { | 1284 | "properties": { |
| 1288 | "score_count": { | 1285 | "score_count": { |
| @@ -1293,7 +1290,7 @@ | |||
| 1293 | } | 1290 | } |
| 1294 | } | 1291 | } |
| 1295 | }, | 1292 | }, |
| 1296 | "controllers.SearchResponse": { | 1293 | "handlers.SearchResponse": { |
| 1297 | "type": "object", | 1294 | "type": "object", |
| 1298 | "properties": { | 1295 | "properties": { |
| 1299 | "maps": { | 1296 | "maps": { |
| @@ -1400,12 +1397,6 @@ | |||
| 1400 | } | 1397 | } |
| 1401 | } | 1398 | } |
| 1402 | }, | 1399 | }, |
| 1403 | "models.MapRecords": { | ||
| 1404 | "type": "object", | ||
| 1405 | "properties": { | ||
| 1406 | "records": {} | ||
| 1407 | } | ||
| 1408 | }, | ||
| 1409 | "models.MapRoute": { | 1400 | "models.MapRoute": { |
| 1410 | "type": "object", | 1401 | "type": "object", |
| 1411 | "properties": { | 1402 | "properties": { |