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: