POST /recipe/{id}.
+ * Also creates the ingredient elements if they do not exist.
* @param id The recipe id to replace
* @param recipe The new recipe to be replaced from the original
* @return The changed recipe; returns 400 Bad Request if the recipe does not exist
+ * @see IngredientController#createIngredient(Ingredient)
*/
@PostMapping("/recipe/{id}")
public ResponseEntityPUT /recipe/new.
+ * Includes same transient object handling as the POST handler.
* * Inserts a new recipe into the repository *
* @param recipe The new recipe as a request body * @return 200 OK with the recipe you added; or 400 Bad Request if the recipe already exists by name + * @see RecipeController#updateRecipe(Long, Recipe) */ @PutMapping("/recipe/new") public ResponseEntity