Removing a food item from a menu deletes only the association row in theDocumentation 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.
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
The primary key of the menu from which the food item will be unlinked.
The primary key of the food item to remove from the menu.
Request body
None.Responses
| Status | Body | Description |
|---|---|---|
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
Example responses
Success — 200 OKThis 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.