Get
a list ofrecipes
(date created, description)Add
a newrecipe
Add
a newrecipe
based on another one - culinaryfork
of a recipe.Child
recipesdo not inherit
anything from a parent recipe - they are just shown as children of a parent one. User can add child recipes to recipes on any depth.Modify
an existingrecipe
(on any depth).Get
allprevious
recipeversions
(on any depth).- Recipes are sorted alphabetically (on any depth).
- Download the source code
- Project is delivered as Maven project
- Download and Install Maven
- Open in your IDE
- Once you opened the project in the IDE
run
-CookbookApplication
and application will start. unit
tests forRecipeMapper
andRecipeController
included in thetest
directory.
- Download and Install any API testing tool, e.g Postman
http://localhost:8080/recipes
- default endpoint./
-Get
all
savedrecipes
sortedalphabetically
/save
-Post
arecipe
and revert withResponseDto
./modify/{id}
-Put
arecipe
. Modify existingrecipe
, ifrecipe
not found -HttpStatus.NOT_FOUND
status will be returned. If found - will be modified with suppliedRequestDto
, saved to DB and returned as aResponseDto
./fork/{id}
-fork
arecipe
. Ifrecipe
is found by suppliedid
it will become a forked version of a foundrecipe
.Recipe
which is found byid
becomes a parent of newrecipe
. ifrecipe
not found -HttpStatus.NOT_FOUND
status will be returned./versions/{id}
-Get
aList
of all previous versions of arecipe
. If norecipe
found by suppliedid
HttpStatus.NOT_FOUND
will be returned./delete/{id}
- Finds anddeletes
arecipe
by suppliedid
and returns a messageRecipe deleted
. If not found byid
will returnRecipe not found
message.