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.

The Menu API exposes all operations needed to manage a restaurant’s menus and the food items associated with them. Every endpoint is served under the base path /api/menu and is CORS-enabled — no authentication token is required. The server runs at http://localhost:8080 by default.

Endpoints

GET /api/menu/{id}

Retrieve a full Menu object, including its assigned manager and all linked food items.

GET /api/menu/{id}/alimentos

List food items with enriched detail — recipe, chef, and ingredient count — sorted alphabetically.

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

Retrieve a single food item from a menu with its full Receta association eager-loaded.

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

Link an already-existing food item to a menu without creating any new records.

POST /api/menu/{menuId}/alimento-completo

Create a recipe, link ingredients, create the food item, and add it to the menu in one atomic request.

PUT /api/menu/{menuId}/alimento-completo/{alimentoId}

Update a food item’s name, price, type, recipe, chef, and ingredient list. Supports changing the JPA discriminator type via native SQL.

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

Unlink a food item from a menu. The Alimento record is kept; only the join-table row is removed.

AlimentoCompletoRequest

The AlimentoCompletoRequest DTO is the request body for both the create and update endpoints. All fields are sent as JSON.
nombreAlimento
string
required
Display name of the food item. Maximum 100 characters. Maps to the nombre column of the alimentos table.
precio
number
required
Price of the food item as a decimal value. Maps to a DECIMAL(10,2) column.
tipo
string
required
Food category. Controls the JPA single-table inheritance discriminator column tipo_alimento. One of:
  • PLATO_FUERTE — main course (PlatoFuerte entity)
  • POSTRE — dessert (Postres entity)
  • BEBIDA — beverage (Bebida entity)
  • ADICIONAL — side or add-on (Adicionales entity)
  • GENERAL — uncategorised base Alimento
nombreReceta
string
required
Name for the recipe that will be created or updated alongside the food item.
descripcionProceso
string
Free-text description of the preparation process. Stored on the Receta entity.
chefCedula
string
required
The cédula (national ID number) of the chef who owns the recipe. The server looks up the chef by this value — the request returns 400 if no match is found.
ingredientesDescripciones
string[]
Array of ingredient description strings. Each string must exactly match the descripcion field of an existing Ingrediente record. Strings that do not match any record are silently skipped rather than causing an error.

Response codes

StatusMeaning
200 OKThe operation completed successfully.
400 Bad RequestThe operation failed — typically because a referenced menu, food item, or chef could not be found. The response body contains a plain-text error message.
404 Not FoundA GET request was made for a resource ID that does not exist.

Build docs developers (and LLMs) love