-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from naohito-T/feature/logger
Feature/logger
- Loading branch information
Showing
28 changed files
with
643 additions
and
459 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,5 +15,6 @@ | |
"markdownlint.config": { | ||
"MD013": false, | ||
"MD033": false | ||
} | ||
}, | ||
"makefile.configureOnOpen": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,13 +48,6 @@ components: | |
ErrorModel: | ||
additionalProperties: false | ||
properties: | ||
$schema: | ||
description: A URL to the JSON Schema for this object. | ||
examples: | ||
- http://localhost:6500/api/v1/schemas/ErrorModel.json | ||
format: uri | ||
readOnly: true | ||
type: string | ||
detail: | ||
description: A human-readable explanation specific to this occurrence of the problem. | ||
examples: | ||
|
@@ -64,7 +57,9 @@ components: | |
description: Optional list of individual error details | ||
items: | ||
$ref: "#/components/schemas/ErrorDetail" | ||
type: array | ||
type: | ||
- array | ||
- "null" | ||
instance: | ||
description: A URI reference that identifies the specific occurrence of the problem. | ||
examples: | ||
|
@@ -114,13 +109,6 @@ components: | |
HealthCheckResponseBody: | ||
additionalProperties: false | ||
properties: | ||
$schema: | ||
description: A URL to the JSON Schema for this object. | ||
examples: | ||
- http://localhost:6500/api/v1/schemas/HealthCheckResponseBody.json | ||
format: uri | ||
readOnly: true | ||
type: string | ||
message: | ||
type: string | ||
required: | ||
|
@@ -132,42 +120,71 @@ components: | |
scheme: bearer | ||
type: http | ||
info: | ||
contact: | ||
email: [email protected] | ||
name: naohito-T | ||
url: https://naohito-t.github.io/ | ||
description: This is a simple URL shortener service. | ||
license: | ||
name: MIT | ||
url: https://opensource.org/licenses/MIT | ||
title: TinyURL API | ||
version: 1.0.0 | ||
openapi: 3.1.0 | ||
paths: | ||
/health: | ||
get: | ||
description: Check the health of the service. | ||
operationId: health | ||
operationId: health-check | ||
parameters: | ||
- description: Optional database check parameter | ||
- description: Optional DynamoDB check parameter | ||
explode: false | ||
in: query | ||
name: q | ||
schema: | ||
description: Optional database check parameter | ||
description: Optional DynamoDB check parameter | ||
type: boolean | ||
responses: | ||
"200": | ||
content: | ||
application/json: | ||
example: "{message: ok}" | ||
schema: | ||
$ref: "#/components/schemas/HealthCheckResponseBody" | ||
description: OK | ||
default: | ||
properties: | ||
message: | ||
type: string | ||
type: object | ||
description: Health check successful | ||
"503": | ||
content: | ||
application/problem+json: | ||
schema: | ||
$ref: "#/components/schemas/ErrorModel" | ||
description: Error | ||
properties: | ||
detail: | ||
type: string | ||
status: | ||
type: integer | ||
title: | ||
type: string | ||
type: | ||
format: uri | ||
type: string | ||
type: object | ||
description: Service unavailable | ||
summary: Health Check | ||
tags: | ||
- Public | ||
/urls: | ||
post: | ||
description: Create a short URL. | ||
operationId: create-tinyurl | ||
parameters: | ||
- description: ID of the short URL | ||
in: path | ||
name: id | ||
required: true | ||
schema: | ||
type: string | ||
requestBody: | ||
content: | ||
application/json: | ||
|
@@ -181,12 +198,20 @@ paths: | |
schema: | ||
$ref: "#/components/schemas/CreateTinyURLResponseBody" | ||
description: OK | ||
default: | ||
"201": | ||
description: Created short URL | ||
headers: | ||
Location: | ||
description: Location of the original URL | ||
schema: | ||
format: uri | ||
type: string | ||
"500": | ||
content: | ||
application/problem+json: | ||
text/plain: | ||
schema: | ||
$ref: "#/components/schemas/ErrorModel" | ||
description: Error | ||
type: string | ||
description: Failed to create short URL | ||
summary: Create a short URL | ||
tags: | ||
- Public | ||
|
@@ -226,14 +251,26 @@ paths: | |
schema: | ||
type: string | ||
description: Short URL not found | ||
"500": | ||
content: | ||
text/plain: | ||
schema: | ||
type: string | ||
description: Failed to Get short URL | ||
summary: Redirect to original URL | ||
tags: | ||
- Public | ||
/urls/info/:id: | ||
/urls/:id/info: | ||
get: | ||
description: Get Info tinyurl | ||
operationId: info-tinyurl | ||
parameters: | ||
- description: ID of the short URL | ||
in: path | ||
name: id | ||
required: true | ||
schema: | ||
type: string | ||
- in: path | ||
name: id | ||
required: true | ||
|
@@ -246,15 +283,20 @@ paths: | |
schema: | ||
$ref: "#/components/schemas/GetInfoTinyURLResponseBody" | ||
description: OK | ||
default: | ||
"404": | ||
content: | ||
application/problem+json: | ||
text/plain: | ||
schema: | ||
$ref: "#/components/schemas/ErrorModel" | ||
description: Error | ||
type: string | ||
description: Short URL not found | ||
summary: Get Info tinyurl | ||
tags: | ||
- Public | ||
servers: | ||
- url: http://localhost:6500/api/v1 | ||
- description: Local API Server | ||
url: http://localhost:6500/api/v1 | ||
- description: Dev API Server | ||
url: http://localhost:6500/api/v1 | ||
- description: Prod API Server | ||
url: http://localhost:6500/api/v1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.