Creates a tiny url for long urls and redirects to the original url when you use the tiny url
Work-in-progress
py -m venv venv
# activate venv
pip install poetry
poetry install
cd my_tiny_url
py app.py
# access app at http://localhost:8000
# access swagger ui at http://localhost:8000
# access swagger json at http://localhost:8000/swagger.jsonCreate a short URL
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | URLModel |
| Code | Description |
|---|---|
| 200 | Success |
| 201 | Success |
| 400 | Validation Error |
Redirect to the long URL
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| short_url | path | The short URL identifier | Yes | string |
| Code | Description |
|---|---|
| 301 | Redirect |
| 404 | URL Not Found |
| Name | Type | Description | Required |
|---|---|---|---|
| url | string | The long URL to be shortened | Yes |