{ "openapi": "3.0.0", "info": { "version": "1.0.0", "title": "Airneis API", "description": "API documentation for AIRNEIS project. You can see all the different queries and their responses here." }, "servers": [ { "url": "http://localhost:3001/api", "description": "Development server" } ], "components": { "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT" } }, "schemas": { "Product": { "type": "object", "properties": { "id": { "type": "integer", "example": 1, "readOnly": true }, "name": { "type": "string", "required": true, "example": "bed" }, "description": { "type": "string", "required": true, "example": "a bed" }, "price": { "type": "number", "required": true, "example": 199.99 }, "imageUrl": { "type": "string", "required": true, "example": "https://res.cloudinary.com/thjesfesf/image/upload/v798767557/image.jpg" }, "quantity": { "type": "integer", "required": true, "example": 3 }, "categoryId": { "type": "integer", "required": true, "example": 2 }, "isDisplayed": { "type": "boolean", "example": true } } }, "Category": { "type": "object", "properties": { "id": { "type": "integer", "example": 1, "readOnly": true }, "name": { "type": "string", "required": true, "example": "Decoration" }, "description": { "type": "string", "example": "Decorative items" }, "isDisplayed": { "type": "boolean", "example": true } } }, "ImagesCarousel": { "type": "object", "properties": { "id": { "type": "integer", "example": 1, "readOnly": true }, "imageUrl": { "type": "string", "required": true, "example": "https://images.unsplash.com/photo-1582719478250-87fba0c45d1c?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=387&q=80" }, "imageAlt": { "type": "string", "required": true, "example": "a simple bed" }, "isDisplayed": { "type": "boolean", "example": true, "required": true } } }, "User": { "type": "object", "properties": { "id": { "type": "integer", "example": 1, "readOnly": true }, "username": { "type": "string", "required": true, "example": "hugo-martin" }, "email": { "type": "string", "format": "email", "required": true, "example": "hugo.martin@example.com" }, "fullName": { "type": "string", "example": "Hugo Martin" }, "phone": { "type": "string", "example": "+33612345678" }, "active": { "type": "boolean", "example": true }, "emailVerified": { "type": "boolean", "example": false }, "passwordHash": { "type": "string", "example": "gfeuijdeuhr..." }, "passwordSalt": { "type": "string", "example": "bhjoiogrctn..." }, "role": { "type": "string", "enum": ["customer", "admin"], "example": "customer" }, "createdAt": { "type": "string", "format": "date-time", "example": "2021-01-01T00:00:00Z", "readOnly": true }, "updatedAt": { "type": "string", "format": "date-time", "example": "2021-01-01T00:00:00Z", "readOnly": true } } }, "Message": { "type": "object", "properties": { "id": { "type": "integer", "example": 1, "readOnly": true }, "email": { "type": "string", "format": "email", "required": true, "example": "hugo.martin@example.com" }, "subject": { "type": "string", "required": true, "example": "Complaint for a product" }, "text": { "type": "string", "required": true, "example": "The product does not work" }, "createdAt": { "type": "string", "format": "date-time", "example": "2021-01-01T00:00:00Z", "readOnly": true }, "updatedAt": { "type": "string", "format": "date-time", "example": "2021-01-01T00:00:00Z", "readOnly": true } } }, "JWT": { "type": "object", "properties": { "token": { "type": "string", "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6Imh1Z28tbWFydGluIiwiaWF0IjoxNjEwNjIwNjQ5LCJleHAiOjE2MTA2MjQyNDl" } } }, "Cart": { "type": "object", "properties": { "id": { "type": "integer", "example": 1, "readOnly": true }, "userId": { "type": "integer", "example": 2, "readOnly": true } } }, "CartItem": { "type": "object", "properties": { "id": { "type": "integer", "example": 1, "readOnly": true }, "productId": { "type": "integer", "example": 2, "readOnly": true }, "quantity": { "type": "integer", "example": 2, "readOnly": true }, "cartId": { "type": "integer", "example": 1, "readOnly": true } }, "required": ["productId", "quantity", "cartId"] }, "ErrorUnauthorized": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" } } }, "ErrorBadRequest": { "type": "object", "properties": { "message": { "type": "string", "example": "Bad request" } } }, "ErrorNotFound": { "type": "object", "properties": { "message": { "type": "string", "example": "Not found" } } }, "ErrorConflict": { "type": "object", "properties": { "message": { "type": "string", "example": "Conflict" } } } } }, "tags": [ { "name": "Products", "description": "Product management" }, { "name": "Categories", "description": "Category management" }, { "name": "Images Carousel", "description": "Images management in the carousel" }, { "name": "Authentification", "description": "Authentification management" }, { "name": "Messages", "description": "Message management" }, { "name": "Cart", "description": "Cart management" }, { "name": "Cart Item", "description": "Cart item management" } ], "paths": { "/products": { "get": { "tags": ["Products"], "description": "Get all products", "responses": { "200": { "description": "Products got", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Product" }, "example": [ { "id": 1, "name": "bed", "description": "a bed", "price": 199.99, "imageUrl": "https://res.cloudinary.com/thjesfesf/image/upload/v798767557/bed.jpg", "quantity": 3 }, { "id": 2, "name": "chair", "description": "a chair", "price": 99.99, "imageUrl": "https://res.cloudinary.com/thjesfesf/image/upload/v798767557/chair.jpg", "quantity": 5 }, { "id": 3, "name": "table", "description": "a table", "price": 199.99, "imageUrl": "https://res.cloudinary.com/thjesfesf/image/upload/v798767557/table.jpg", "quantity": 120 } ] } } } } } }, "post": { "tags": ["Products"], "description": "Create a new product", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Product" } } } }, "responses": { "201": { "description": "Product created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Product" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBadRequest" } } } } } } }, "/products/displayed": { "get": { "tags": ["Products"], "description": "Get all displayed products", "responses": { "200": { "description": "Products got", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Product" } } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBadRequest" } } } } } } }, "/products/category/{categoryId}": { "get": { "tags": ["Products"], "description": "Get displayed products by category id", "parameters": [ { "name": "categoryId", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Retrieved {count} displayed products", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Product" } } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBadRequest" } } } } } } }, "/product/{productId}/image" :{ "patch": { "tags": ["Products"], "description": "Patch a product image by id", "parameters": [ { "name": "productId", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "form-data": { "schema": { "type": "object", "properties": { "my_file": { "type": "string", "format": "binary", "description": "Image file to upload." } } } } } }, "responses": { "201": { "description": "Product image patched ", "content": { "application/json": { "schema": { "type": "object", "properties": { "imageUrl": { "$ref": "#/components/schemas/Product/properties/imageUrl" } } } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBadRequest" } } } } } } }, "/products/{productId}": { "get": { "tags": ["Products"], "description": "Get a product by id", "parameters": [ { "name": "productId", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Product got", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "integer", "readOnly": true, "example": 1 }, "name": { "type": "string", "example": "bed" }, "description": { "type": "string", "example": "a bed" }, "price": { "type": "number", "example": 199.99 }, "imageUrl": { "type": "string", "example": "https://res.cloudinary.com/thjesfesf/image/upload/v798767557/bed.jpg" }, "quantity": { "type": "integer", "example": 3 }, "category": { "$ref": "#/components/schemas/Category" } } } } } } } }, "patch": { "tags": ["Products"], "description": "Patch a product by id", "parameters": [ { "name": "productId", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "integer", "readOnly": true, "example": 1 }, "name": { "type": "string", "example": "bed" }, "description": { "type": "string", "example": "a bed" }, "price": { "type": "number", "example": 199.99 }, "quantity": { "type": "integer", "example": 3 }, "category": { "$ref": "#/components/schemas/Category" } } } } } }, "responses": { "201": { "description": "Product patched", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "integer", "readOnly": true, "example": 1 }, "name": { "type": "string", "example": "bed" }, "description": { "type": "string", "example": "a bed" }, "price": { "type": "number", "example": 199.99 }, "quantity": { "type": "integer", "example": 3 }, "category": { "$ref": "#/components/schemas/Category" } } } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBadRequest" } } } } } }, "delete": { "tags": ["Products"], "description": "Delete a product by id", "responses": { "204": { "description": "Product deleted successfully" }, "400": { "description": "Invalid ID supplied" }, "404": { "description": "Product not found" } } } }, "/categories": { "get": { "tags": ["Categories"], "description": "Get all categories", "responses": { "200": { "description": "Categories got", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Category" }, "example": [ { "id": 1, "name": "Decoration", "description": "Decorative items" }, { "id": 2, "name": "Kitchen", "description": "Kitchenware" } ] } } } } } }, "post": { "tags": ["Categories"], "description": "Create a new category", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Category" } } } }, "responses": { "201": { "description": "Category created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Category" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBadRequest" } } } } } } }, "/categories/displayed": { "get": { "tags": ["Categories"], "description": "Get all displayed categories", "responses": { "200": { "description": "Categories got", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Category" } } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBadRequest" } } } } } } }, "/categories/{categoryId}": { "get": { "tags": ["Categories"], "description": "Get a category by id", "parameters": [ { "name": "categoryId", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Category got", "content": { "application/json": { "schema": { "type": "object", "$ref": "#/components/schemas/Category" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorNotFound" } } } } } }, "patch": { "tags": ["Categories"], "description": "Patch a category by id", "parameters": [ { "name": "categoryId", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Category" } } } }, "responses": { "200": { "description": "Category patched", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Category" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBadRequest" } } } } } }, "delete": { "tags": ["Categories"], "description": "Delete a category by id", "responses": { "204": { "description": "Category deleted successfully" }, "400": { "description": "Invalid ID supplied" }, "404": { "description": "Category not found" } } } }, "/categories/name/{name}": { "get": { "tags": ["Categories"], "description": "Get a category by name", "parameters": [ { "name": "name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Category got", "content": { "application/json": { "schema": { "type": "object", "$ref": "#/components/schemas/Category" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorNotFound" } } } } } } }, "/imagesCarousel": { "get": { "tags": ["Images Carousel"], "description": "Get all images from the carousel", "responses": { "200": { "description": "Images got", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ImagesCarousel" } } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBadRequest" } } } } } }, "post": { "tags": ["Images Carousel"], "description": "Upload an image to the carousel", "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "my_file": { "type": "string", "format": "binary", "description": "The file to upload." }, "imageAlt": { "type": "string", "example": "a simple bed", "fromat": "string", "description": "The alt text of the image." } } } } } }, "responses": { "200": { "description": "Image uploaded", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImagesCarousel" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBadRequest" } } } } } } }, "/imagesCarousel/{imageId}": { "patch": { "tags": ["Images Carousel"], "description": "Choose to display or not the image in the carousel", "parameters": [ { "name": "imageId", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "isDisplayed": { "type": "boolean", "required": true } } } } } }, "responses": { "200": { "description": "Image updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImagesCarousel" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBadRequest" } } } } } } }, "/imagesCarousel/displayed": { "get": { "tags": ["Images Carousel"], "description": "Get all displayed images from the carousel", "responses": { "200": { "description": "Images got", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ImagesCarousel" } } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBadRequest" } } } } } } }, "/sign-up": { "post": { "tags": ["Authentification"], "description": "Create a new user", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "username": { "type": "string", "example": "hugo-martin" }, "email": { "type": "string", "format": "email", "example": "hugo.martin@example.com" }, "password": { "type": "string", "example": "Password#123" } }, "required": ["username", "email", "password"] } } } }, "responses": { "201": { "description": "Account created", "content": { "application/json": { "mesage": "Your account has been created successfully." } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBadRequest" } } } } } } }, "/email/{token}": { "get": { "tags": ["Authentification"], "summary": "Verify email address", "description": "Verify the user's email address using the token provided in the verification link.", "parameters": [ { "name": "token", "in": "path", "required": true, "description": "The email verification token.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Email verified successfully.", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Email verified successfully." } } } } } }, "400": { "description": "Invalid token or email already verified.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "example": "Invalid or expired token." } } } } } } } } }, "/sign-in": { "post": { "tags": ["Authentification"], "description": "Sign in", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "example": "hugo-martin@example.com" }, "password": { "type": "string", "example": "Password#123" } }, "required": ["email", "password"] } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JWT" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorUnauthorized" } } } } } } }, "/users/:email": { "get": { "tags": ["Authentification"], "description": "Checks if the email exists in the database, generates a password reset token and sends a password reset link to the user", "parameters": [ { "name": "email", "in": "path", "description": "User Email", "required": true, "schema": { "type": "string", "format": "email" } } ], "responses": { "200": { "description": "Password reset link has been sent", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Password reset link has been sent." } } } } } }, "400": { "description": "The email does not exist in the database", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "The email does not exist in the database." } } } } } } } } }, "/users/:token": { "patch": { "tags": ["Authentification"], "description": "Resets user password", "parameters": [ { "name": "token", "in": "path", "description": "Password reset token", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "password": { "type": "string", "example": "NewPassword#123" } }, "required": ["password"] } } } }, "responses": { "200": { "description": "Password has been reset", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Password has been reset." } } } } } }, "400": { "description": "Invalid token", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Invalid token." } } } } } } } } }, "sign-out": { "delete": { "tags": ["Authentification"], "description": "Sign out", "responses": { "204": { "description": "Signed out" } } } }, "/users/{id}": { "get": { "tags": ["Edit Profile"], "description": "Get user by id", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "User details retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "integer", "readOnly": true, "example": 1 }, "username": { "type": "string", "example": "hugo-martin" }, "email": { "type": "string", "format": "email", "example": "hugo.martin@example.com" }, "fullName": { "type": "string", "example": "Hugo Martin" }, "phone": { "type": "string", "example": "+33612345678" } } } } } }, "404": { "description": "User not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorNotFound" } } } } } }, "patch": { "tags": ["Edit Profile"], "description": "Update user by id", "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "integer", "readOnly": true, "example": 1 }, "username": { "type": "string", "example": "hugo-martin" }, "email": { "type": "string", "format": "email", "example": "hugo-martin@example.com" }, "fullName": { "type": "string", "example": "Hugo Martin" }, "phone": { "type": "string", "example": "+33612345678" } } } } } } } }, "/messages": { "get": { "tags": ["Messages"], "description": "Get all messages", "responses": { "200": { "description": "Messages got", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Message" }, "example": [ { "id": 1, "email": "test01@gmail.com", "subject": "subject01", "text": "text01", "createdAt": "2024-04-26T15:33:03.337Z", "updatedAt": "2024-04-26T15:33:03.337Z" }, { "id": 2, "email": "test02@gmail.com", "subject": "subject02", "text": "text02", "createdAt": "2024-04-26T15:33:03.337Z", "updatedAt": "2024-04-26T15:33:03.337Z" } ] } } } } } }, "post": { "tags": ["Messages"], "description": "Create a new message", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Message" } } } } } }, "/messages/{messageId}": { "get": { "tags": ["Messages"], "description": "Get a messages by id", "parameters": [ { "name": "messageId", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Message got", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "integer", "readOnly": true, "example": 1 }, "email": { "type": "string", "example": "test01@gmail.com" }, "subject": { "type": "string", "example": "subject01" }, "text": { "type": "string", "example": "text01" }, "createdAt": { "type": "string", "example": "2024-04-26T15:33:03.337Z" }, "updatedAt": { "type": "string", "example": "2024-04-26T15:33:03.337Z" } } } } } } } }, "delete": { "tags": ["Messages"], "description": "Delete a message by id", "responses": { "204": { "description": "Message deleted successfully" }, "400": { "description": "Invalid ID supplied" }, "404": { "description": "Message not found" } } } }, "/cart": { "get": { "tags": ["Cart"], "description": "Get all products in the cart", "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Products in the cart", "content": { "application/json": { "schema": { "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 1, "readOnly": true }, "productId": { "type": "integer", "example": 2 }, "quantity": { "type": "integer", "example": 3 } } } } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorBadRequest" } } } } } }, "post": { "tags": ["Cart"], "description": "Create a cart", "security": [ { "bearerAuth": [] } ], "responses": { "201": { "description": "Cart created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Cart" } } } }, "409": { "description": "Cart already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorConflict" } } } } } } }, "/cart/checkItem/{productId}": { "get": { "tags": ["Cart Item"], "description": "Check if an item is in the cart", "security": [ { "bearerAuth": [] } ], "parameters": [ { "name": "productId", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Item in the cart", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CartItem" } } } }, "404": { "description": "Item not in the cart" } } } }, "cart/addProduct": { "post": { "tags": ["Cart Item"], "description": "Add an item to the cart", "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { "productId": { "type": "integer", "example": 2, "required": true }, "quantity": { "type": "integer", "example": 2, "required": true } } } } } }, "responses": { "201": { "description": "Item added to the cart", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CartItem" } } } }, "409": { "description": "Item already in the cart" } } } }, "cart/addProduct/{productId}": { "patch": { "tags": ["Cart Item"], "description": "Add quantity to an existing item in the cart", "security": [ { "bearerAuth": [] } ], "parameters": [ { "name": "productId", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "201": { "description": "Item added to the cart", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CartItem" } } } }, "409": { "description": "Not enough product in the cart" } } } }, "cart/removeProduct/{productId}": { "delete": { "tags": ["Cart Item"], "description": "Remove an item from the cart", "security": [ { "bearerAuth": [] } ], "parameters": [ { "name": "productId", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Item removed from the cart" }, "404": { "description": "Item not in the cart" } } } } } }