- Run unit tests
./xsbt.sh test
- Run integration tests
./xsbt.sh it:test
- Build docker container
./xsbt.sh docker
- Run docker with mongo db
docker-compose up
Stop containers with
docker-compose down
GET /restaurants/
Responses:
-
Gets a restaurant by id
-
The restaurant is not found
Sample response:
{
"id": "aa905e21-1c6b-4508-84c3-eaa380847ccb",
"name": "some_restaurant1",
"cuisines": ["ukrainian"],
"address": "address1",
"description": "cool restaurant"
}
GET /restaurants
- Gets the list of all stored restaurants.
POST /restaurants
Example body:
{
"name" :"some_restaurant1",
"cuisines" : ["ukrainian"],
"address":"address1",
"description": "cool restaurant"
}
-
Creates a restaurant. Returns the created restaurant.
-
The same restaurant by name and address is found. Responds with existing restaurant data.
PUT /restaurants/
- Updates a restaurant. No response body.
DELETE /restaurants/
- Deletes a restaurant. No response body.