-
Notifications
You must be signed in to change notification settings - Fork 0
/
openapi.yaml
112 lines (112 loc) · 2.9 KB
/
openapi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
openapi: 3.0.1
info:
title: ecommerce api
version: 1.0.0
description: Project for developing an api for e-commerce.
contact:
name: Marc Ondercin
paths:
/register:
summary: Register a new user.
post:
summary: Create a new user.
description: Create a new user.
operationId: post_user
responses:
'200':
description: 200 Success
content:
application/json:
examples:
200 Success:
value: User created successfully.
default:
description: Default error sample response
tags:
- register
/users/{id}:
summary: Access a user by id.
/products:
summary: Access all products from the database.
get:
summary: Retrieve all products.
description: ''
operationId: get_products
responses:
default:
description: Default error sample response
tags:
- products
post:
summary: Add a new product.
description: Add a new product.
operationId: post_product
responses:
default:
description: Default error sample response
tags:
- products
/products/{id}:
summary: Access a product by id.
get:
summary: Retrieve a product by id.
description: Retrieve a product by id.
operationId: get_product
responses:
default:
description: Default error sample response
tags:
- products
put:
summary: Update product information.
description: Make a change to a product by its id.
operationId: put_product
responses:
default:
description: Default error sample response
tags:
- products
delete:
summary: Delete a product.
description: Delete a product from id.
operationId: delete_product
responses:
default:
description: Default error sample response
tags:
- products
/orders/{userId}:
summary: Access all orders from the database.
get:
summary: Retrieve all orders for a specific user.
description: Retrieve all orders for a specific user.
operationId: get_orders
responses:
default:
description: Default error sample response
tags:
- orders
/orders/{userId}/{orderId}:
summary: Access an order by id.
get:
summary: Retrieve an order by id.
description: Retrieve an order by id.
operationId: get_order
responses:
default:
description: Default error sample response
tags:
- orders
/login:
summary: Login to a specific user.
/cart/{userId}:
summary: Access user's cart.
get:
summary: Retrieve a user's cart.
description: ''
operationId: get_cart
responses:
default:
description: Default error sample response
tags:
- cart