-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathorders-openapi.yaml
63 lines (61 loc) · 1.39 KB
/
orders-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
openapi: 3.0.3
info:
title: Orders API
version: 1.0.0
paths:
/order:
post:
summary: Create a new order
description: Create a new order
operationId: addOrder
requestBody:
description: Create a new order
content:
application/json:
schema:
$ref: "#/components/schemas/Order"
required: true
responses:
"201":
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/Order"
/order/{orderId}:
get:
summary: Get an existing order
description: Get an existing order
operationId: getOrder
parameters:
- in: path
name: orderId
schema:
type: string
required: true
description: uuid of the order to get
responses:
"200":
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/Order"
components:
schemas:
Order:
type: object
properties:
id:
type: string
format: uuid
quantity:
type: integer
format: int32
example: 7
product:
type: string
example: "Apple"
required:
- quantity
- product