Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/NicolasMPP/restorante-springboot/llms.txt

Use this file to discover all available pages before exploring further.

Removing a food item from a menu deletes only the association row in the menu_alimentos join table — it does not delete the underlying Alimento record from the alimentos table. After a successful removal, the food item continues to exist in the database and can be re-linked to the same menu or any other menu using POST /api/menu/{menuId}/alimentos/{alimentoId}. The operation first verifies that both the menu and the food item exist before attempting to modify the join table.

Endpoint

DELETE /api/menu/{menuId}/alimentos/{alimentoId}

Path parameters

menuId
integer
required
The primary key of the menu from which the food item will be unlinked.
alimentoId
integer
required
The primary key of the food item to remove from the menu.

Request body

None.

Responses

StatusBodyDescription
200 OK"Alimento removido del menú"The association was successfully removed from menu_alimentos.
400 Bad Request"No se pudo remover el alimento"Either the menu ID or the food item ID was not found in the database.

Example request

curl -X DELETE http://localhost:8080/api/menu/1/alimentos/3

Example responses

Success — 200 OK
Alimento removido del menú
Failure — 400 Bad Request
No se pudo remover el alimento
This endpoint only removes the association between the menu and the food item. The Alimento record itself — along with its linked Receta, chef, and ingredients — remains intact in the database. To permanently delete a food item and all its associations, use the dedicated DELETE /api/alimentos/{id} endpoint in the Alimentos API instead.

Build docs developers (and LLMs) love