diff --git a/internal/db/models.go b/internal/db/models.go index 5d8c6fe..973198d 100644 --- a/internal/db/models.go +++ b/internal/db/models.go @@ -4,8 +4,6 @@ package db -import () - type Url struct { ID int32 Hash string diff --git a/openapi.yaml b/openapi.yaml index 1b9135c..505fbe3 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -4,17 +4,17 @@ info: version: 0.1.0 description: An URL shortener service. paths: - '/{hash}': + "/{hash}": get: responses: - '307': + "307": description: Redirect client to long URL. headers: Location: schema: type: string description: Long URL - '404': + "404": description: Not Found description: Redirect client to long URL. operationId: redirectLongURL @@ -38,11 +38,11 @@ paths: url: type: string description: URL to shorten - example: 'https://example.com' + example: "https://example.com" required: - url responses: - '201': + "201": description: Succesfully created shorten URL. content: application/json: @@ -54,7 +54,7 @@ paths: description: Created shorten URL. Going to this URL should redirect to URL from request body. required: - shorten - '400': + "400": description: Bad Request content: application/json: