{
    "openapi": "3.0.0",
    "info": {
        "title": "Nafarm",
        "version": "1.0"
    },
    "servers": [
        {
            "url": "/api"
        },
        {
            "url": "/nafarm/public/api/"
        }
    ],
    "paths": {
        "/cart/add": {
            "post": {
                "tags": [
                    "Cart"
                ],
                "summary": "Add a product to the cart",
                "description": "Allows an authenticated user to add a product to their shopping cart.",
                "operationId": "68c9390a99a777dd05c2b84b2a5c2467",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "product_id",
                                    "quantity"
                                ],
                                "properties": {
                                    "product_id": {
                                        "description": "ID of the product to add to cart",
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "quantity": {
                                        "description": "Quantity of the product",
                                        "type": "integer",
                                        "example": 2
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Product added to cart successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Product added to cart successfully"
                                        },
                                        "data": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 5
                                                },
                                                "user_id": {
                                                    "type": "integer",
                                                    "example": 10
                                                },
                                                "product_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "quantity": {
                                                    "type": "integer",
                                                    "example": 2
                                                },
                                                "created_at": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2025-02-11 10:00:00"
                                                },
                                                "updated_at": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2025-02-11 10:05:00"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "The product_id field is required."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Product not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Product not found"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Something went wrong."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/cart/remove/{product_id}": {
            "delete": {
                "tags": [
                    "Cart"
                ],
                "summary": "Remove a product from the cart",
                "description": "Removes a specific product from the user's shopping cart.",
                "operationId": "6ba266b7962efc33cbb8eccd85e9c11b",
                "parameters": [
                    {
                        "name": "product_id",
                        "in": "path",
                        "description": "ID of the product to remove",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Product removed from cart successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Product removed from cart successfully"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Product not found in cart",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Product not found in cart"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/cart/update-quantity": {
            "post": {
                "tags": [
                    "Cart"
                ],
                "summary": "Update product quantity in the cart",
                "description": "Increases or decreases the quantity of a product in the user's cart.",
                "operationId": "aaf5f183989e009b8aa010ee3c2d45a8",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "product_id",
                                    "action"
                                ],
                                "properties": {
                                    "product_id": {
                                        "description": "ID of the product to update",
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "action": {
                                        "description": "Action to increase or decrease quantity",
                                        "type": "string",
                                        "enum": [
                                            "increase",
                                            "decrease"
                                        ],
                                        "example": "increase"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Cart quantity updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Product quantity increased"
                                        },
                                        "data": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 5
                                                },
                                                "user_id": {
                                                    "type": "integer",
                                                    "example": 10
                                                },
                                                "product_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "quantity": {
                                                    "type": "integer",
                                                    "example": 2
                                                },
                                                "created_at": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2025-02-11 10:00:00"
                                                },
                                                "updated_at": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2025-02-11 10:05:00"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Validation or stock error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Product out of stock"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Product not found in cart",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Product not found in cart"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/orders/place": {
            "post": {
                "tags": [
                    "Orders"
                ],
                "summary": "Place an order",
                "description": "This API allows users to place an order and process payment via Stripe.",
                "operationId": "df392ba389fe86fe0935a49050a65693",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "cart_items",
                                    "payment_method_id",
                                    "shipping_address"
                                ],
                                "properties": {
                                    "cart_items": {
                                        "description": "List of cart items",
                                        "type": "array",
                                        "items": {
                                            "required": [
                                                "product_id",
                                                "quantity"
                                            ],
                                            "properties": {
                                                "product_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "quantity": {
                                                    "type": "integer",
                                                    "example": 2
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "payment_method_id": {
                                        "description": "Stripe payment method ID",
                                        "type": "string",
                                        "example": "pm_1JbYF2Axyz123"
                                    },
                                    "shipping_address": {
                                        "required": [
                                            "address",
                                            "city",
                                            "zip_code",
                                            "country"
                                        ],
                                        "properties": {
                                            "address": {
                                                "type": "string",
                                                "example": "123 Street Name"
                                            },
                                            "city": {
                                                "type": "string",
                                                "example": "New York"
                                            },
                                            "zip_code": {
                                                "type": "string",
                                                "example": "10001"
                                            },
                                            "country": {
                                                "type": "string",
                                                "example": "USA"
                                            }
                                        },
                                        "type": "object"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Order placed successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Order placed successfully"
                                        },
                                        "order_id": {
                                            "type": "integer",
                                            "example": 123
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Invalid payment method ID."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Something went wrong."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/orders/history": {
            "get": {
                "tags": [
                    "Orders"
                ],
                "summary": "Get user order history",
                "description": "Retrieve a list of past orders for the authenticated user.",
                "operationId": "f6201fd1919593116ed7747ae4298ee9",
                "responses": {
                    "200": {
                        "description": "Order history retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "properties": {
                                            "order_id": {
                                                "type": "integer",
                                                "example": 101
                                            },
                                            "total_amount": {
                                                "type": "number",
                                                "format": "float",
                                                "example": 150.5
                                            },
                                            "payment_status": {
                                                "type": "string",
                                                "example": "paid"
                                            },
                                            "created_at": {
                                                "type": "string",
                                                "format": "date-time",
                                                "example": "2025-02-10 14:30:00"
                                            },
                                            "order_items": {
                                                "type": "array",
                                                "items": {
                                                    "properties": {
                                                        "product_id": {
                                                            "type": "integer",
                                                            "example": 1
                                                        },
                                                        "product_name": {
                                                            "type": "string",
                                                            "example": "Laptop"
                                                        },
                                                        "quantity": {
                                                            "type": "integer",
                                                            "example": 2
                                                        },
                                                        "price": {
                                                            "type": "number",
                                                            "format": "float",
                                                            "example": 749.990000000000009094947017729282379150390625
                                                        },
                                                        "product_image": {
                                                            "type": "string",
                                                            "example": "https://example.com/product1.jpg"
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            }
                                        },
                                        "type": "object"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized access",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthorized"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Something went wrong."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/categories": {
            "get": {
                "tags": [
                    "Categories"
                ],
                "summary": "Retrieve all categories",
                "description": "Fetches a list of all product categories along with the count of products in each category.",
                "operationId": "2da9cbf404369caacacd256976c8ec86",
                "responses": {
                    "200": {
                        "description": "Categories retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "categories": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "category_name": {
                                                        "type": "string",
                                                        "example": "Electronics"
                                                    },
                                                    "slug": {
                                                        "type": "string",
                                                        "example": "electronics"
                                                    },
                                                    "description": {
                                                        "type": "string",
                                                        "example": "All kinds of electronic gadgets."
                                                    },
                                                    "status": {
                                                        "type": "string",
                                                        "example": "active"
                                                    },
                                                    "created_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "example": "2025-02-13 12:00:00"
                                                    },
                                                    "updated_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "example": "2025-02-13 12:30:00"
                                                    },
                                                    "ordering": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "product_count": {
                                                        "type": "integer",
                                                        "example": 20
                                                    },
                                                    "category_image": {
                                                        "type": "string",
                                                        "example": "https://example.com/category-image.jpg"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Something went wrong."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/products": {
            "get": {
                "tags": [
                    "Products"
                ],
                "summary": "Get a list of products",
                "operationId": "39c74c9badb6c7c74d2612d1c7eeb685",
                "responses": {
                    "200": {
                        "description": "List of products",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "properties": {
                                            "id": {
                                                "type": "integer",
                                                "example": 1
                                            },
                                            "name": {
                                                "type": "string",
                                                "example": "Product Name"
                                            },
                                            "description": {
                                                "type": "string",
                                                "example": "Product Description"
                                            },
                                            "price": {
                                                "type": "number",
                                                "format": "float",
                                                "example": 99.9899999999999948840923025272786617279052734375
                                            },
                                            "image": {
                                                "type": "string",
                                                "example": "https://example.com/image.jpg"
                                            }
                                        },
                                        "type": "object"
                                    }
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/products/product-detail/{id}": {
            "get": {
                "tags": [
                    "Products"
                ],
                "summary": "Get product details by ID",
                "operationId": "00660e5eecc5252d90d4dec37afa9164",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Product ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Product details",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "id": {
                                            "type": "integer",
                                            "example": 1
                                        },
                                        "product_name": {
                                            "type": "string",
                                            "example": "Laptop"
                                        },
                                        "slug": {
                                            "type": "string",
                                            "example": "laptop"
                                        },
                                        "description": {
                                            "type": "string",
                                            "example": "High-performance laptop"
                                        },
                                        "product_price": {
                                            "type": "number",
                                            "format": "float",
                                            "example": 1299.990000000000009094947017729282379150390625
                                        },
                                        "sku": {
                                            "type": "string",
                                            "example": "LAP123"
                                        },
                                        "stock": {
                                            "type": "integer",
                                            "example": 10
                                        },
                                        "discount": {
                                            "type": "number",
                                            "format": "float",
                                            "example": 10
                                        },
                                        "product_status": {
                                            "type": "string",
                                            "example": "active"
                                        },
                                        "product_image": {
                                            "type": "string",
                                            "example": "https://example.com/image.jpg"
                                        },
                                        "gallery_images": {
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "example": "https://example.com/gallery1.jpg"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/products/search": {
            "get": {
                "tags": [
                    "Products"
                ],
                "summary": "Search products by name",
                "description": "Search for products based on a query string.",
                "operationId": "d8ce58ab8925e89950e0543c1ee752ac",
                "parameters": [
                    {
                        "name": "query",
                        "in": "query",
                        "description": "Search query string (product name or keyword)",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of matching products",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "product_name": {
                                                        "type": "string",
                                                        "example": "Laptop"
                                                    },
                                                    "slug": {
                                                        "type": "string",
                                                        "example": "laptop"
                                                    },
                                                    "description": {
                                                        "type": "string",
                                                        "example": "High-performance laptop"
                                                    },
                                                    "product_price": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": 1299.990000000000009094947017729282379150390625
                                                    },
                                                    "sku": {
                                                        "type": "string",
                                                        "example": "LAP123"
                                                    },
                                                    "stock": {
                                                        "type": "integer",
                                                        "example": 10
                                                    },
                                                    "discount": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": 10
                                                    },
                                                    "product_status": {
                                                        "type": "string",
                                                        "example": "active"
                                                    },
                                                    "main_image": {
                                                        "type": "string",
                                                        "example": "https://example.com/image.jpg"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Search query is required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Search query is required."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Something went wrong"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/products/reviews": {
            "post": {
                "tags": [
                    "Products"
                ],
                "summary": "Submit a product review",
                "description": "Allows users to submit reviews for products.",
                "operationId": "08fc45544b425923ced28cbc2e04b7d8",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "product_id",
                                    "rating"
                                ],
                                "properties": {
                                    "product_id": {
                                        "description": "ID of the product being reviewed",
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "rating": {
                                        "description": "Product rating from 1 to 5",
                                        "type": "integer",
                                        "maximum": 5,
                                        "minimum": 1,
                                        "example": 5
                                    },
                                    "comment": {
                                        "description": "Optional review comment",
                                        "type": "string",
                                        "example": "Great product!"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Review added successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Review added successfully"
                                        },
                                        "data": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "product_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "user_id": {
                                                    "type": "integer",
                                                    "example": 3
                                                },
                                                "rating": {
                                                    "type": "integer",
                                                    "example": 5
                                                },
                                                "comment": {
                                                    "type": "string",
                                                    "example": "Great product!"
                                                },
                                                "created_at": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2025-02-11T10:00:00Z"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "The product_id field is required."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Something went wrong."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/auth/register": {
            "post": {
                "tags": [
                    "Authentication"
                ],
                "summary": "Register a new user",
                "operationId": "a5e99257a0d904a2e1aedcc3e0621065",
                "requestBody": {
                    "description": "User registration",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "name",
                                    "email",
                                    "password",
                                    "password_confirmation"
                                ],
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "example": "John Doe"
                                    },
                                    "email": {
                                        "type": "string",
                                        "format": "email",
                                        "example": "john@example.com"
                                    },
                                    "password": {
                                        "type": "string",
                                        "format": "password",
                                        "example": "password123"
                                    },
                                    "password_confirmation": {
                                        "type": "string",
                                        "format": "password",
                                        "example": "password123"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "User registered successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "User registered successfully"
                                        },
                                        "access_token": {
                                            "type": "string",
                                            "example": "token123"
                                        },
                                        "token_type": {
                                            "type": "string",
                                            "example": "Bearer"
                                        },
                                        "user": {
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/auth/login": {
            "post": {
                "tags": [
                    "Authentication"
                ],
                "summary": "User Login",
                "description": "Authenticate a user and return an access token",
                "operationId": "cd16214b6282a5fcaf30cc623048e161",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "email",
                                    "password"
                                ],
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "format": "email",
                                        "example": "john@example.com"
                                    },
                                    "password": {
                                        "type": "string",
                                        "format": "password",
                                        "example": "password123"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successfully logged in",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Successfully login!"
                                        },
                                        "data": {
                                            "properties": {
                                                "detail": {
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer",
                                                            "example": 1
                                                        },
                                                        "name": {
                                                            "type": "string",
                                                            "example": "John Doe"
                                                        },
                                                        "email": {
                                                            "type": "string",
                                                            "example": "john@example.com"
                                                        }
                                                    },
                                                    "type": "object"
                                                },
                                                "token": {
                                                    "type": "string",
                                                    "example": "abcdefg123456"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "The provided credentials are incorrect."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/auth/forgot-password": {
            "post": {
                "tags": [
                    "Authentication"
                ],
                "summary": "Forgot Password",
                "description": "Sends a password reset link to the user's email.",
                "operationId": "9db4145c3e82aefa936e5b59ccc77d18",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "email"
                                ],
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "format": "email",
                                        "example": "user@example.com"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Reset link sent successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Reset link sent to your email"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "The email field is required."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Email not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Email does not exist."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Something went wrong."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/auth/reset-password": {
            "post": {
                "tags": [
                    "Authentication"
                ],
                "summary": "Reset Password",
                "description": "Resets the user's password using a token received via email.",
                "operationId": "f52eff4d169708d9122dd3b94644d3cc",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "token",
                                    "email",
                                    "password",
                                    "password_confirmation"
                                ],
                                "properties": {
                                    "token": {
                                        "type": "string",
                                        "example": "123456abcdef"
                                    },
                                    "email": {
                                        "type": "string",
                                        "format": "email",
                                        "example": "user@example.com"
                                    },
                                    "password": {
                                        "type": "string",
                                        "format": "password",
                                        "example": "newpassword123"
                                    },
                                    "password_confirmation": {
                                        "type": "string",
                                        "format": "password",
                                        "example": "newpassword123"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Password reset successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Password reset successfully"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid token or validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Invalid token or validation failed"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Email not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Email does not exist."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Something went wrong."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/user/profile": {
            "get": {
                "tags": [
                    "User"
                ],
                "summary": "Get authenticated user profile",
                "description": "Retrieve the profile details of the logged-in user.",
                "operationId": "83ac8c0807d403260446255d96b51f17",
                "responses": {
                    "200": {
                        "description": "User profile retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "id": {
                                            "type": "integer",
                                            "example": 1
                                        },
                                        "name": {
                                            "type": "string",
                                            "example": "John Doe"
                                        },
                                        "email": {
                                            "type": "string",
                                            "format": "email",
                                            "example": "john@example.com"
                                        },
                                        "phone": {
                                            "type": "string",
                                            "example": "+1234567890"
                                        },
                                        "address": {
                                            "type": "string",
                                            "example": "123 Main Street, City, Country"
                                        },
                                        "profile_image": {
                                            "type": "string",
                                            "example": "https://example.com/profile.jpg"
                                        },
                                        "created_at": {
                                            "type": "string",
                                            "format": "date-time",
                                            "example": "2025-02-10 14:30:00"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized access",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthorized"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Something went wrong."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/wishlist/add": {
            "post": {
                "tags": [
                    "Wishlist"
                ],
                "summary": "Add a product to the wishlist",
                "description": "Allows users to add a product to their wishlist.",
                "operationId": "787bc1350f712e18e057c908dd20cc81",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "product_id"
                                ],
                                "properties": {
                                    "product_id": {
                                        "description": "ID of the product to add to the wishlist",
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "wishlist_status": {
                                        "description": "Wishlist status (optional)",
                                        "type": "string",
                                        "example": "active"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Product added to wishlist successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Product added to wishlist"
                                        },
                                        "wishlist": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 5
                                                },
                                                "user_id": {
                                                    "type": "integer",
                                                    "example": 3
                                                },
                                                "product_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "wishlist_status": {
                                                    "type": "string",
                                                    "example": "active"
                                                },
                                                "created_at": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2025-02-11T10:00:00Z"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "The product_id field is required."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Something went wrong."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/wishlist/remove/{id}": {
            "delete": {
                "tags": [
                    "Wishlist"
                ],
                "summary": "Remove a product from the wishlist",
                "description": "Allows users to remove a product from their wishlist.",
                "operationId": "fb014292c2569865a14d6fcb2d2b1fb0",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "ID of the wishlist item to remove",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 5
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Product removed from wishlist successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Product removed from wishlist"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Product not found in wishlist",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Product not found in wishlist"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Something went wrong."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/wishlist": {
            "get": {
                "tags": [
                    "Wishlist"
                ],
                "summary": "Get user's wishlist",
                "description": "Retrieves all products in the authenticated user's wishlist.",
                "operationId": "e34da8c4380a4c747655a5045e06db87",
                "responses": {
                    "200": {
                        "description": "Wishlist retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "wishlist": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 5
                                                    },
                                                    "user_id": {
                                                        "type": "integer",
                                                        "example": 3
                                                    },
                                                    "product_id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "wishlist_status": {
                                                        "type": "string",
                                                        "example": "active"
                                                    },
                                                    "created_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "example": "2025-02-11T10:00:00Z"
                                                    },
                                                    "product": {
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer",
                                                                "example": 1
                                                            },
                                                            "name": {
                                                                "type": "string",
                                                                "example": "Smartphone"
                                                            },
                                                            "price": {
                                                                "type": "number",
                                                                "format": "float",
                                                                "example": 499.990000000000009094947017729282379150390625
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No products found in wishlist",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Product not found in wishlist"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Something went wrong."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        }
    },
    "components": {
        "securitySchemes": {
            "BearerAuth": {
                "type": "http",
                "description": "Enter JWT Bearer token **_only_**",
                "name": "Authorization",
                "in": "header",
                "bearerFormat": "JWT",
                "scheme": "bearer"
            }
        }
    },
    "tags": [
        {
            "name": "Authentication"
        },
        {
            "name": "Cart",
            "description": "Cart"
        },
        {
            "name": "Orders",
            "description": "Orders"
        },
        {
            "name": "Categories",
            "description": "Categories"
        },
        {
            "name": "Products",
            "description": "Products"
        },
        {
            "name": "User",
            "description": "User"
        },
        {
            "name": "Wishlist",
            "description": "Wishlist"
        }
    ]
}