From b74db9ed774f818e0abed89371bf612a2e85d3e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Muth?= Date: Sat, 2 Nov 2024 18:16:26 +0000 Subject: [PATCH] docs(documentation): add users and prices doc --- .../.gitbook/assets/openapi (1).yaml | 118 ------ .../.gitbook/assets/openapi (2).yaml | 158 ------- .../.gitbook/assets/openapi (3).yaml | 158 ------- .../.gitbook/assets/openapi (4).yaml | 167 -------- .../.gitbook/assets/openapi (5).yaml | 183 -------- .../.gitbook/assets/openapi (6).yaml | 181 -------- documentation/.gitbook/assets/openapi.yaml | 393 +++++++++++++++--- documentation/SUMMARY.md | 6 + documentation/v1/prices/create-a-price.md | 5 +- documentation/v1/users/README.md | 2 + documentation/v1/users/account/README.md | 2 + .../v1/users/account/delete-an-account.md | 5 + documentation/v1/users/profile/README.md | 2 + .../users/profile/update-a-profile-avatar.md | 5 + .../v1/users/profile/update-a-profile.md | 6 + 15 files changed, 367 insertions(+), 1024 deletions(-) delete mode 100644 documentation/.gitbook/assets/openapi (1).yaml delete mode 100644 documentation/.gitbook/assets/openapi (2).yaml delete mode 100644 documentation/.gitbook/assets/openapi (3).yaml delete mode 100644 documentation/.gitbook/assets/openapi (4).yaml delete mode 100644 documentation/.gitbook/assets/openapi (5).yaml delete mode 100644 documentation/.gitbook/assets/openapi (6).yaml create mode 100644 documentation/v1/users/README.md create mode 100644 documentation/v1/users/account/README.md create mode 100644 documentation/v1/users/account/delete-an-account.md create mode 100644 documentation/v1/users/profile/README.md create mode 100644 documentation/v1/users/profile/update-a-profile-avatar.md create mode 100644 documentation/v1/users/profile/update-a-profile.md diff --git a/documentation/.gitbook/assets/openapi (1).yaml b/documentation/.gitbook/assets/openapi (1).yaml deleted file mode 100644 index 1bdb58a..0000000 --- a/documentation/.gitbook/assets/openapi (1).yaml +++ /dev/null @@ -1,118 +0,0 @@ -openapi: 3.1.0 -info: - title: Price Comparator API - description: An API for comparing prices of foods, cosmetics and more. - version: 1.0.0 -servers: - - url: https://pcomparator.vercel.app/api - description: The production server. -paths: - /prices: - post: - operationId: createPrice - summary: Create a new price - description: Creates a new price in the database. - requestBody: - description: The price to create. - content: - application/json: - schema: - $ref: "#/components/schemas/components" - responses: - "201": - description: The burger was created successfully. - content: - application/json: - schema: - type: object - properties: - id: - type: string - format: uuid - barcode: - type: string - minLength: 1 - name: - type: string - minLength: 1 - description: - type: - - string - - "null" - minLength: 1 - categoryId: - type: - - string - - "null" - format: uuid - brandId: - type: - - string - - "null" - format: uuid - nutritionScore: - type: "null" - createdAt: - type: string - updatedAt: - type: string - required: - - id - - barcode - - name - - createdAt - - updatedAt -components: - schemas: - components: - type: object - properties: - barcode: - type: string - example: "2929292929292" - storeName: - type: string - example: Auchan - productName: - type: string - example: Nutella - categoryName: - type: string - example: Pate a tartiner - brandName: - type: string - example: Ferrero - location: - type: string - example: 4 rue du dome, 67000, Strasbourg - amount: - type: number - exclusiveMinimum: 0 - example: 9.99 - proof: - type: string - example: https://pcomparator/files - currency: - type: string - enum: - - EUR - - USD - - GBP - - CHF - - AUD - - CAD - - CNY - - JPY - - AED - example: EUR - required: - - barcode - - storeName - - productName - - categoryName - - brandName - - location - - amount - - proof - - currency - diff --git a/documentation/.gitbook/assets/openapi (2).yaml b/documentation/.gitbook/assets/openapi (2).yaml deleted file mode 100644 index 69e682a..0000000 --- a/documentation/.gitbook/assets/openapi (2).yaml +++ /dev/null @@ -1,158 +0,0 @@ -openapi: 3.1.0 -info: - title: Price Comparator API - description: An API for comparing prices of foods, cosmetics and more. - version: 1.0.0 -servers: - - url: https://pcomparator.vercel.app/api - description: The production server. -paths: - /prices: - post: - operationId: createPrice - summary: Create a new price - description: Creates a new price in the database. - requestBody: - description: The price to create. - content: - application/json: - schema: - type: object - properties: - barcode: - type: string - example: "8690804407383" - storeName: - type: string - example: Auchan - productName: - type: string - example: Nutella - categoryName: - type: string - example: Pate a tartiner - brandName: - type: string - example: Ferrero - location: - type: string - example: 4 rue du dome, 67000, Strasbourg - amount: - type: number - exclusiveMinimum: 0 - example: 9.99 - proof: - type: string - example: https://pcomparator/files - currency: - type: string - enum: - - EUR - - USD - - GBP - - CHF - - AUD - - CAD - - CNY - - JPY - - AED - example: EUR - required: - - barcode - - storeName - - productName - - categoryName - - brandName - - location - - amount - - proof - - currency - responses: - "201": - description: The burger was created successfully. - content: - application/json: - schema: - type: object - properties: - id: - type: string - format: uuid - barcode: - type: string - minLength: 1 - name: - type: string - minLength: 1 - description: - type: - - string - - "null" - minLength: 1 - categoryId: - type: - - string - - "null" - format: uuid - brandId: - type: - - string - - "null" - format: uuid - nutritionScore: - type: "null" - createdAt: - type: string - updatedAt: - type: string - required: - - id - - barcode - - name - - createdAt - - updatedAt -components: - schemas: - components: - type: object - properties: - barcode: - type: string - storeName: - type: string - productName: - type: string - categoryName: - type: string - brandName: - type: string - location: - type: string - amount: - type: number - exclusiveMinimum: 0 - proof: - type: string - currency: - type: string - enum: - - EUR - - USD - - GBP - - CHF - - AUD - - CAD - - CNY - - JPY - - AED - required: - - barcode - - storeName - - productName - - categoryName - - brandName - - location - - amount - - proof - - currency - diff --git a/documentation/.gitbook/assets/openapi (3).yaml b/documentation/.gitbook/assets/openapi (3).yaml deleted file mode 100644 index 69e682a..0000000 --- a/documentation/.gitbook/assets/openapi (3).yaml +++ /dev/null @@ -1,158 +0,0 @@ -openapi: 3.1.0 -info: - title: Price Comparator API - description: An API for comparing prices of foods, cosmetics and more. - version: 1.0.0 -servers: - - url: https://pcomparator.vercel.app/api - description: The production server. -paths: - /prices: - post: - operationId: createPrice - summary: Create a new price - description: Creates a new price in the database. - requestBody: - description: The price to create. - content: - application/json: - schema: - type: object - properties: - barcode: - type: string - example: "8690804407383" - storeName: - type: string - example: Auchan - productName: - type: string - example: Nutella - categoryName: - type: string - example: Pate a tartiner - brandName: - type: string - example: Ferrero - location: - type: string - example: 4 rue du dome, 67000, Strasbourg - amount: - type: number - exclusiveMinimum: 0 - example: 9.99 - proof: - type: string - example: https://pcomparator/files - currency: - type: string - enum: - - EUR - - USD - - GBP - - CHF - - AUD - - CAD - - CNY - - JPY - - AED - example: EUR - required: - - barcode - - storeName - - productName - - categoryName - - brandName - - location - - amount - - proof - - currency - responses: - "201": - description: The burger was created successfully. - content: - application/json: - schema: - type: object - properties: - id: - type: string - format: uuid - barcode: - type: string - minLength: 1 - name: - type: string - minLength: 1 - description: - type: - - string - - "null" - minLength: 1 - categoryId: - type: - - string - - "null" - format: uuid - brandId: - type: - - string - - "null" - format: uuid - nutritionScore: - type: "null" - createdAt: - type: string - updatedAt: - type: string - required: - - id - - barcode - - name - - createdAt - - updatedAt -components: - schemas: - components: - type: object - properties: - barcode: - type: string - storeName: - type: string - productName: - type: string - categoryName: - type: string - brandName: - type: string - location: - type: string - amount: - type: number - exclusiveMinimum: 0 - proof: - type: string - currency: - type: string - enum: - - EUR - - USD - - GBP - - CHF - - AUD - - CAD - - CNY - - JPY - - AED - required: - - barcode - - storeName - - productName - - categoryName - - brandName - - location - - amount - - proof - - currency - diff --git a/documentation/.gitbook/assets/openapi (4).yaml b/documentation/.gitbook/assets/openapi (4).yaml deleted file mode 100644 index 44e76c8..0000000 --- a/documentation/.gitbook/assets/openapi (4).yaml +++ /dev/null @@ -1,167 +0,0 @@ -openapi: 3.1.0 -info: - title: Price Comparator API - description: An API for comparing prices of foods, cosmetics and more. - version: 1.0.0 -servers: - - url: https://pcomparator.vercel.app/api - description: The production server. -paths: - /prices: - post: - operationId: createPrice - summary: Create a new price - description: Creates a new price in the database. - requestBody: - description: The price to create. - content: - application/json: - schema: - type: object - properties: - barcode: - type: string - example: "8690804407383" - storeName: - type: string - example: Auchan - productName: - type: string - example: Nutella - categoryName: - type: string - example: Pate a tartiner - brandName: - type: string - example: Ferrero - location: - type: string - example: 4 rue du dome, 67000, Strasbourg - amount: - type: number - exclusiveMinimum: 0 - example: 9.99 - proof: - type: string - example: https://pcomparator/files - currency: - type: string - enum: - - EUR - - USD - - GBP - - CHF - - AUD - - CAD - - CNY - - JPY - - AED - example: EUR - required: - - barcode - - storeName - - productName - - categoryName - - brandName - - location - - amount - - proof - - currency - responses: - "201": - description: The burger was created successfully. - content: - application/json: - schema: - type: object - properties: - id: - type: string - format: uuid - example: 010f21e3-c5b9-4d91-a5b1-b713d2324b17 - barcode: - type: string - minLength: 1 - example: "8690804407383" - name: - type: string - minLength: 1 - example: Nutella - description: - type: - - string - - "null" - minLength: 1 - example: Nutella is a sweet hazelnut and cocoa spread made by Ferrero. - categoryId: - type: - - string - - "null" - format: uuid - example: 77230970-93e1-46ed-9797-85fc96d7eb0b - brandId: - type: - - string - - "null" - format: uuid - example: d0ecb566-74ee-4409-aeb3-31f30985a6f4 - nutritionScore: - type: "null" - example: "" - createdAt: - type: string - example: 2024-11-01T17:53:12.921Z - updatedAt: - type: string - example: 2024-11-01T17:53:12.921Z - required: - - id - - barcode - - name - - createdAt - - updatedAt -components: - schemas: - components: - type: object - properties: - barcode: - type: string - storeName: - type: string - productName: - type: string - categoryName: - type: string - brandName: - type: string - location: - type: string - amount: - type: number - exclusiveMinimum: 0 - proof: - type: string - currency: - type: string - enum: - - EUR - - USD - - GBP - - CHF - - AUD - - CAD - - CNY - - JPY - - AED - required: - - barcode - - storeName - - productName - - categoryName - - brandName - - location - - amount - - proof - - currency - diff --git a/documentation/.gitbook/assets/openapi (5).yaml b/documentation/.gitbook/assets/openapi (5).yaml deleted file mode 100644 index fd1d68a..0000000 --- a/documentation/.gitbook/assets/openapi (5).yaml +++ /dev/null @@ -1,183 +0,0 @@ -openapi: 3.1.0 -info: - title: Price Comparator API - description: An API for comparing prices of foods, cosmetics and more. - version: 1.0.0 -servers: - - url: https://pcomparator.vercel.app/api - description: The production server. -paths: - /prices: - post: - operationId: createPrice - summary: Create a new price - description: Creates a new price in the database. - requestBody: - description: The price to create. - content: - application/json: - schema: - type: object - properties: - barcode: - type: string - example: "8690804407383" - description: Unique identifier for the product in barcode format - storeName: - type: string - example: Auchan - description: Name of the store where the product is sold - productName: - type: string - example: Nutella - description: Name of the product - categoryName: - type: string - example: Pate a tartiner - description: Category of the product - brandName: - type: string - example: Ferrero - description: Brand or manufacturer of the product - location: - type: string - example: 4 rue du dome, 67000, Strasbourg - description: Address of the store where the product was found - amount: - type: number - exclusiveMinimum: 0 - example: 9.99 - description: Price of the product - proof: - type: string - example: https://pcomparator/files - description: Link to an image or file providing proof of the price - currency: - type: string - enum: - - EUR - - USD - - GBP - - CHF - - AUD - - CAD - - CNY - - JPY - - AED - example: EUR - description: Currency used for the product price - required: - - barcode - - storeName - - productName - - categoryName - - brandName - - location - - amount - - proof - - currency - description: Creates a new price entry for a product, allowing users to add - price information for a product found in a specific store. The - route accepts details such as the product's barcode, name, - brand, category, store location, price, and a link to a proof - image. This enables the application to update its database with - current prices from various stores, helping users compare prices - effectively. - responses: - "201": - description: The burger was created successfully. - content: - application/json: - schema: - type: object - properties: - id: - type: string - format: uuid - example: 010f21e3-c5b9-4d91-a5b1-b713d2324b17 - barcode: - type: string - minLength: 1 - example: "8690804407383" - name: - type: string - minLength: 1 - example: Nutella - description: - type: - - string - - "null" - minLength: 1 - example: Nutella is a sweet hazelnut and cocoa spread made by Ferrero. - categoryId: - type: - - string - - "null" - format: uuid - example: 77230970-93e1-46ed-9797-85fc96d7eb0b - brandId: - type: - - string - - "null" - format: uuid - example: d0ecb566-74ee-4409-aeb3-31f30985a6f4 - nutritionScore: - type: "null" - example: "" - createdAt: - type: string - example: 2024-11-01T18:00:20.566Z - updatedAt: - type: string - example: 2024-11-01T18:00:20.566Z - required: - - id - - barcode - - name - - createdAt - - updatedAt -components: - schemas: - components: - type: object - properties: - barcode: - type: string - storeName: - type: string - productName: - type: string - categoryName: - type: string - brandName: - type: string - location: - type: string - amount: - type: number - exclusiveMinimum: 0 - proof: - type: string - currency: - type: string - enum: - - EUR - - USD - - GBP - - CHF - - AUD - - CAD - - CNY - - JPY - - AED - required: - - barcode - - storeName - - productName - - categoryName - - brandName - - location - - amount - - proof - - currency - diff --git a/documentation/.gitbook/assets/openapi (6).yaml b/documentation/.gitbook/assets/openapi (6).yaml deleted file mode 100644 index 728e49d..0000000 --- a/documentation/.gitbook/assets/openapi (6).yaml +++ /dev/null @@ -1,181 +0,0 @@ -openapi: 3.1.0 -info: - title: Price Comparator API - description: An API for comparing prices of foods, cosmetics and more. - version: 1.0.0 -servers: - - url: https://pcomparator.vercel.app/api - description: The production server. -paths: - /prices: - post: - operationId: createPrice - summary: Create a new price - description: Creates a new price entry for a product, allowing users to add - price information for a product found in a specific store. The route - accepts details such as the product's barcode, name, brand, category, - store location, price, and a link to a proof image. This enables the - application to update its database with current prices from various - stores, helping users compare prices effectively. - requestBody: - description: The price to create. - content: - application/json: - schema: - type: object - properties: - barcode: - type: string - example: "8690804407383" - description: Unique identifier for the product in barcode format - storeName: - type: string - example: Auchan - description: Name of the store where the product is sold - productName: - type: string - example: Nutella - description: Name of the product - categoryName: - type: string - example: Pate a tartiner - description: Category of the product - brandName: - type: string - example: Ferrero - description: Brand or manufacturer of the product - location: - type: string - example: 4 rue du dome, 67000, Strasbourg - description: Address of the store where the product was found - amount: - type: number - exclusiveMinimum: 0 - example: 9.99 - description: Price of the product - proof: - type: string - example: https://pcomparator/files - description: Link to an image or file providing proof of the price - currency: - type: string - enum: - - EUR - - USD - - GBP - - CHF - - AUD - - CAD - - CNY - - JPY - - AED - example: EUR - description: Currency used for the product price - required: - - barcode - - storeName - - productName - - categoryName - - brandName - - location - - amount - - proof - - currency - responses: - "201": - description: The burger was created successfully. - content: - application/json: - schema: - type: object - properties: - id: - type: string - format: uuid - example: 010f21e3-c5b9-4d91-a5b1-b713d2324b17 - barcode: - type: string - minLength: 1 - example: "8690804407383" - name: - type: string - minLength: 1 - example: Nutella - description: - type: - - string - - "null" - minLength: 1 - example: Nutella is a sweet hazelnut and cocoa spread made by Ferrero. - categoryId: - type: - - string - - "null" - format: uuid - example: 77230970-93e1-46ed-9797-85fc96d7eb0b - brandId: - type: - - string - - "null" - format: uuid - example: d0ecb566-74ee-4409-aeb3-31f30985a6f4 - nutritionScore: - type: "null" - example: "" - createdAt: - type: string - example: 2024-11-01T18:01:29.198Z - updatedAt: - type: string - example: 2024-11-01T18:01:29.198Z - required: - - id - - barcode - - name - - createdAt - - updatedAt -components: - schemas: - components: - type: object - properties: - barcode: - type: string - storeName: - type: string - productName: - type: string - categoryName: - type: string - brandName: - type: string - location: - type: string - amount: - type: number - exclusiveMinimum: 0 - proof: - type: string - currency: - type: string - enum: - - EUR - - USD - - GBP - - CHF - - AUD - - CAD - - CNY - - JPY - - AED - required: - - barcode - - storeName - - productName - - categoryName - - brandName - - location - - amount - - proof - - currency - diff --git a/documentation/.gitbook/assets/openapi.yaml b/documentation/.gitbook/assets/openapi.yaml index 82210ae..8389827 100644 --- a/documentation/.gitbook/assets/openapi.yaml +++ b/documentation/.gitbook/assets/openapi.yaml @@ -7,75 +7,356 @@ servers: - url: https://pcomparator.vercel.app/api description: The production server. paths: + /v1/user/{id}/account: + delete: + operationId: deleteAccount + summary: Delete user account. + description: This operation permanently deletes the account associated with the + specified user ID. This action is irreversible and removes all + information linked to this account. + requestBody: + description: No request body is required for this operation. + content: {} + responses: + "204": + description: The account was deleted successfully. + "400": + description: The request is malformed or contains invalid parameters. Please + check the data provided. + content: + application/json: + schema: &a1 + type: object + properties: + message: + type: string + example: The request is malformed or contains invalid parameters. Please check + the data provided. + name: + type: string + example: HTTPError + status: + type: integer + example: 400 + cause: + type: string + example: error cause + required: + - message + - name + - status + - cause + "404": + description: The requested resource could not be found. + content: + application/json: + schema: &a2 + type: object + properties: + error: + type: string + example: The requested resource could not be found. + required: + - error + "409": + description: A similar entry already exists. + content: + application/json: + schema: &a3 + type: object + properties: + error: + type: string + example: A similar entry already exists. + required: + - error + "500": + description: Internal server error. Something went wrong on the server side. + content: + application/json: + schema: &a4 + type: object + properties: + error: + type: string + example: Internal Server Error. + required: + - error /prices: post: operationId: createPrice summary: Create a new price - description: Creates a new price in the database. + description: Creates a new price entry for a product, allowing users to add + price information for a product found in a specific store. The route + accepts details such as the product's barcode, name, brand, category, + store location, price, and a link to a proof image. This enables the + application to update its database with current prices from various + stores, helping users compare prices effectively. requestBody: description: The price to create. content: application/json: schema: - $ref: "#/components/schemas/components" + type: object + properties: + barcode: + type: string + example: "8690804407383" + description: Unique identifier for the product in barcode format + storeName: + type: string + example: Auchan + description: Name of the store where the product is sold + productName: + type: string + example: Nutella + description: Name of the product + categoryName: + type: string + example: Pate a tartiner + description: Category of the product + brandName: + type: string + example: Ferrero + description: Brand or manufacturer of the product + location: + type: string + example: 4 rue du dome, 67000, Strasbourg + description: Address of the store where the product was found + amount: + type: number + exclusiveMinimum: 0 + example: 9.99 + description: Price of the product + proof: + type: string + example: https://pcomparator/files + description: Link to an image or file providing proof of the price + currency: + type: string + enum: + - EUR + - USD + - GBP + - CHF + - AUD + - CAD + - CNY + - JPY + - AED + example: EUR + description: Currency used for the product price + required: + - barcode + - storeName + - productName + - categoryName + - brandName + - location + - amount + - proof + - currency responses: "201": description: The burger was created successfully. content: application/json: schema: - $ref: "#/components/schemas/components" -components: - schemas: - components: - type: object - properties: - barcode: - type: string - example: "2929292929292" - storeName: - type: string - example: Auchan - productName: - type: string - example: Nutella - categoryName: - type: string - example: Pate a tartiner - brandName: - type: string - example: Ferrero - location: - type: string - example: 4 rue du dome, 67000, Strasbourg - amount: - type: number - exclusiveMinimum: 0 - example: 9.99 - proof: - type: string - example: https://pcomparator/files - currency: - type: string - enum: - - EUR - - USD - - GBP - - CHF - - AUD - - CAD - - CNY - - JPY - - AED - example: EUR - required: - - barcode - - storeName - - productName - - categoryName - - brandName - - location - - amount - - proof - - currency + type: object + properties: + id: + type: string + format: uuid + example: 010f21e3-c5b9-4d91-a5b1-b713d2324b17 + barcode: + type: string + minLength: 1 + example: "8690804407383" + name: + type: string + minLength: 1 + example: Nutella + description: + type: + - string + - "null" + minLength: 1 + example: Nutella is a sweet hazelnut and cocoa spread made by Ferrero. + categoryId: + type: + - string + - "null" + format: uuid + example: 77230970-93e1-46ed-9797-85fc96d7eb0b + brandId: + type: + - string + - "null" + format: uuid + example: d0ecb566-74ee-4409-aeb3-31f30985a6f4 + nutritionScore: + type: "null" + example: "" + createdAt: + type: string + example: 2024-11-02T18:10:02.833Z + updatedAt: + type: string + example: 2024-11-02T18:10:02.833Z + required: + - id + - barcode + - name + - createdAt + - updatedAt + "400": + description: The request is malformed or contains invalid parameters. Please + check the data provided. + content: + application/json: + schema: *a1 + "404": + description: The requested resource could not be found. + content: + application/json: + schema: *a2 + "409": + description: A similar entry already exists. + content: + application/json: + schema: *a3 + "500": + description: Internal server error. Something went wrong on the server side. + content: + application/json: + schema: *a4 + /v1/user/{id}/profile: + patch: + operationId: updateUserProfile + summary: Update User Profile + description: This operation updates the profile information of the user + identified by the specified user ID. Users can update their profile + details such as name, phone, and other relevant information. + requestBody: + description: The profile data to update. This should include the fields that + need to be modified. + content: + application/json: + schema: + type: object + properties: + phone: + type: string + default: "+33666666666" + example: "+33666666666" + description: Phone number of the user + name: + type: string + storeName: + type: string + default: Clément Muth + example: Clément Muth + description: Name of the user + example: + phone: "+33666666666" + name: Clément Muth + responses: + "200": + description: Profile updated successfully. + content: + application/json: + schema: + type: object + properties: + id: + type: string + format: uuid + example: 010f21e3-c5b9-4d91-a5b1-b713d2324b17 + name: + type: string + minLength: 1 + maxLength: 25 + example: Clément Muth + phone: + type: + - string + - "null" + example: "+33666666666" + image: + type: string + example: https://pcomparator/images + required: + - id + - name + - phone + - image + "400": + description: The request is malformed or contains invalid parameters. Please + check the data provided. + content: + application/json: + schema: *a1 + "404": + description: The requested resource could not be found. + content: + application/json: + schema: *a2 + "409": + description: A similar entry already exists. + content: + application/json: + schema: *a3 + "500": + description: Internal server error. Something went wrong on the server side. + content: + application/json: + schema: *a4 + /v1/user/{id}/profile/avatar: + patch: + operationId: " updateUserAvatar" + summary: Update User Avatar + description: This operation updates the avatar of the user identified by the + specified user ID. Users can upload a new avatar image file to update + their profile picture. + requestBody: + description: The avatar image to upload. This should be a file object + representing the new avatar. + content: + multipart/form-data: + schema: {} + responses: + "200": + description: Avatar updated successfully. + content: + application/json: + schema: + type: object + properties: + image: + type: string + format: uri + example: https://pcomparator.vercel.app/avatars/new-avatar.png + required: + - image + "400": + description: The request is malformed or contains invalid parameters. Please + check the data provided. + content: + application/json: + schema: *a1 + "404": + description: The requested resource could not be found. + content: + application/json: + schema: *a2 + "409": + description: A similar entry already exists. + content: + application/json: + schema: *a3 + "500": + description: Internal server error. Something went wrong on the server side. + content: + application/json: + schema: *a4 diff --git a/documentation/SUMMARY.md b/documentation/SUMMARY.md index 4a7d765..94e966c 100644 --- a/documentation/SUMMARY.md +++ b/documentation/SUMMARY.md @@ -6,3 +6,9 @@ * [Prices]() * [Create a price](v1/prices/create-a-price.md) +* [Users](v1/users/README.md) + * [Account](v1/users/account/README.md) + * [Delete an account](v1/users/account/delete-an-account.md) + * [Profile](v1/users/profile/README.md) + * [Update a profile avatar](v1/users/profile/update-a-profile-avatar.md) + * [Update a profile](v1/users/profile/update-a-profile.md) diff --git a/documentation/v1/prices/create-a-price.md b/documentation/v1/prices/create-a-price.md index 63a4ea2..231a1b7 100644 --- a/documentation/v1/prices/create-a-price.md +++ b/documentation/v1/prices/create-a-price.md @@ -1,6 +1,5 @@ # Create a price -{% swagger src="../../.gitbook/assets/openapi (6).yaml" path="/prices" method="post" %} -[openapi (6).yaml](<../../.gitbook/assets/openapi (6).yaml>) +{% swagger src="../../.gitbook/assets/openapi.yaml" path="/prices" method="post" %} +[openapi.yaml](../../.gitbook/assets/openapi.yaml) {% endswagger %} - diff --git a/documentation/v1/users/README.md b/documentation/v1/users/README.md new file mode 100644 index 0000000..c204f32 --- /dev/null +++ b/documentation/v1/users/README.md @@ -0,0 +1,2 @@ +# Users + diff --git a/documentation/v1/users/account/README.md b/documentation/v1/users/account/README.md new file mode 100644 index 0000000..9412fb6 --- /dev/null +++ b/documentation/v1/users/account/README.md @@ -0,0 +1,2 @@ +# Account + diff --git a/documentation/v1/users/account/delete-an-account.md b/documentation/v1/users/account/delete-an-account.md new file mode 100644 index 0000000..602fc46 --- /dev/null +++ b/documentation/v1/users/account/delete-an-account.md @@ -0,0 +1,5 @@ +# Delete an account + +{% swagger src="../../../.gitbook/assets/openapi.yaml" path="/v1/user/{id}/account" method="delete" %} +[openapi.yaml](../../../.gitbook/assets/openapi.yaml) +{% endswagger %} diff --git a/documentation/v1/users/profile/README.md b/documentation/v1/users/profile/README.md new file mode 100644 index 0000000..628365d --- /dev/null +++ b/documentation/v1/users/profile/README.md @@ -0,0 +1,2 @@ +# Profile + diff --git a/documentation/v1/users/profile/update-a-profile-avatar.md b/documentation/v1/users/profile/update-a-profile-avatar.md new file mode 100644 index 0000000..5df80f0 --- /dev/null +++ b/documentation/v1/users/profile/update-a-profile-avatar.md @@ -0,0 +1,5 @@ +# Update a profile avatar + +{% swagger src="../../../.gitbook/assets/openapi.yaml" path="/v1/user/{id}/profile/avatar" method="patch" %} +[openapi.yaml](../../../.gitbook/assets/openapi.yaml) +{% endswagger %} diff --git a/documentation/v1/users/profile/update-a-profile.md b/documentation/v1/users/profile/update-a-profile.md new file mode 100644 index 0000000..7c3356b --- /dev/null +++ b/documentation/v1/users/profile/update-a-profile.md @@ -0,0 +1,6 @@ +# Update a profile + +{% swagger src="../../../.gitbook/assets/openapi.yaml" path="/v1/user/{id}/profile" method="patch" %} +[openapi.yaml](../../../.gitbook/assets/openapi.yaml) +{% endswagger %} +