Skip to content

Commit d031025

Browse files
authored
docs: fix list products api route response (#14657)
1 parent e1f5568 commit d031025

7 files changed

Lines changed: 169 additions & 92 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
type: object
2+
description: The paginated list of products.
3+
x-schemaName: StoreProductListResponse
4+
required:
5+
- limit
6+
- offset
7+
- count
8+
- products
9+
properties:
10+
limit:
11+
type: number
12+
title: limit
13+
description: The maximum number of items returned.
14+
offset:
15+
type: number
16+
title: offset
17+
description: The number of items skipped before retrieving the returned items.
18+
count:
19+
type: number
20+
title: count
21+
description: The total count of items.
22+
products:
23+
type: array
24+
description: The list of products.
25+
items:
26+
$ref: ./StoreProduct.yaml
27+
estimate_count:
28+
type: number
29+
title: estimate_count
30+
description: >-
31+
The estimated count retrieved from the PostgreSQL query planner, which may
32+
be inaccurate.
33+
x-featureFlag: index_engine

www/apps/api-reference/specs/admin/openapi.full.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98750,6 +98750,38 @@ components:
9875098750
type: number
9875198751
title: rank
9875298752
description: The image's rank among its sibling images
98753+
StoreProductListResponse:
98754+
type: object
98755+
description: The paginated list of products.
98756+
x-schemaName: StoreProductListResponse
98757+
required:
98758+
- limit
98759+
- offset
98760+
- count
98761+
- products
98762+
properties:
98763+
limit:
98764+
type: number
98765+
title: limit
98766+
description: The maximum number of items returned.
98767+
offset:
98768+
type: number
98769+
title: offset
98770+
description: The number of items skipped before retrieving the returned items.
98771+
count:
98772+
type: number
98773+
title: count
98774+
description: The total count of items.
98775+
products:
98776+
type: array
98777+
description: The list of products.
98778+
items:
98779+
$ref: '#/components/schemas/StoreProduct'
98780+
estimate_count:
98781+
type: number
98782+
title: estimate_count
98783+
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
98784+
x-featureFlag: index_engine
9875398785
StoreProductOption:
9875498786
type: object
9875598787
description: The product option's details.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
type: object
2+
description: The paginated list of products.
3+
x-schemaName: StoreProductListResponse
4+
required:
5+
- limit
6+
- offset
7+
- count
8+
- products
9+
properties:
10+
limit:
11+
type: number
12+
title: limit
13+
description: The maximum number of items returned.
14+
offset:
15+
type: number
16+
title: offset
17+
description: The number of items skipped before retrieving the returned items.
18+
count:
19+
type: number
20+
title: count
21+
description: The total count of items.
22+
products:
23+
type: array
24+
description: The list of products.
25+
items:
26+
$ref: ./StoreProduct.yaml
27+
estimate_count:
28+
type: number
29+
title: estimate_count
30+
description: >-
31+
The estimated count retrieved from the PostgreSQL query planner, which may
32+
be inaccurate.
33+
x-featureFlag: index_engine

www/apps/api-reference/specs/store/openapi.full.yaml

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9169,36 +9169,7 @@ paths:
91699169
content:
91709170
application/json:
91719171
schema:
9172-
allOf:
9173-
- type: object
9174-
description: The paginated list of products.
9175-
required:
9176-
- limit
9177-
- offset
9178-
- count
9179-
properties:
9180-
limit:
9181-
type: number
9182-
title: limit
9183-
description: The maximum number of items returned.
9184-
offset:
9185-
type: number
9186-
title: offset
9187-
description: The number of items skipped before retrieving the returned items.
9188-
count:
9189-
type: number
9190-
title: count
9191-
description: The total number of items.
9192-
- type: object
9193-
description: The paginated list of products.
9194-
required:
9195-
- products
9196-
properties:
9197-
products:
9198-
type: array
9199-
description: The list of products.
9200-
items:
9201-
type: object
9172+
$ref: '#/components/schemas/StoreProductListResponse'
92029173
'400':
92039174
$ref: '#/components/responses/400_error'
92049175
'401':
@@ -41465,6 +41436,38 @@ components:
4146541436
type: number
4146641437
title: rank
4146741438
description: The image's rank among its sibling images
41439+
StoreProductListResponse:
41440+
type: object
41441+
description: The paginated list of products.
41442+
x-schemaName: StoreProductListResponse
41443+
required:
41444+
- limit
41445+
- offset
41446+
- count
41447+
- products
41448+
properties:
41449+
limit:
41450+
type: number
41451+
title: limit
41452+
description: The maximum number of items returned.
41453+
offset:
41454+
type: number
41455+
title: offset
41456+
description: The number of items skipped before retrieving the returned items.
41457+
count:
41458+
type: number
41459+
title: count
41460+
description: The total count of items.
41461+
products:
41462+
type: array
41463+
description: The list of products.
41464+
items:
41465+
$ref: '#/components/schemas/StoreProduct'
41466+
estimate_count:
41467+
type: number
41468+
title: estimate_count
41469+
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
41470+
x-featureFlag: index_engine
4146841471
StoreProductOption:
4146941472
type: object
4147041473
description: The product option's details.

www/apps/api-reference/specs/store/paths/store_products.yaml

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -894,38 +894,7 @@ get:
894894
content:
895895
application/json:
896896
schema:
897-
allOf:
898-
- type: object
899-
description: The paginated list of products.
900-
required:
901-
- limit
902-
- offset
903-
- count
904-
properties:
905-
limit:
906-
type: number
907-
title: limit
908-
description: The maximum number of items returned.
909-
offset:
910-
type: number
911-
title: offset
912-
description: >-
913-
The number of items skipped before retrieving the returned
914-
items.
915-
count:
916-
type: number
917-
title: count
918-
description: The total number of items.
919-
- type: object
920-
description: The paginated list of products.
921-
required:
922-
- products
923-
properties:
924-
products:
925-
type: array
926-
description: The list of products.
927-
items:
928-
type: object
897+
$ref: ../components/schemas/StoreProductListResponse.yaml
929898
'400':
930899
$ref: ../components/responses/400_error.yaml
931900
'401':

www/utils/generated/oas-output/operations/store/get_store_products.ts

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -796,36 +796,7 @@
796796
* content:
797797
* application/json:
798798
* schema:
799-
* allOf:
800-
* - type: object
801-
* description: The paginated list of products.
802-
* required:
803-
* - limit
804-
* - offset
805-
* - count
806-
* properties:
807-
* limit:
808-
* type: number
809-
* title: limit
810-
* description: The maximum number of items returned.
811-
* offset:
812-
* type: number
813-
* title: offset
814-
* description: The number of items skipped before retrieving the returned items.
815-
* count:
816-
* type: number
817-
* title: count
818-
* description: The total number of items.
819-
* - type: object
820-
* description: The paginated list of products.
821-
* required:
822-
* - products
823-
* properties:
824-
* products:
825-
* type: array
826-
* description: The list of products.
827-
* items:
828-
* $ref: "#/components/schemas/StoreProduct"
799+
* $ref: "#/components/schemas/StoreProductListResponse"
829800
* "400":
830801
* $ref: "#/components/responses/400_error"
831802
* "401":
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/**
2+
* @schema StoreProductListResponse
3+
* type: object
4+
* description: The paginated list of products.
5+
* x-schemaName: StoreProductListResponse
6+
* required:
7+
* - limit
8+
* - offset
9+
* - count
10+
* - products
11+
* properties:
12+
* limit:
13+
* type: number
14+
* title: limit
15+
* description: The maximum number of items returned.
16+
* offset:
17+
* type: number
18+
* title: offset
19+
* description: The number of items skipped before retrieving the returned items.
20+
* count:
21+
* type: number
22+
* title: count
23+
* description: The total count of items.
24+
* products:
25+
* type: array
26+
* description: The list of products.
27+
* items:
28+
* $ref: "#/components/schemas/StoreProduct"
29+
* estimate_count:
30+
* type: number
31+
* title: estimate_count
32+
* description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
33+
* x-featureFlag: index_engine
34+
*
35+
*/
36+

0 commit comments

Comments
 (0)