diff options
Diffstat (limited to 'docs/swagger.json')
| -rw-r--r-- | docs/swagger.json | 246 |
1 files changed, 239 insertions, 7 deletions
diff --git a/docs/swagger.json b/docs/swagger.json index 0bebe1c..442745f 100644 --- a/docs/swagger.json +++ b/docs/swagger.json | |||
| @@ -13,6 +13,52 @@ | |||
| 13 | "host": "lp.ardapektezol.com/api", | 13 | "host": "lp.ardapektezol.com/api", |
| 14 | "basePath": "/v1", | 14 | "basePath": "/v1", |
| 15 | "paths": { | 15 | "paths": { |
| 16 | "/chapters/{id}": { | ||
| 17 | "get": { | ||
| 18 | "produces": [ | ||
| 19 | "application/json" | ||
| 20 | ], | ||
| 21 | "tags": [ | ||
| 22 | "games \u0026 chapters" | ||
| 23 | ], | ||
| 24 | "summary": "Get maps from the specified chapter id.", | ||
| 25 | "parameters": [ | ||
| 26 | { | ||
| 27 | "type": "integer", | ||
| 28 | "description": "Chapter ID", | ||
| 29 | "name": "id", | ||
| 30 | "in": "path", | ||
| 31 | "required": true | ||
| 32 | } | ||
| 33 | ], | ||
| 34 | "responses": { | ||
| 35 | "200": { | ||
| 36 | "description": "OK", | ||
| 37 | "schema": { | ||
| 38 | "allOf": [ | ||
| 39 | { | ||
| 40 | "$ref": "#/definitions/models.Response" | ||
| 41 | }, | ||
| 42 | { | ||
| 43 | "type": "object", | ||
| 44 | "properties": { | ||
| 45 | "data": { | ||
| 46 | "$ref": "#/definitions/models.ChapterMapsResponse" | ||
| 47 | } | ||
| 48 | } | ||
| 49 | } | ||
| 50 | ] | ||
| 51 | } | ||
| 52 | }, | ||
| 53 | "400": { | ||
| 54 | "description": "Bad Request", | ||
| 55 | "schema": { | ||
| 56 | "$ref": "#/definitions/models.Response" | ||
| 57 | } | ||
| 58 | } | ||
| 59 | } | ||
| 60 | } | ||
| 61 | }, | ||
| 16 | "/demo": { | 62 | "/demo": { |
| 17 | "get": { | 63 | "get": { |
| 18 | "produces": [ | 64 | "produces": [ |
| @@ -87,6 +133,92 @@ | |||
| 87 | } | 133 | } |
| 88 | } | 134 | } |
| 89 | }, | 135 | }, |
| 136 | "/games": { | ||
| 137 | "get": { | ||
| 138 | "produces": [ | ||
| 139 | "application/json" | ||
| 140 | ], | ||
| 141 | "tags": [ | ||
| 142 | "games \u0026 chapters" | ||
| 143 | ], | ||
| 144 | "summary": "Get games from the leaderboards.", | ||
| 145 | "responses": { | ||
| 146 | "200": { | ||
| 147 | "description": "OK", | ||
| 148 | "schema": { | ||
| 149 | "allOf": [ | ||
| 150 | { | ||
| 151 | "$ref": "#/definitions/models.Response" | ||
| 152 | }, | ||
| 153 | { | ||
| 154 | "type": "object", | ||
| 155 | "properties": { | ||
| 156 | "data": { | ||
| 157 | "type": "array", | ||
| 158 | "items": { | ||
| 159 | "$ref": "#/definitions/models.Game" | ||
| 160 | } | ||
| 161 | } | ||
| 162 | } | ||
| 163 | } | ||
| 164 | ] | ||
| 165 | } | ||
| 166 | }, | ||
| 167 | "400": { | ||
| 168 | "description": "Bad Request", | ||
| 169 | "schema": { | ||
| 170 | "$ref": "#/definitions/models.Response" | ||
| 171 | } | ||
| 172 | } | ||
| 173 | } | ||
| 174 | } | ||
| 175 | }, | ||
| 176 | "/games/{id}": { | ||
| 177 | "get": { | ||
| 178 | "produces": [ | ||
| 179 | "application/json" | ||
| 180 | ], | ||
| 181 | "tags": [ | ||
| 182 | "games \u0026 chapters" | ||
| 183 | ], | ||
| 184 | "summary": "Get chapters from the specified game id.", | ||
| 185 | "parameters": [ | ||
| 186 | { | ||
| 187 | "type": "integer", | ||
| 188 | "description": "Game ID", | ||
| 189 | "name": "id", | ||
| 190 | "in": "path", | ||
| 191 | "required": true | ||
| 192 | } | ||
| 193 | ], | ||
| 194 | "responses": { | ||
| 195 | "200": { | ||
| 196 | "description": "OK", | ||
| 197 | "schema": { | ||
| 198 | "allOf": [ | ||
| 199 | { | ||
| 200 | "$ref": "#/definitions/models.Response" | ||
| 201 | }, | ||
| 202 | { | ||
| 203 | "type": "object", | ||
| 204 | "properties": { | ||
| 205 | "data": { | ||
| 206 | "$ref": "#/definitions/models.ChaptersResponse" | ||
| 207 | } | ||
| 208 | } | ||
| 209 | } | ||
| 210 | ] | ||
| 211 | } | ||
| 212 | }, | ||
| 213 | "400": { | ||
| 214 | "description": "Bad Request", | ||
| 215 | "schema": { | ||
| 216 | "$ref": "#/definitions/models.Response" | ||
| 217 | } | ||
| 218 | } | ||
| 219 | } | ||
| 220 | } | ||
| 221 | }, | ||
| 90 | "/login": { | 222 | "/login": { |
| 91 | "get": { | 223 | "get": { |
| 92 | "consumes": [ | 224 | "consumes": [ |
| @@ -129,9 +261,6 @@ | |||
| 129 | }, | 261 | }, |
| 130 | "/maps/{id}/leaderboards": { | 262 | "/maps/{id}/leaderboards": { |
| 131 | "get": { | 263 | "get": { |
| 132 | "consumes": [ | ||
| 133 | "application/json" | ||
| 134 | ], | ||
| 135 | "produces": [ | 264 | "produces": [ |
| 136 | "application/json" | 265 | "application/json" |
| 137 | ], | 266 | ], |
| @@ -283,9 +412,6 @@ | |||
| 283 | }, | 412 | }, |
| 284 | "/maps/{id}/summary": { | 413 | "/maps/{id}/summary": { |
| 285 | "get": { | 414 | "get": { |
| 286 | "consumes": [ | ||
| 287 | "application/json" | ||
| 288 | ], | ||
| 289 | "produces": [ | 415 | "produces": [ |
| 290 | "application/json" | 416 | "application/json" |
| 291 | ], | 417 | ], |
| @@ -523,7 +649,19 @@ | |||
| 523 | "200": { | 649 | "200": { |
| 524 | "description": "OK", | 650 | "description": "OK", |
| 525 | "schema": { | 651 | "schema": { |
| 526 | "$ref": "#/definitions/models.Response" | 652 | "allOf": [ |
| 653 | { | ||
| 654 | "$ref": "#/definitions/models.Response" | ||
| 655 | }, | ||
| 656 | { | ||
| 657 | "type": "object", | ||
| 658 | "properties": { | ||
| 659 | "data": { | ||
| 660 | "$ref": "#/definitions/models.SearchResponse" | ||
| 661 | } | ||
| 662 | } | ||
| 663 | } | ||
| 664 | ] | ||
| 527 | } | 665 | } |
| 528 | }, | 666 | }, |
| 529 | "400": { | 667 | "400": { |
| @@ -592,6 +730,56 @@ | |||
| 592 | } | 730 | } |
| 593 | }, | 731 | }, |
| 594 | "definitions": { | 732 | "definitions": { |
| 733 | "models.Chapter": { | ||
| 734 | "type": "object", | ||
| 735 | "properties": { | ||
| 736 | "id": { | ||
| 737 | "type": "integer" | ||
| 738 | }, | ||
| 739 | "name": { | ||
| 740 | "type": "string" | ||
| 741 | } | ||
| 742 | } | ||
| 743 | }, | ||
| 744 | "models.ChapterMapsResponse": { | ||
| 745 | "type": "object", | ||
| 746 | "properties": { | ||
| 747 | "chapter": { | ||
| 748 | "$ref": "#/definitions/models.Chapter" | ||
| 749 | }, | ||
| 750 | "maps": { | ||
| 751 | "type": "array", | ||
| 752 | "items": { | ||
| 753 | "$ref": "#/definitions/models.MapShort" | ||
| 754 | } | ||
| 755 | } | ||
| 756 | } | ||
| 757 | }, | ||
| 758 | "models.ChaptersResponse": { | ||
| 759 | "type": "object", | ||
| 760 | "properties": { | ||
| 761 | "chapters": { | ||
| 762 | "type": "array", | ||
| 763 | "items": { | ||
| 764 | "$ref": "#/definitions/models.Chapter" | ||
| 765 | } | ||
| 766 | }, | ||
| 767 | "game": { | ||
| 768 | "$ref": "#/definitions/models.Game" | ||
| 769 | } | ||
| 770 | } | ||
| 771 | }, | ||
| 772 | "models.Game": { | ||
| 773 | "type": "object", | ||
| 774 | "properties": { | ||
| 775 | "id": { | ||
| 776 | "type": "integer" | ||
| 777 | }, | ||
| 778 | "name": { | ||
| 779 | "type": "string" | ||
| 780 | } | ||
| 781 | } | ||
| 782 | }, | ||
| 595 | "models.LoginResponse": { | 783 | "models.LoginResponse": { |
| 596 | "type": "object", | 784 | "type": "object", |
| 597 | "properties": { | 785 | "properties": { |
| @@ -655,6 +843,17 @@ | |||
| 655 | "records": {} | 843 | "records": {} |
| 656 | } | 844 | } |
| 657 | }, | 845 | }, |
| 846 | "models.MapShort": { | ||
| 847 | "type": "object", | ||
| 848 | "properties": { | ||
| 849 | "id": { | ||
| 850 | "type": "integer" | ||
| 851 | }, | ||
| 852 | "name": { | ||
| 853 | "type": "string" | ||
| 854 | } | ||
| 855 | } | ||
| 856 | }, | ||
| 658 | "models.MapSummary": { | 857 | "models.MapSummary": { |
| 659 | "type": "object", | 858 | "type": "object", |
| 660 | "properties": { | 859 | "properties": { |
| @@ -777,6 +976,39 @@ | |||
| 777 | "records": {} | 976 | "records": {} |
| 778 | } | 977 | } |
| 779 | }, | 978 | }, |
| 979 | "models.SearchResponse": { | ||
| 980 | "type": "object", | ||
| 981 | "properties": { | ||
| 982 | "maps": { | ||
| 983 | "type": "array", | ||
| 984 | "items": { | ||
| 985 | "type": "object", | ||
| 986 | "properties": { | ||
| 987 | "id": { | ||
| 988 | "type": "integer" | ||
| 989 | }, | ||
| 990 | "name": { | ||
| 991 | "type": "string" | ||
| 992 | } | ||
| 993 | } | ||
| 994 | } | ||
| 995 | }, | ||
| 996 | "players": { | ||
| 997 | "type": "array", | ||
| 998 | "items": { | ||
| 999 | "type": "object", | ||
| 1000 | "properties": { | ||
| 1001 | "steam_id": { | ||
| 1002 | "type": "string" | ||
| 1003 | }, | ||
| 1004 | "user_name": { | ||
| 1005 | "type": "string" | ||
| 1006 | } | ||
| 1007 | } | ||
| 1008 | } | ||
| 1009 | } | ||
| 1010 | } | ||
| 1011 | }, | ||
| 780 | "models.UserRanking": { | 1012 | "models.UserRanking": { |
| 781 | "type": "object", | 1013 | "type": "object", |
| 782 | "properties": { | 1014 | "properties": { |