From 68ec32d5d7adc39e425fd24b67d6e067fa86cc37 Mon Sep 17 00:00:00 2001 From: PickHD Date: Mon, 8 May 2023 18:59:32 +0700 Subject: [PATCH] feat (SRS-06) : update docs swagger --- shortener/docs/docs.go | 49 +++++++++++++++++++++++++++++++++++++ shortener/docs/swagger.json | 49 +++++++++++++++++++++++++++++++++++++ shortener/docs/swagger.yaml | 32 ++++++++++++++++++++++++ 3 files changed, 130 insertions(+) diff --git a/shortener/docs/docs.go b/shortener/docs/docs.go index d5649d7..d4bbae3 100644 --- a/shortener/docs/docs.go +++ b/shortener/docs/docs.go @@ -49,6 +49,55 @@ const docTemplate = `{ } } } + }, + "/{short_url}": { + "get": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Shortener" + ], + "summary": "Click Shorteners URL", + "parameters": [ + { + "type": "string", + "description": "short urls", + "name": "short_url", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/helper.BaseResponse" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/helper.BaseResponse" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/helper.BaseResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/helper.BaseResponse" + } + } + } + } } }, "definitions": { diff --git a/shortener/docs/swagger.json b/shortener/docs/swagger.json index eff3890..fa581cb 100644 --- a/shortener/docs/swagger.json +++ b/shortener/docs/swagger.json @@ -45,6 +45,55 @@ } } } + }, + "/{short_url}": { + "get": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Shortener" + ], + "summary": "Click Shorteners URL", + "parameters": [ + { + "type": "string", + "description": "short urls", + "name": "short_url", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/helper.BaseResponse" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/helper.BaseResponse" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/helper.BaseResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/helper.BaseResponse" + } + } + } + } } }, "definitions": { diff --git a/shortener/docs/swagger.yaml b/shortener/docs/swagger.yaml index 1d574ab..aac7717 100644 --- a/shortener/docs/swagger.yaml +++ b/shortener/docs/swagger.yaml @@ -29,6 +29,38 @@ info: title: Singkatin Revamp API version: "1.0" paths: + /{short_url}: + get: + consumes: + - application/json + parameters: + - description: short urls + in: path + name: short_url + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/helper.BaseResponse' + "400": + description: Bad Request + schema: + $ref: '#/definitions/helper.BaseResponse' + "404": + description: Not Found + schema: + $ref: '#/definitions/helper.BaseResponse' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/helper.BaseResponse' + summary: Click Shorteners URL + tags: + - Shortener /health-check: get: consumes: