Skip to content

Commit e14a076

Browse files
Updated: about query in product getitem
1 parent f744ca8 commit e14a076

File tree

3 files changed

+88
-23
lines changed

3 files changed

+88
-23
lines changed

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/vaahstore.yaml

Lines changed: 44 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ components:
465465
name: selected_store
466466
in: query
467467
required: false
468-
description: Load products from the selected store. If not provided, products from the default store will be loaded.
468+
description: Load products from the `selected store`. If not provided, products from the `default store` will be loaded.
469469
schema:
470470
type: integer
471471
example: 20
@@ -708,6 +708,16 @@ components:
708708
description: Comma-separated list of fields or relations to exclude from the response. Example`?exclude[price,status,productVariations]=true&exclude[medias]=true`
709709
schema:
710710
type: array
711+
frontend_ui:
712+
name: frontend_ui
713+
in: query
714+
required: false
715+
schema:
716+
type: string
717+
example: primevue/tailwind
718+
description: |
719+
If set to `?frontend_ui=primevue`, the response will include only structured and optimized data suitable for PrimeVue UI components.
720+
711721
include:
712722
name: include
713723
in: query
@@ -1458,6 +1468,12 @@ components:
14581468
name:
14591469
type: string
14601470
example: "My Product"
1471+
summary:
1472+
type: string
1473+
example: "My Product Summary"
1474+
details:
1475+
type: string
1476+
example: "My Product Details"
14611477
price:
14621478
type: object
14631479
description: Price details including the amount and associated currency information.
@@ -1482,6 +1498,13 @@ components:
14821498
type: number
14831499
description: The exchange rate or base rate for the currency.
14841500
example: 1
1501+
wishlist_ids:
1502+
type: array
1503+
items:
1504+
type: integer
1505+
example: [ 1, 2 ]
1506+
description: IDs of wishlists in which this product exists for the authenticated user.
1507+
14851508

14861509

14871510
store:
@@ -1504,24 +1527,35 @@ components:
15041527
name:
15051528
type: string
15061529
example: "Nike"
1507-
variations:
1508-
type: array
1509-
description: "An array of variation IDs associated with the product."
1510-
items:
1511-
type: integer
1512-
example: 106
1513-
example: [ 106, 107, 108 ]
1530+
15141531
product_categories:
15151532
type: array
15161533
items:
15171534
type: object
15181535
properties:
15191536
id:
15201537
type: integer
1521-
example: 213
1538+
example: 42
15221539
name:
15231540
type: string
1524-
example: "Electronics"
1541+
example: "Footwear"
1542+
slug:
1543+
type: string
1544+
example: "footwear"
1545+
parent_id:
1546+
type: integer
1547+
nullable: true
1548+
example: null
1549+
pivot:
1550+
type: object
1551+
properties:
1552+
vh_st_product_id:
1553+
type: integer
1554+
example: 49
1555+
vh_st_category_id:
1556+
type: integer
1557+
example: 42
1558+
15251559
vendor_product_data:
15261560
type: object
15271561
properties:

public/vaahstore-apis.yaml

Lines changed: 43 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2115,6 +2115,7 @@ paths:
21152115
operationId: getProductById
21162116
parameters:
21172117
- $ref: '#/components/parameters/id'
2118+
- $ref: '#/components/parameters/frontend_ui'
21182119
- $ref: '#/components/parameters/exclude'
21192120
- $ref: '#/components/parameters/include'
21202121
responses:
@@ -20875,7 +20876,7 @@ components:
2087520876
name: selected_store
2087620877
in: query
2087720878
required: false
20878-
description: Load products from the selected store. If not provided, products from the default store will be loaded.
20879+
description: Load products from the `selected store`. If not provided, products from the `default store` will be loaded.
2087920880
schema:
2088020881
type: integer
2088120882
example: 20
@@ -21123,6 +21124,15 @@ components:
2112321124
description: Comma-separated list of fields or relations to exclude from the response. Example`?exclude[price,status,productVariations]=true&exclude[medias]=true`
2112421125
schema:
2112521126
type: array
21127+
frontend_ui:
21128+
name: frontend_ui
21129+
in: query
21130+
required: false
21131+
schema:
21132+
type: string
21133+
example: primevue/tailwind
21134+
description: |
21135+
If set to `?frontend_ui=primevue`, the response will include only structured and optimized data suitable for PrimeVue UI components.
2112621136
include:
2112721137
name: include
2112821138
in: query
@@ -21855,6 +21865,12 @@ components:
2185521865
name:
2185621866
type: string
2185721867
example: My Product
21868+
summary:
21869+
type: string
21870+
example: My Product Summary
21871+
details:
21872+
type: string
21873+
example: My Product Details
2185821874
price:
2185921875
type: object
2186021876
description: Price details including the amount and associated currency information.
@@ -21879,6 +21895,14 @@ components:
2187921895
type: number
2188021896
description: The exchange rate or base rate for the currency.
2188121897
example: 1
21898+
wishlist_ids:
21899+
type: array
21900+
items:
21901+
type: integer
21902+
example:
21903+
- 1
21904+
- 2
21905+
description: IDs of wishlists in which this product exists for the authenticated user.
2188221906
store:
2188321907
type: object
2188421908
properties:
@@ -21899,27 +21923,33 @@ components:
2189921923
name:
2190021924
type: string
2190121925
example: Nike
21902-
variations:
21903-
type: array
21904-
description: An array of variation IDs associated with the product.
21905-
items:
21906-
type: integer
21907-
example: 106
21908-
example:
21909-
- 106
21910-
- 107
21911-
- 108
2191221926
product_categories:
2191321927
type: array
2191421928
items:
2191521929
type: object
2191621930
properties:
2191721931
id:
2191821932
type: integer
21919-
example: 213
21933+
example: 42
2192021934
name:
2192121935
type: string
21922-
example: Electronics
21936+
example: Footwear
21937+
slug:
21938+
type: string
21939+
example: footwear
21940+
parent_id:
21941+
type: integer
21942+
nullable: true
21943+
example: null
21944+
pivot:
21945+
type: object
21946+
properties:
21947+
vh_st_product_id:
21948+
type: integer
21949+
example: 49
21950+
vh_st_category_id:
21951+
type: integer
21952+
example: 42
2192321953
vendor_product_data:
2192421954
type: object
2192521955
properties:

0 commit comments

Comments
 (0)