Skip to content

andrelsf/spring-kotlin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kotlin, Spring, PostgreSQL and Liquibase Database Migrations

Learning Kotlin for backend with Spring, Database Migrations Liquibase and PostgreSQL

Usage

Tools:

Run:

docker-compose up -d
mvn spring-boot:run

Usage:

Examples in directory requests

POST a new Game

http --json POST :8090/api/games < requests/postANewGame.json

GET All games

http --json GET :8090/api/games offset==0 limit==50

GET a single game by ID

http --json GET :8090/api/games/89d36599-3af7-459b-889d-ec655d38769f

Result:

HTTP/1.1 200 
Connection: keep-alive
Content-Type: application/json
Date: Sun, 13 Feb 2022 13:08:54 GMT
Keep-Alive: timeout=60
Transfer-Encoding: chunked

{
    "description": "Claiton bom de guerra",
    "gameId": "89d36599-3af7-459b-889d-ec655d38769f",
    "name": "Bom de Guerra",
    "platform": "PS4",
    "price": "79.90"
}

PUT a single game by ID

http --json PUT :8090/api/games/89d36599-3af7-459b-889d-ec655d38769f \ 
 < requests/putAGameRequest.json

PATCH a single game by ID

http --json PATCH :8090/api/games/89d36599-3af7-459b-889d-ec655d38769f \
 < requests/patchAGameRequest_price.json

DELETE a single game by ID

http --json DELETE :8090/api/games/89d36599-3af7-459b-889d-ec655d38769f

About

Learning API Rest with Kotlin, Spring, Liquibase and PostgreSQL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published