- Start the mysql docker container in
/docker
withdocker-compose up
- Start the api with
gradlew bootRun
- Optionally run nl.quintor.recipes.DatabasePopulator for some test recipes
GET http://localhost:8080/recipes
Filter structure
filters={
"exclusions": [
{
"property": "ingredients",
"value": "Salmon",
"exact": true
}
],
"inclusions": [
{
"property": "instructions",
"value": "oven",
"exact": false
}
]
}
GET http://localhost:8080/recipes/1
DELETE http://localhost:8080/recipes/1
POST http://localhost:8080/recipes
BODY EXAMPLE:
{
"categories" : [ "Vegetarian", "Vegan" ],
"ingredients" : [ "Egg" ],
"servings" : 4,
"instructions" : "Boil for an hour",
"name" : "Eggs!"
}
PUT http://localhost:8080/recipes/1
BODY EXAMPLE:
{
"categories" : [ "Vegetarian", "Vegan" ],
"ingredients" : [ "Egg" ],
"servings" : 4,
"instructions" : "Boil for an hour",
"name" : "Eggs!"
}
A layered architecture was used with the following layers
All classes related to fetching / saving data
All classes related to business logic
All user facing classes and rest controllers