Skip to content

Commit f5971cc

Browse files
authored
Merge pull request #280 from webreinvent/feature/modified-api-requests-responses
Feature/modified api requests responses
2 parents bdef060 + e14a076 commit f5971cc

File tree

9 files changed

+630
-692
lines changed

9 files changed

+630
-692
lines changed

public/vaahstore-api/carts/addToWishlist.yaml

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
post:
22
tags:
33
- Carts
4-
summary: Add an item to the wishlist
5-
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.
4+
- Products
5+
summary: Add or Delete item from the wishlist
6+
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.
67
operationId: addToWishlist
78
requestBody:
89
required: true
@@ -14,13 +15,9 @@ post:
1415
item_detail:
1516
type: object
1617
description: |
17-
Contains details about the product in the cart that will be added to or removed from the wishlist.
18-
Includes information such as the cart ID, product ID, product variation ID, quantity, vendor ID, and wishlist status.
18+
Contains details about the product in the cart that will be added to or delete from the wishlist.
19+
Includes information such as the product ID, product variation ID, vendor ID, and wishlist ID.
1920
properties:
20-
vh_st_cart_id:
21-
type: integer
22-
example: 3
23-
description: The ID of the cart containing the product.
2421
vh_st_product_id:
2522
type: integer
2623
example: 1
@@ -29,44 +26,50 @@ post:
2926
type: integer
3027
example: 2
3128
description: The ID of the product variation.
32-
quantity:
33-
type: integer
34-
example: 1
35-
description: The quantity of the product.
3629
vh_st_vendor_id:
3730
type: integer
3831
example: 1
3932
description: The ID of the vendor for the product.
40-
is_wishlisted:
41-
type: integer
42-
example: 0
43-
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.
33+
vh_st_wishlist_id:
34+
type: integer
35+
example: 1
36+
description: The ID of the wishlist of a user to add the product to.
37+
4438
required:
4539
- vh_st_cart_id
4640
- vh_st_product_id
4741
- vh_st_product_variation_id
48-
- quantity
42+
4943
- vh_st_vendor_id
50-
- is_wishlisted
44+
45+
selected_store_id:
46+
type: integer
47+
example: 51
48+
description: The ID of the selected store to which the product belongs.
49+
50+
type:
51+
type: string
52+
example: add/delete
53+
description: The type of action to perform (e.g., "add" to add the item to the wishlist, "delete" to remove it).
54+
5155
user_detail:
5256
type: object
5357
properties:
5458
id:
5559
type: integer
5660
example: 121
5761
description: The ID of the user.
58-
username:
59-
type: string
60-
example: "58a55727-2084-448c-89bd-c3146f8d52f8"
61-
description: The username of the user, it is for the purpose making new wishlist also.
62+
6263

6364
required:
6465
- id
65-
- username
66+
6667

6768
required:
6869
- item_detail
6970
- user_detail
71+
- selected_store_id
72+
- type
7073

7174
responses:
7275
'200':
@@ -88,8 +91,11 @@ post:
8891
data:
8992
type: object
9093
properties:
91-
cart:
92-
'$ref': '../vaahstore.yaml#/components/schemas/Cart'
94+
is_wishlisted:
95+
type: integer
96+
example: true
97+
description: Indicates whether the product is in the wishlist .
98+
9399
'400':
94100
description: Invalid request
95101
content:

public/vaahstore-api/customers/update.yaml

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ get:
4848
put:
4949
tags:
5050
- Customers
51-
summary: Update an existing record
52-
description: Update a customer record with the specified ID using the provided details.
51+
summary: Update an customer account profile
52+
description: Update the details of a customer account by providing the customer ID and the updated information.
5353
operationId: updateBrand
5454
parameters:
5555
- '$ref': '../vaahstore.yaml#/components/parameters/id'
@@ -72,22 +72,14 @@ put:
7272
username:
7373
type: string
7474
description: "User username"
75-
password:
75+
last_name:
7676
type: string
77-
description: "The user's password."
78-
status:
79-
type: string
80-
description: "The user's status."
81-
is_active:
82-
type: integer
83-
description: "Indicates whether the user is active or not."
84-
required:
85-
- email
86-
- first_name
87-
- status
88-
- is_active
89-
- password
90-
- username
77+
description: "The user's last name."
78+
phone:
79+
type: number
80+
description: "The user's phone number."
81+
82+
9183
responses:
9284
'200':
9385
description: Saved Successfully

public/vaahstore-api/products/productUpdate.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ get:
66
operationId: getProductById
77
parameters:
88
- '$ref': '../vaahstore.yaml#/components/parameters/id'
9+
- '$ref': '../vaahstore.yaml#/components/parameters/frontend_ui'
910
- '$ref': '../vaahstore.yaml#/components/parameters/exclude'
1011
- '$ref': '../vaahstore.yaml#/components/parameters/include'
1112
responses:

public/vaahstore-api/products/products.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ get:
77
parameters:
88
- '$ref': '../vaahstore.yaml#/components/parameters/page'
99
- '$ref': '../vaahstore.yaml#/components/parameters/rows'
10+
- '$ref': '../vaahstore.yaml#/components/parameters/selected_store'
1011
- '$ref': '../vaahstore.yaml#/components/parameters/ids_query'
1112
- '$ref': '../vaahstore.yaml#/components/parameters/exclude'
1213
- '$ref': '../vaahstore.yaml#/components/parameters/include'

0 commit comments

Comments
 (0)