Skip to content

Feature/modified api requests responses #280

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 31 additions & 25 deletions public/vaahstore-api/carts/addToWishlist.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
post:
tags:
- Carts
summary: Add an item to the wishlist
description: Adds a specified product from the cart to the user's wishlist. If the item is already wishlisted, it will not be added again.
- Products
summary: Add or Delete item from the wishlist
description: Adds or removes a specified product to/from a user's wishlist. By default, the product is saved to the "Save For Later" wishlist. If the product is already in the wishlist, it will not be added again. If the operation is "delete", the specified product will be removed from the wishlist.
operationId: addToWishlist
requestBody:
required: true
Expand All @@ -14,13 +15,9 @@ post:
item_detail:
type: object
description: |
Contains details about the product in the cart that will be added to or removed from the wishlist.
Includes information such as the cart ID, product ID, product variation ID, quantity, vendor ID, and wishlist status.
Contains details about the product in the cart that will be added to or delete from the wishlist.
Includes information such as the product ID, product variation ID, vendor ID, and wishlist ID.
properties:
vh_st_cart_id:
type: integer
example: 3
description: The ID of the cart containing the product.
vh_st_product_id:
type: integer
example: 1
Expand All @@ -29,44 +26,50 @@ post:
type: integer
example: 2
description: The ID of the product variation.
quantity:
type: integer
example: 1
description: The quantity of the product.
vh_st_vendor_id:
type: integer
example: 1
description: The ID of the vendor for the product.
is_wishlisted:
type: integer
example: 0
description: Indicates if the product is already in the wishlist.Set to 1 for adding the product to the wishlist, and 0 if you want to remove the product from the wishlist.
vh_st_wishlist_id:
type: integer
example: 1
description: The ID of the wishlist of a user to add the product to.

required:
- vh_st_cart_id
- vh_st_product_id
- vh_st_product_variation_id
- quantity

- vh_st_vendor_id
- is_wishlisted

selected_store_id:
type: integer
example: 51
description: The ID of the selected store to which the product belongs.

type:
type: string
example: add/delete
description: The type of action to perform (e.g., "add" to add the item to the wishlist, "delete" to remove it).

user_detail:
type: object
properties:
id:
type: integer
example: 121
description: The ID of the user.
username:
type: string
example: "58a55727-2084-448c-89bd-c3146f8d52f8"
description: The username of the user, it is for the purpose making new wishlist also.


required:
- id
- username


required:
- item_detail
- user_detail
- selected_store_id
- type

responses:
'200':
Expand All @@ -88,8 +91,11 @@ post:
data:
type: object
properties:
cart:
'$ref': '../vaahstore.yaml#/components/schemas/Cart'
is_wishlisted:
type: integer
example: true
description: Indicates whether the product is in the wishlist .

'400':
description: Invalid request
content:
Expand Down
26 changes: 9 additions & 17 deletions public/vaahstore-api/customers/update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ get:
put:
tags:
- Customers
summary: Update an existing record
description: Update a customer record with the specified ID using the provided details.
summary: Update an customer account profile
description: Update the details of a customer account by providing the customer ID and the updated information.
operationId: updateBrand
parameters:
- '$ref': '../vaahstore.yaml#/components/parameters/id'
Expand All @@ -72,22 +72,14 @@ put:
username:
type: string
description: "User username"
password:
last_name:
type: string
description: "The user's password."
status:
type: string
description: "The user's status."
is_active:
type: integer
description: "Indicates whether the user is active or not."
required:
- email
- first_name
- status
- is_active
- password
- username
description: "The user's last name."
phone:
type: number
description: "The user's phone number."


responses:
'200':
description: Saved Successfully
Expand Down
1 change: 1 addition & 0 deletions public/vaahstore-api/products/products.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ get:
parameters:
- '$ref': '../vaahstore.yaml#/components/parameters/page'
- '$ref': '../vaahstore.yaml#/components/parameters/rows'
- '$ref': '../vaahstore.yaml#/components/parameters/selected_store'
- '$ref': '../vaahstore.yaml#/components/parameters/ids_query'
- '$ref': '../vaahstore.yaml#/components/parameters/exclude'
- '$ref': '../vaahstore.yaml#/components/parameters/include'
Expand Down
Loading