Skip to content

Commit 482c3a5

Browse files
Merge pull request #65 from PaystackOSS/patch-storefronts
chore: update storefronts examples and descriptions
2 parents 1a437fa + d9a639b commit 482c3a5

11 files changed

+109
-30
lines changed

dist/paystack.yaml

Lines changed: 55 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3714,6 +3714,7 @@ paths:
37143714
tags:
37153715
- Storefront
37163716
summary: Create Storefront
3717+
description: Create a digital shop to manage and display your products
37173718
operationId: storefront_create
37183719
requestBody:
37193720
content:
@@ -3734,23 +3735,29 @@ paths:
37343735
tags:
37353736
- Storefront
37363737
summary: List Storefronts
3738+
description: List the storefronts you previously created
37373739
operationId: storefront_list
37383740
parameters:
3739-
- name: perPage
3740-
in: query
3741+
- in: query
3742+
name: perPage
3743+
description: Number of records to fetch per request
37413744
schema:
37423745
type: integer
3743-
- name: page
3744-
in: query
3746+
default: 50
3747+
- in: query
3748+
name: page
3749+
description: The offset to retrieve data from
37453750
schema:
37463751
type: integer
3752+
default: 1
37473753
- name: status
37483754
in: query
37493755
schema:
37503756
type: string
37513757
enum:
37523758
- active
37533759
- inactive
3760+
example: active
37543761
responses:
37553762
'200':
37563763
$ref: '#/components/responses/StorefrontListSuccess'
@@ -3763,14 +3770,17 @@ paths:
37633770
/storefront/{id}:
37643771
parameters:
37653772
- name: id
3773+
description: The unique identifier of the Storefront
37663774
in: path
37673775
required: true
37683776
schema:
3769-
type: string
3777+
type: integer
3778+
example: 1559046
37703779
get:
37713780
tags:
37723781
- Storefront
37733782
summary: Fetch Storefront
3783+
description: Get the details of a previously created Storefront
37743784
operationId: storefront_fetch
37753785
responses:
37763786
'200':
@@ -3785,6 +3795,7 @@ paths:
37853795
tags:
37863796
- Storefront
37873797
summary: Update Storefront
3798+
description: Update the details of a previously created Storefront
37883799
operationId: storefront_update
37893800
requestBody:
37903801
content:
@@ -3807,6 +3818,7 @@ paths:
38073818
tags:
38083819
- Storefront
38093820
summary: Delete Storefront
3821+
description: Delete a previously created Storefront
38103822
operationId: storefront_delete
38113823
responses:
38123824
'200':
@@ -3820,14 +3832,17 @@ paths:
38203832
/storefront/verify/{slug}:
38213833
parameters:
38223834
- name: slug
3835+
description: The custom slug to check
38233836
in: path
38243837
required: true
38253838
schema:
38263839
type: string
3840+
example: struct_and_faces
38273841
get:
38283842
tags:
38293843
- Storefront
38303844
summary: Verify Storefront Slug
3845+
description: Verify the availability of a slug before using it for your Storefront
38313846
operationId: storefront_verifySlug
38323847
responses:
38333848
'200':
@@ -3847,11 +3862,12 @@ paths:
38473862
operationId: storefront_fetchOrders
38483863
parameters:
38493864
- name: id
3865+
description: The unique identifier of the Storefront
38503866
in: path
38513867
required: true
38523868
schema:
3853-
type: string
3854-
example: Z0R4orOU
3869+
type: integer
3870+
example: 1559046
38553871
responses:
38563872
'200':
38573873
$ref: '#/components/responses/Ok'
@@ -3862,14 +3878,17 @@ paths:
38623878
/storefront/{id}/product:
38633879
parameters:
38643880
- name: id
3881+
description: The unique identifier of the Storefront
38653882
in: path
38663883
required: true
38673884
schema:
3868-
type: string
3885+
type: integer
3886+
example: 1559046
38693887
post:
38703888
tags:
38713889
- Storefront
38723890
summary: Add Products to Storefront
3891+
description: Add previously created products to a Storefront
38733892
operationId: storefront_addProducts
38743893
requestBody:
38753894
content:
@@ -3891,7 +3910,8 @@ paths:
38913910
get:
38923911
tags:
38933912
- Storefront
3894-
summary: List Products in Storefront
3913+
summary: List Storefront Products
3914+
description: List the products in a Storefront
38953915
operationId: storefront_listProducts
38963916
responses:
38973917
'200':
@@ -3905,14 +3925,17 @@ paths:
39053925
/storefront/{id}/publish:
39063926
parameters:
39073927
- name: id
3928+
description: The unique identifier of the Storefront
39083929
in: path
39093930
required: true
39103931
schema:
3911-
type: string
3932+
type: integer
3933+
example: 1559046
39123934
post:
39133935
tags:
39143936
- Storefront
39153937
summary: Publish Storefront
3938+
description: Make your Storefront publicly available
39163939
operationId: storefront_publish
39173940
responses:
39183941
'200':
@@ -3926,14 +3949,17 @@ paths:
39263949
/storefront/{id}/duplicate:
39273950
parameters:
39283951
- name: id
3952+
description: The unique identifier of the Storefront
39293953
in: path
39303954
required: true
39313955
schema:
3932-
type: string
3956+
type: integer
3957+
example: 1559046
39333958
post:
39343959
tags:
39353960
- Storefront
39363961
summary: Duplicate Storefront
3962+
description: Duplicate a previously created Storefront
39373963
operationId: storefront_duplicate
39383964
responses:
39393965
'200':
@@ -14482,16 +14508,24 @@ components:
1448214508
type: string
1448314509
slug:
1448414510
description: |
14485-
A unique identifier to access your store. Once the storefront is created, it can be accessed from
14486-
https://paystack.shop/your-slug
14511+
A unique identifier to access your store. Once the storefront is created, it can be accessed from https://paystack.shop/your-slug
1448714512
type: string
1448814513
currency:
14489-
description: |
14490-
Currency for prices of products in your storefront. Allowed values are: `NGN`, `GHS`, `KES`, `ZAR` or `USD`
14514+
description: Currency for prices of products in your storefront.
1449114515
type: string
14516+
enum:
14517+
- GHS
14518+
- KES
14519+
- NGN
14520+
- USD
14521+
- ZAR
1449214522
description:
1449314523
description: The description of the storefront
1449414524
type: string
14525+
example:
14526+
name: Obi and Sons
14527+
slug: obi_and_sons
14528+
currency: NGN
1449514529
StorefrontContactsArray:
1449614530
type: object
1449714531
properties:
@@ -14718,6 +14752,8 @@ components:
1471814752
description:
1471914753
description: The description of the storefront
1472014754
type: string
14755+
example:
14756+
description: Import and Export
1472114757
StorefrontUpdateResponse:
1472214758
type: object
1472314759
properties:
@@ -14748,6 +14784,10 @@ components:
1474814784
type: array
1474914785
items:
1475014786
type: integer
14787+
example:
14788+
products:
14789+
- 2196244
14790+
- 2179824
1475114791
OrderItemsArray:
1475214792
type: object
1475314793
properties:

