Simple backend service that implements CRUD operations.
- Swift
- Vapor
- Docker
- PSQL
Important
Do not forget to create and fill the .env
file! Just remove .example from .env.example
git clone git@github.com:KeoFoxy/swift-foxgres.git
docker-compose build
docker-compose up -d
docker-compose run migrate
docker-compose up -d db
swift test
Warning
Make sure that the DB is available either via Docker or locally
Method | URL | Description |
---|---|---|
GET |
/animes |
Receive all anime. |
GET |
/animes/{id} |
Get anime by id. |
POST |
/animes |
Create an anime. |
PUT |
/animes/{id} |
Update existing anime by id. |
DELETE |
/animes/{id} |
Delete anime by id. |
Method | URL | Description |
---|---|---|
GET |
/characters |
Receive all characters. |
GET |
/characters/{id} |
Get character by id. |
POST |
/characters |
Create character. |
PUT |
/characters/{id} |
Update existing character by id. |
DELETE |
/characters/{id} |
Delete character by id. |
id: Optional<UUID>
titleEn: String
titleJp: String
description: Optional<String>
releaseDate: Date
rating: Double
episodeCount: Int
type: AnimeType
characters: [UUID]
genres: Optional<[String]>
imageUrl: Optional<String>
id: Optional<UUID>
name: String
description: Optional<String>
animeId: [UUID]
imageUrl: Optional<String>