-
Notifications
You must be signed in to change notification settings - Fork 3
/
swagger.yml
277 lines (277 loc) · 8.68 KB
/
swagger.yml
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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
openapi: 3.0.0
info:
title: 'Example API'
version: 3.0.0
paths:
'/api/get-products/{id}':
get:
operationId: getProductsQuery
parameters:
-
in: path
name: id
required: true
schema:
type: string
responses:
'200':
description: 'Get all products for a specific list'
content:
application/json:
schema:
$ref: '#/components/schemas/Products'
'/api/get-product/{id}':
get:
operationId: getProductQuery
parameters:
-
in: path
name: id
required: true
schema:
type: string
responses:
'200':
description: 'Get single product'
content:
application/json:
schema:
$ref: '#/components/schemas/Product'
'/api/get-offer/{id}':
get:
operationId: getOfferQuery
parameters:
-
in: path
name: id
required: true
schema:
type: string
responses:
'200':
description: 'Get best offer for specific product'
content:
application/json:
schema:
$ref: '#/components/schemas/Offer'
components:
schemas:
Query:
type: object
properties:
getProducts:
$ref: '#/components/schemas/Products'
description: 'Get all products for a specific list'
getProduct:
$ref: '#/components/schemas/Product'
description: 'Get single product'
getOffer:
$ref: '#/components/schemas/Offer'
description: 'Get best offer for specific product'
Products:
type: object
properties:
products:
type: array
items:
$ref: '#/components/schemas/Product'
schemaVersion:
type: string
totalResultSize:
type: integer
format: int32
originalRequest:
$ref: '#/components/schemas/ProductsOriginalRequest'
description: 'Products for a specific category, model is taken as is from bol.com'
Product:
type: object
required:
- id
- title
properties:
id:
type: string
ean:
type: string
title:
type: string
specsTag:
type: string
summary:
type: string
rating:
type: integer
format: int32
shortDescription:
type: string
urls:
type: array
items:
$ref: '#/components/schemas/ProductUrls'
images:
type: array
items:
$ref: '#/components/schemas/ProductImage'
offerData:
$ref: '#/components/schemas/ProductOfferData'
description: 'TODO: question does ''offerData'' belong here?'
parentCategoryPaths:
$ref: '#/components/schemas/ProductParentCategoryPaths'
offer:
$ref: '#/components/schemas/Offer'
ProductUrls:
type: object
properties:
key:
type: string
value:
type: string
ProductImage:
type: object
properties:
type:
type: string
key:
type: string
url:
type: string
ProductOfferData:
type: object
properties:
bolCom:
type: integer
format: int32
nonProfessionalSellers:
type: integer
format: int32
professionalSellers:
type: integer
format: int32
offers:
type: array
items:
$ref: '#/components/schemas/ProductOfferDataOffer'
ProductOfferDataOffer:
type: object
required:
- id
- condition
- price
- availabilityCode
- availabilityDescription
- comment
- seller
properties:
id:
type: string
condition:
type: string
price:
type: number
format: float
listPrice:
type: number
format: float
availabilityCode:
type: string
availabilityDescription:
type: string
comment:
type: string
seller:
$ref: '#/components/schemas/ProductSeller'
bestOffer:
type: boolean
releaseDate:
type: string
description: 'TODO: is this Offer? Schema usage validator should pick this up'
ProductSeller:
type: object
required:
- id
- sellerType
- displayName
- topSeller
- useWarrantyRepairConditions
properties:
id:
type: string
sellerType:
type: string
displayName:
type: string
url:
type: string
topSeller:
type: boolean
useWarrantyRepairConditions:
type: boolean
ProductParentCategoryPaths:
type: object
properties:
parentCategories:
$ref: '#/components/schemas/ProductParentCategory'
ProductParentCategory:
type: object
properties:
id:
type: string
name:
type: string
Offer:
type: object
required:
- id
- condition
- price
- availabilityCode
- availabilityDescription
- seller
properties:
id:
type: string
condition:
type: string
price:
type: number
format: float
availabilityCode:
type: string
availabilityDescription:
type: string
seller:
$ref: '#/components/schemas/OfferSeller'
description: 'Show Offer for a Product'
OfferSeller:
type: object
required:
- id
- sellerType
- displayName
properties:
id:
type: string
sellerType:
type: string
displayName:
type: string
ProductsOriginalRequest:
type: object
properties:
category:
type: array
items:
$ref: '#/components/schemas/ProductsOriginalRequestCategory'
ProductsOriginalRequestCategory:
type: object
properties:
id:
type: integer
format: int32
name:
type: string
productCount:
type: integer
format: int32
ID:
type: string