src/assets/openapi/components/schemas/StorefrontAddProducts.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ properties:
77
type: array
88
items:
99
type: integer
10+
example:
11+
products:
12+
- 2196244
13+
- 2179824

src/assets/openapi/components/schemas/StorefrontCreate.yaml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,21 @@ properties:
1111
description: >
1212
A unique identifier to access your store. Once the storefront is created,
1313
it can be accessed from
14-
1514
https://paystack.shop/your-slug
1615
type: string
1716
currency:
18-
description: >
19-
Currency for prices of products in your storefront. Allowed values are:
20-
`NGN`, `GHS`, `KES`, `ZAR` or `USD`
17+
description: Currency for prices of products in your storefront.
2118
type: string
19+
enum:
20+
- GHS
21+
- KES
22+
- NGN
23+
- USD
24+
- ZAR
2225
description:
2326
description: The description of the storefront
2427
type: string
28+
example:
29+
name: Obi and Sons
30+
slug: 'obi_and_sons'
31+
currency: NGN

src/assets/openapi/components/schemas/StorefrontUpdate.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ properties:
1313
description:
1414
description: The description of the storefront
1515
type: string
16+
example:
17+
description: Import and Export

src/assets/openapi/paths/storefront.yaml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ post:
22
tags:
33
- Storefront
44
summary: Create Storefront
5+
description: Create a digital shop to manage and display your products
56
operationId: storefront_create
67
requestBody:
78
content:
@@ -22,23 +23,29 @@ get:
2223
tags:
2324
- Storefront
2425
summary: List Storefronts
26+
description: List the storefronts you previously created
2527
operationId: storefront_list
2628
parameters:
27-
- name: perPage
28-
in: query
29+
- in: query
30+
name: perPage
31+
description: Number of records to fetch per request
2932
schema:
3033
type: integer
31-
- name: page
32-
in: query
34+
default: 50
35+
- in: query
36+
name: page
37+
description: The offset to retrieve data from
3338
schema:
3439
type: integer
40+
default: 1
3541
- name: status
3642
in: query
3743
schema:
3844
type: string
3945
enum:
4046
- active
4147
- inactive
48+
example: active
4249
responses:
4350
'200':
4451
$ref: ../components/responses/StorefrontListSuccess.yaml

