From 91a7475abde54a342510fc481f3294a4d1f507d0 Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Thu, 20 Apr 2023 14:42:19 +0000 Subject: finalize swagger, port to prod machine (#34) --- docs/docs.go | 40 +++++++++++++++++++++++++++++++++++++--- docs/swagger.json | 34 +++++++++++++++++++++++++++++++++- docs/swagger.yaml | 25 +++++++++++++++++++++++-- 3 files changed, 93 insertions(+), 6 deletions(-) (limited to 'docs') diff --git a/docs/docs.go b/docs/docs.go index 40bae17..70a7267 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -1,5 +1,5 @@ -// Package docs GENERATED BY SWAG; DO NOT EDIT -// This file was generated by swaggo/swag +// Code generated by swaggo/swag. DO NOT EDIT. + package docs import "github.com/swaggo/swag" @@ -152,6 +152,7 @@ const docTemplate = `{ "items": { "type": "file" }, + "collectionFormat": "csv", "description": "Demos", "name": "demos", "in": "formData", @@ -469,6 +470,23 @@ const docTemplate = `{ } } }, + "models.RankingsResponse": { + "type": "object", + "properties": { + "rankings_mp": { + "type": "array", + "items": { + "$ref": "#/definitions/models.UserRanking" + } + }, + "rankings_sp": { + "type": "array", + "items": { + "$ref": "#/definitions/models.UserRanking" + } + } + } + }, "models.RecordRequest": { "type": "object", "required": [ @@ -512,6 +530,20 @@ const docTemplate = `{ }, "records": {} } + }, + "models.UserRanking": { + "type": "object", + "properties": { + "total_score": { + "type": "integer" + }, + "user_id": { + "type": "string" + }, + "username": { + "type": "string" + } + } } } }` @@ -519,13 +551,15 @@ const docTemplate = `{ // SwaggerInfo holds exported Swagger Info so clients can modify it var SwaggerInfo = &swag.Spec{ Version: "1.0", - Host: "localhost:4000/api", + Host: "lp.ardapektezol.com/api", BasePath: "/v1", Schemes: []string{}, Title: "Least Portals Database API", Description: "Backend API endpoints for Least Portals Database.", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, + LeftDelim: "{{", + RightDelim: "}}", } func init() { diff --git a/docs/swagger.json b/docs/swagger.json index 03a2592..861610b 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -10,7 +10,7 @@ }, "version": "1.0" }, - "host": "localhost:4000/api", + "host": "lp.ardapektezol.com/api", "basePath": "/v1", "paths": { "/demo": { @@ -145,6 +145,7 @@ "items": { "type": "file" }, + "collectionFormat": "csv", "description": "Demos", "name": "demos", "in": "formData", @@ -462,6 +463,23 @@ } } }, + "models.RankingsResponse": { + "type": "object", + "properties": { + "rankings_mp": { + "type": "array", + "items": { + "$ref": "#/definitions/models.UserRanking" + } + }, + "rankings_sp": { + "type": "array", + "items": { + "$ref": "#/definitions/models.UserRanking" + } + } + } + }, "models.RecordRequest": { "type": "object", "required": [ @@ -505,6 +523,20 @@ }, "records": {} } + }, + "models.UserRanking": { + "type": "object", + "properties": { + "total_score": { + "type": "integer" + }, + "user_id": { + "type": "string" + }, + "username": { + "type": "string" + } + } } } } \ No newline at end of file diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 5300e1f..db0ab47 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -40,6 +40,17 @@ definitions: username: type: string type: object + models.RankingsResponse: + properties: + rankings_mp: + items: + $ref: '#/definitions/models.UserRanking' + type: array + rankings_sp: + items: + $ref: '#/definitions/models.UserRanking' + type: array + type: object models.RecordRequest: properties: is_partner_orange: @@ -70,7 +81,16 @@ definitions: type: integer records: {} type: object -host: localhost:4000/api + models.UserRanking: + properties: + total_score: + type: integer + user_id: + type: string + username: + type: string + type: object +host: lp.ardapektezol.com/api info: contact: {} description: Backend API endpoints for Least Portals Database. @@ -155,7 +175,8 @@ paths: consumes: - multipart/form-data parameters: - - description: Demos + - collectionFormat: csv + description: Demos in: formData items: type: file -- cgit v1.2.3