{"openapi":"3.0.0","info":{"title":"API Tienda Online","version":"1.0.0","description":"API para gestión de usuarios, productos, carrito de compras, órdenes, inventario, envíos y pasarela de pago.\n"},"servers":[{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/concentrix-5d8/APITienda/1.0.0"},{"url":"http://localhost:8080/api"}],"paths":{"/users":{"get":{"summary":"Listar usuarios","responses":{"200":{"description":"Lista de usuarios","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}}}}},"post":{"summary":"Crear usuario","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"responses":{"201":{"description":"Usuario creado"}}}},"/products":{"get":{"summary":"Obtener productos con búsqueda y paginación","parameters":[{"name":"search","in":"query","schema":{"type":"string"}},{"name":"page","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"Lista de productos","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Product"}}}}}}}},"/cart":{"get":{"summary":"Ver carrito de compras","responses":{"200":{"description":"Carrito actual","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cart"}}}}}},"post":{"summary":"Agregar producto al carrito","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CartItem"}}}},"responses":{"201":{"description":"Producto agregado"}}}},"/orders":{"get":{"summary":"Listar órdenes","responses":{"200":{"description":"Lista de órdenes","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Order"}}}}}}},"post":{"summary":"Crear orden","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"responses":{"201":{"description":"Orden creada"}}}},"/inventory":{"get":{"summary":"Consultar inventario","responses":{"200":{"description":"Estado del inventario","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Inventory"}}}}}}},"/shipping":{"get":{"summary":"Consultar envíos","responses":{"200":{"description":"Lista de envíos","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Shipping"}}}}}}}},"/payment":{"post":{"summary":"Procesar pago","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}}},"responses":{"200":{"description":"Pago procesado","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentResponse"}}}}}}}},"components":{"schemas":{"User":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"email":{"type":"string"}}},"Product":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"price":{"type":"number"}}},"Cart":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CartItem"}}}},"CartItem":{"type":"object","properties":{"productId":{"type":"integer"},"quantity":{"type":"integer"}}},"Order":{"type":"object","properties":{"id":{"type":"integer"},"userId":{"type":"integer"},"status":{"type":"string"}}},"Inventory":{"type":"object","properties":{"productId":{"type":"integer"},"stock":{"type":"integer"}}},"Shipping":{"type":"object","properties":{"id":{"type":"integer"},"orderId":{"type":"integer"},"status":{"type":"string"}}},"Payment":{"type":"object","properties":{"orderId":{"type":"integer"},"amount":{"type":"number"},"method":{"type":"string"}}},"PaymentResponse":{"type":"object","properties":{"transactionId":{"type":"string"},"status":{"type":"string"}}}}}}