From 937160bfda2c8edc5ff5dd73899b517bb0ceb515 Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Wed, 3 May 2023 16:05:30 +0300 Subject: fix: sql typos, routing change --- docs/swagger.json | 67 ++++++++++++++++++++++++++++++++----------------------- 1 file changed, 39 insertions(+), 28 deletions(-) (limited to 'docs/swagger.json') diff --git a/docs/swagger.json b/docs/swagger.json index 653d52f..442745f 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -19,13 +19,13 @@ "application/json" ], "tags": [ - "chapters" + "games \u0026 chapters" ], - "summary": "Get chapters from the specified game id.", + "summary": "Get maps from the specified chapter id.", "parameters": [ { "type": "integer", - "description": "Game ID", + "description": "Chapter ID", "name": "id", "in": "path", "required": true @@ -43,7 +43,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/definitions/models.ChaptersResponse" + "$ref": "#/definitions/models.ChapterMapsResponse" } } } @@ -139,7 +139,7 @@ "application/json" ], "tags": [ - "games" + "games \u0026 chapters" ], "summary": "Get games from the leaderboards.", "responses": { @@ -173,18 +173,24 @@ } } }, - "/login": { + "/games/{id}": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], "tags": [ - "login" + "games \u0026 chapters" + ], + "summary": "Get chapters from the specified game id.", + "parameters": [ + { + "type": "integer", + "description": "Game ID", + "name": "id", + "in": "path", + "required": true + } ], - "summary": "Get (redirect) login page for Steam auth.", "responses": { "200": { "description": "OK", @@ -197,7 +203,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/definitions/models.LoginResponse" + "$ref": "#/definitions/models.ChaptersResponse" } } } @@ -213,24 +219,18 @@ } } }, - "/maps/{id}": { + "/login": { "get": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "maps" - ], - "summary": "Get maps from the specified chapter id.", - "parameters": [ - { - "type": "integer", - "description": "Chapter ID", - "name": "id", - "in": "path", - "required": true - } + "login" ], + "summary": "Get (redirect) login page for Steam auth.", "responses": { "200": { "description": "OK", @@ -243,10 +243,7 @@ "type": "object", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/definitions/models.MapShort" - } + "$ref": "#/definitions/models.LoginResponse" } } } @@ -744,6 +741,20 @@ } } }, + "models.ChapterMapsResponse": { + "type": "object", + "properties": { + "chapter": { + "$ref": "#/definitions/models.Chapter" + }, + "maps": { + "type": "array", + "items": { + "$ref": "#/definitions/models.MapShort" + } + } + } + }, "models.ChaptersResponse": { "type": "object", "properties": { -- cgit v1.2.3