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.yaml | 53 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 23 deletions(-) (limited to 'docs/swagger.yaml') diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 88f2d7f..fa1a26d 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -7,6 +7,15 @@ definitions: name: type: string type: object + models.ChapterMapsResponse: + properties: + chapter: + $ref: '#/definitions/models.Chapter' + maps: + items: + $ref: '#/definitions/models.MapShort' + type: array + type: object models.ChaptersResponse: properties: chapters: @@ -195,7 +204,7 @@ paths: /chapters/{id}: get: parameters: - - description: Game ID + - description: Chapter ID in: path name: id required: true @@ -210,15 +219,15 @@ paths: - $ref: '#/definitions/models.Response' - properties: data: - $ref: '#/definitions/models.ChaptersResponse' + $ref: '#/definitions/models.ChapterMapsResponse' type: object "400": description: Bad Request schema: $ref: '#/definitions/models.Response' - summary: Get chapters from the specified game id. + summary: Get maps from the specified chapter id. tags: - - chapters + - games & chapters /demo: get: produces: @@ -286,11 +295,15 @@ paths: $ref: '#/definitions/models.Response' summary: Get games from the leaderboards. tags: - - games - /login: + - games & chapters + /games/{id}: get: - consumes: - - application/json + parameters: + - description: Game ID + in: path + name: id + required: true + type: integer produces: - application/json responses: @@ -301,23 +314,19 @@ paths: - $ref: '#/definitions/models.Response' - properties: data: - $ref: '#/definitions/models.LoginResponse' + $ref: '#/definitions/models.ChaptersResponse' type: object "400": description: Bad Request schema: $ref: '#/definitions/models.Response' - summary: Get (redirect) login page for Steam auth. + summary: Get chapters from the specified game id. tags: - - login - /maps/{id}: + - games & chapters + /login: get: - parameters: - - description: Chapter ID - in: path - name: id - required: true - type: integer + consumes: + - application/json produces: - application/json responses: @@ -328,17 +337,15 @@ paths: - $ref: '#/definitions/models.Response' - properties: data: - items: - $ref: '#/definitions/models.MapShort' - type: array + $ref: '#/definitions/models.LoginResponse' type: object "400": description: Bad Request schema: $ref: '#/definitions/models.Response' - summary: Get maps from the specified chapter id. + summary: Get (redirect) login page for Steam auth. tags: - - maps + - login /maps/{id}/leaderboards: get: parameters: -- cgit v1.2.3