Self contained API service for CRUD operations on Restaurants.
This service is built using AkkaHttp
Clone this repo
git clone https://github.com/smur89/deliveryhero.git
Create the docker image
gradle buildDocker
Run the docker image
docker run --rm -p 8080:8080 --name deliveryhero-rest com.deliveryhero/restservice:latest
This API is documented using Swagger. Please visit the following URL for details
http://localhost:8080/swagger/index.html
GET /v1/healthcheck
curl -X GET "http://localhost:8080/v1/healthcheck" -H "accept: */*"
GET /v1/restaurants
Gets the list of all stored available restaurants
curl -X GET "http://localhost:8080/v1/restaurants" -H "accept: */*"
GET /v1/restaurants/{id}
Gets a given restaurant
curl -X GET "http://localhost:8080/v1/restaurants/0" -H "accept: */*"
POST /v1/restaurants
Create a restaurant
curl -X POST "http://localhost:8080/v1/restaurants" -H "accept: */*" -H "Content-Type: */*" -d "{\"name\":\"string\",\"phoneNo\":\"string\",\"cuisines\":[\"string\"],\"address\":{\"line1\":\"string\",\"line2\":\"string\",\"city\":\"string\",\"country\":\"string\"},\"description\":\"string\"}"
PUT /v1/restaurants
Updates a restaurant
curl -X PUT "http://localhost:8080/v1/restaurants/0" -H "accept: */*" -H "Content-Type: */*" -d "{\"name\":\"string\",\"phoneNo\":\"string\",\"cuisines\":[\"string\"],\"address\":{\"line1\":\"string\",\"line2\":\"string\",\"city\":\"string\",\"country\":\"string\"},\"description\":\"string\"}"
DELETE /v1/restaurants
Delete a restaurant
curl -X DELETE "http://localhost:8080/v1/restaurants/0" -H "accept: */*"