-
Notifications
You must be signed in to change notification settings - Fork 20
/
DPR-Tutorial1Step6.yaml
157 lines (157 loc) · 3.88 KB
/
DPR-Tutorial1Step6.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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
openapi: 3.0.1
info:
title: OnlineShopBackend
version: "1.0"
tags:
- name: Customer
externalDocs:
url: https://microservice-api-patterns.org/patterns/responsibility/
- name: ProductCatalog
externalDocs:
url: https://microservice-api-patterns.org/patterns/responsibility/
- name: OrderBasket
externalDocs:
url: https://microservice-api-patterns.org/patterns/responsibility/
paths:
/Customer:
description: ""
post:
tags:
- Customer
description: unspecified operation responsibility
operationId: createAccount
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerAccount'
responses:
"200":
description: response message payload (success case)
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerAccountId'
/ProductCatalog:
description: ""
get:
tags:
- ProductCatalog
description: unspecified operation responsibility
operationId: readProductInformation
parameters:
- name: productId
in: query
description: 'Data Element: https://microservice-api-patterns.org/patterns/structure/elementStereotypes/DataElement'
required: true
schema:
type: number
responses:
"200":
description: response message payload (success case)
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Product'
/OrderBasket:
description: ""
put:
tags:
- OrderBasket
summary: PUT
description: PUT
operationId: addOrderItem
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OrderItem'
responses:
"200":
description: response message payload (success case)
content:
application/json:
schema:
$ref: '#/components/schemas/OrderItemId'
post:
tags:
- OrderBasket
summary: POST
description: POST
operationId: createOrder
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Order'
responses:
"200":
description: response message payload (success case)
content:
application/json:
schema:
$ref: '#/components/schemas/OrderId'
components:
schemas:
CustomerAccount:
type: object
properties:
name:
type: string
address:
type: string
customeraccountId:
$ref: '#/components/schemas/CustomerAccountId'
CustomerAccountId:
type: object
properties:
customeraccountId:
type: number
Order:
type: object
properties:
orderNumber:
type: string
orderId:
$ref: '#/components/schemas/OrderId'
orderitemList:
type: array
items:
$ref: '#/components/schemas/OrderItem'
OrderId:
type: object
properties:
orderId:
type: number
OrderItem:
type: object
properties:
productName:
type: string
price:
type: string
orderitemId:
$ref: '#/components/schemas/OrderItemId'
OrderItemId:
type: object
properties:
orderitemId:
type: number
Product:
type: object
properties:
productName:
type: string
image:
type: string
productCategory:
type: string
productId:
$ref: '#/components/schemas/ProductId'
ProductId:
type: object
properties:
productId:
type: number