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 Get Pantry endpoint returns the complete Despensa entity for a given ID. The response includes the nested Gerente (manager) object and the full list of Ingrediente records currently linked to the pantry. Use this endpoint when you need the raw entity — for a lightweight ingredient list projection, use GET /api/despensa/{id}/ingredientes instead.

Endpoint

GET /api/despensa/{id}

Path Parameters

id
integer
required
The unique identifier of the pantry (Despensa). Must correspond to an existing record in the database.

Request Example

curl http://localhost:8080/api/despensa/1

Responses

200 OK

Returns the full Despensa JSON object. The gerente field is eagerly loaded and always present. The ingredientes array contains every Ingrediente entity linked to this pantry via the despensa_ingredientes join table.
{
  "id": 1,
  "gerente": {
    "id": 1,
    "nombre": "Martín Vargas",
    "cedula": "1234567890"
  },
  "ingredientes": [
    { "id": 1, "descripcion": "Tomate", "cantidadStock": 100 },
    { "id": 2, "descripcion": "Cebolla", "cantidadStock": 80 }
  ]
}

404 Not Found

Returned when no Despensa record exists for the supplied id. The response body is empty.

Response Fields

id
integer
The unique identifier of the pantry.
gerente
object
The manager who owns this pantry. Eagerly loaded from the gerente table via the gerente_id foreign key.
ingredientes
array
The list of Ingrediente entities currently linked to this pantry through the despensa_ingredientes join table. May be an empty array if no ingredients have been added.
The recetas and despensas fields on each Ingrediente entity are annotated with @JsonIgnore and will not appear in the response, preventing circular serialization.

Build docs developers (and LLMs) love