src/assets/openapi/paths/storefront_verify_{slug}.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
parameters:
22
- name: slug
3+
description: The custom slug to check
34
in: path
45
required: true
56
schema:
67
type: string
8+
example: struct_and_faces
79
get:
810
tags:
911
- Storefront
1012
summary: Verify Storefront Slug
13+
description: Verify the availability of a slug before using it for your Storefront
1114
operationId: storefront_verifySlug
1215
responses:
1316
'200':

src/assets/openapi/paths/storefront_{id}.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
parameters:
22
- name: id
3+
description: The unique identifier of the Storefront
34
in: path
45
required: true
56
schema:
6-
type: string
7+
type: integer
8+
example: 1559046
79
get:
810
tags:
911
- Storefront
1012
summary: Fetch Storefront
13+
description: Get the details of a previously created Storefront
1114
operationId: storefront_fetch
1215
responses:
1316
'200':
@@ -22,6 +25,7 @@ put:
2225
tags:
2326
- Storefront
2427
summary: Update Storefront
28+
description: Update the details of a previously created Storefront
2529
operationId: storefront_update
2630
requestBody:
2731
content:
@@ -44,6 +48,7 @@ delete:
4448
tags:
4549
- Storefront
4650
summary: Delete Storefront
51+
description: Delete a previously created Storefront
4752
operationId: storefront_delete
4853
responses:
4954
'200':

src/assets/openapi/paths/storefront_{id}_duplicate.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
parameters:
22
- name: id
3+
description: The unique identifier of the Storefront
34
in: path
45
required: true
56
schema:
6-
type: string
7+
type: integer
8+
example: 1559046
79
post:
810
tags:
911
- Storefront
1012
summary: Duplicate Storefront
13+
description: Duplicate a previously created Storefront
1114
operationId: storefront_duplicate
1215
responses:
1316
'200':

src/assets/openapi/paths/storefront_{id}_order.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ get:
66
operationId: storefront_fetchOrders
77
parameters:
88
- name: id
9+
description: The unique identifier of the Storefront
910
in: path
1011
required: true
1112
schema:
12-
type: string
13-
example: Z0R4orOU
13+
type: integer
14+
example: 1559046
1415
responses:
1516
'200':
1617
$ref: ../components/responses/Ok.yaml

0 commit comments

Comments
 (0)