{"openapi":"3.1.0","info":{"version":"0.0.1","title":"UpperWear API","description":"UpperWear is an online store that sells a variety of tops."},"components":{"schemas":{},"parameters":{}},"paths":{"/api/products":{"get":{"description":"Get all products","tags":["Products"],"responses":{"200":{"description":"List of products"}}}},"/api/products/{slug}":{"get":{"description":"Get product by slug","tags":["Products"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Product details"},"404":{"description":"Product not found"}}}},"/api/collections/{slug}":{"get":{"description":"Get products by collection's slug","tags":["Collections"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Products list"}}}},"/api/cart":{"get":{"description":"Get cart items","tags":["Cart"],"responses":{"200":{"description":"Cart items list"}}},"post":{"description":"Add item to cart","tags":["Cart"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"productId":{"type":"string","minLength":1},"productVariantId":{"type":"string","minLength":1},"quantity":{"type":"integer","minimum":1}},"required":["productId","productVariantId","quantity"]}}}},"responses":{"200":{"description":"Item added to cart successfully"}}}},"/api/cart/{id}":{"patch":{"description":"Update cart item","tags":["Cart"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"quantity":{"type":"integer","minimum":1}},"required":["quantity"]}}}},"responses":{"200":{"description":"Item updated successfully"}}},"delete":{"description":"Delete cart item","tags":["Cart"],"responses":{"200":{"description":"Item deleted successfully"}}}}},"webhooks":{}}