From 345fa5d06a47837fca48137163f8a7bdae33cebf Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Sun, 18 Jun 2023 17:08:27 +0300 Subject: feat: improved map summary response (#43) --- docs/swagger.yaml | 82 ++++++++++++++++++++++++++----------------------------- 1 file changed, 38 insertions(+), 44 deletions(-) (limited to 'docs/swagger.yaml') diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 597df9f..61f2ad7 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -1,5 +1,12 @@ basePath: /v1 definitions: + models.Category: + properties: + id: + type: integer + name: + type: string + type: object models.Chapter: properties: id: @@ -41,7 +48,6 @@ definitions: properties: chapter_name: type: string - data: {} game_name: type: string id: @@ -49,17 +55,6 @@ definitions: map_name: type: string type: object - models.MapCategoryScores: - properties: - any: - type: integer - cm: - type: integer - inbounds_sla: - type: integer - no_sla: - type: integer - type: object models.MapHistory: properties: date: @@ -73,6 +68,17 @@ definitions: properties: records: {} type: object + models.MapRoute: + properties: + category: + $ref: '#/definitions/models.Category' + description: + type: string + score_count: + type: integer + showcase: + type: string + type: object models.MapShort: properties: id: @@ -82,22 +88,23 @@ definitions: type: object models.MapSummary: properties: - category_scores: - $ref: '#/definitions/models.MapCategoryScores' - description: - type: string history: items: $ref: '#/definitions/models.MapHistory' type: array rating: type: number - routers: + routes: items: - type: string + $ref: '#/definitions/models.MapRoute' type: array - showcase: - type: string + type: object + models.MapSummaryResponse: + properties: + map: + $ref: '#/definitions/models.Map' + summary: + $ref: '#/definitions/models.MapSummary' type: object models.ProfileResponse: properties: @@ -165,21 +172,11 @@ definitions: properties: maps: items: - properties: - id: - type: integer - name: - type: string - type: object + $ref: '#/definitions/models.MapShort' type: array players: items: - properties: - steam_id: - type: string - user_name: - type: string - type: object + $ref: '#/definitions/models.UserShort' type: array type: object models.UserRanking: @@ -191,6 +188,13 @@ definitions: user_name: type: string type: object + models.UserShort: + properties: + steam_id: + type: string + user_name: + type: string + type: object host: lp.ardapektezol.com/api info: contact: {} @@ -456,12 +460,7 @@ paths: - $ref: '#/definitions/models.Response' - properties: data: - allOf: - - $ref: '#/definitions/models.Map' - - properties: - data: - $ref: '#/definitions/models.MapSummary' - type: object + $ref: '#/definitions/models.MapSummaryResponse' type: object "400": description: Bad Request @@ -555,12 +554,7 @@ paths: "200": description: OK schema: - allOf: - - $ref: '#/definitions/models.Response' - - properties: - data: - $ref: '#/definitions/models.ProfileResponse' - type: object + $ref: '#/definitions/models.Response' "400": description: Bad Request schema: -- cgit v1.2.3