Skip to content

melgenek/akka-restaurant-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Akka + mongo simple restaurants api

Build/run

  1. Run unit tests
./xsbt.sh test
  1. Run integration tests
./xsbt.sh it:test
  1. Build docker container
./xsbt.sh docker
  1. Run docker with mongo db
docker-compose up

Stop containers with

docker-compose down

Api

GET /restaurants/

Responses:

  1. Gets a restaurant by id

  2. 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

  1. Gets the list of all stored restaurants.

POST /restaurants

Example body:

{
	"name" :"some_restaurant1",
	"cuisines" : ["ukrainian"],
	"address":"address1",
	"description": "cool restaurant"
}
  1. Creates a restaurant. Returns the created restaurant.

  2. The same restaurant by name and address is found. Responds with existing restaurant data.

PUT /restaurants/

  1. Updates a restaurant. No response body.

DELETE /restaurants/

  1. Deletes a restaurant. No response body.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published