Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 20 additions & 16 deletions stock/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ paths:
tags: [Productos]
operationId: listarProductos
security:
- OAuth2: [productos:read]
- openIdConnect: [productos:read]
summary: Listar productos
parameters:
- $ref: '#/components/parameters/PaginaActual'
Expand All @@ -54,7 +54,7 @@ paths:
summary: Crear un producto
operationId: crearProducto
security:
- OAuth2: [productos:write]
- openIdConnect: [productos:write]
requestBody:
required: true
content:
Expand All @@ -81,7 +81,7 @@ paths:
summary: Obtener un producto por ID
operationId: obtenerProductoPorId
security:
- OAuth2: [productos:read]
- openIdConnect: [productos:read]
parameters:
- name: productoId
in: path
Expand All @@ -106,7 +106,7 @@ paths:
summary: Actualizar parcialmente un producto
operationId: actualizarProducto
security:
- OAuth2: [productos:write]
- openIdConnect: [productos:write]
parameters:
- name: productoId
in: path
Expand All @@ -131,7 +131,7 @@ paths:
summary: Eliminar un producto
operationId: eliminarProducto
security:
- OAuth2: [productos:write]
- openIdConnect: [productos:write]
parameters:
- name: productoId
in: path
Expand All @@ -148,7 +148,7 @@ paths:
summary: Listar reservas de un usuario
operationId: listarReservas
security:
- OAuth2: [reservas:read]
- openIdConnect: [reservas:read]
parameters:
- name: usuarioId
in: query
Expand Down Expand Up @@ -178,7 +178,7 @@ paths:
summary: Crear una reserva
operationId: crearReserva
security:
- OAuth2: [reservas:write]
- openIdConnect: [reservas:write]
requestBody:
required: true
content:
Expand Down Expand Up @@ -211,7 +211,7 @@ paths:
summary: Consultar una reserva por ID
operationId: obtenerReservaPorId
security:
- OAuth2: [reservas:read]
- openIdConnect: [reservas:read]
parameters:
- name: idReserva
in: path
Expand Down Expand Up @@ -242,7 +242,7 @@ paths:
summary: Actualizar estado de una reserva
operationId: actualizarReserva
security:
- OAuth2: [reservas:write]
- openIdConnect: [reservas:write]
parameters:
- name: idReserva
in: path
Expand Down Expand Up @@ -273,7 +273,7 @@ paths:
summary: Cancelar una reserva
operationId: cancelarReserva
security:
- OAuth2: [reservas:write]
- openIdConnect: [reservas:write]
description: "Cancela una reserva y libera el stock correspondiente."
parameters:
- name: idReserva
Expand Down Expand Up @@ -302,7 +302,7 @@ paths:
summary: Listar todas las categorías
operationId: listarCategorias
security:
- OAuth2: [categorias:read]
- openIdConnect: [categorias:read]
responses:
'200':
description: Una lista de categorías.
Expand All @@ -317,7 +317,7 @@ paths:
summary: Crear una nueva categoría
operationId: crearCategoria
security:
- OAuth2: [categorias:write]
- openIdConnect: [categorias:write]
requestBody:
required: true
content:
Expand All @@ -344,7 +344,7 @@ paths:
summary: Obtener una categoría por ID
operationId: obtenerCategoriaPorId
security:
- OAuth2: [categorias:read]
- openIdConnect: [categorias:read]
parameters:
- name: categoriaId
in: path
Expand All @@ -369,7 +369,7 @@ paths:
summary: Actualizar una categoría
operationId: actualizarCategoria
security:
- OAuth2: [categorias:write]
- openIdConnect: [categorias:write]
parameters:
- name: categoriaId
in: path
Expand All @@ -394,7 +394,7 @@ paths:
summary: Eliminar una categoría
operationId: eliminarCategoria
security:
- OAuth2: [categorias:write]
- openIdConnect: [categorias:write]
parameters:
- name: categoriaId
in: path
Expand All @@ -406,6 +406,10 @@ paths:
description: Categoría eliminada

components:
securitySchemes:
openIdConnect:
type: openIdConnect
openIdConnectUrl: http://localhost:8080/realms/ds-2025-realm/.well-known/openid-configuration
parameters:
PaginaActual:
name: page
Expand Down Expand Up @@ -813,4 +817,4 @@ components:
example:
id: 123
nombre: "Juan Pérez"
email: "[email protected]"
email: "[email protected]"