-
Notifications
You must be signed in to change notification settings - Fork 5
/
swagger.json
399 lines (399 loc) · 17 KB
/
swagger.json
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
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
{
"swagger": "2.0",
"info": {
"version": "1.0",
"title": "Casablanca settlement file service API definition",
"description": "Casablanca settlement file service API definition"
},
"basePath": "/",
"schemes": [
"http"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/settlementFile": {
"post": {
"description": "Save a new settlement file.",
"summary": "PostSettlementFile",
"tags": [
"settlementFile"
],
"operationId": "PostSettlementFile",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/NewSettlementFile"
}
},
{
"$ref": "#/parameters/Content-Length"
},
{
"$ref": "#/parameters/Content-Type"
},
{
"$ref": "#/parameters/Accept"
}
],
"responses": {
"201": {
"$ref": "#/responses/SettlementFileResponse"
},
"400": {
"$ref": "#/responses/ErrorResponse400"
},
"401": {
"$ref": "#/responses/ErrorResponse401"
},
"403": {
"$ref": "#/responses/ErrorResponse403"
},
"404": {
"$ref": "#/responses/ErrorResponse404"
},
"405": {
"$ref": "#/responses/ErrorResponse405"
},
"406": {
"$ref": "#/responses/ErrorResponse406"
},
"501": {
"$ref": "#/responses/ErrorResponse501"
},
"503": {
"$ref": "#/responses/ErrorResponse503"
}
}
}
},
"/settlementFile/{settlementId}": {
"get": {
"description": "Get a settlement file by ID.",
"summary": "GetSettlementFilesBySettlementID",
"tags": [
"settlementFiles"
],
"operationId": "GetSettlementFilesBySettlementID",
"parameters": [
{
"$ref": "#/parameters/Accept"
},
{
"name": "settlementId",
"description": "The ID pertaining to the settlement for which to return settlement files",
"in": "path",
"pattern": "^[1-9]\\d{0,9}$",
"required": true,
"type": "string"
}
],
"responses": {
"202": {
"$ref": "#/responses/SettlementFileListResponse"
},
"400": {
"$ref": "#/responses/ErrorResponse400"
},
"401": {
"$ref": "#/responses/ErrorResponse401"
},
"403": {
"$ref": "#/responses/ErrorResponse403"
},
"404": {
"$ref": "#/responses/ErrorResponse404"
},
"405": {
"$ref": "#/responses/ErrorResponse405"
},
"406": {
"$ref": "#/responses/ErrorResponse406"
},
"501": {
"$ref": "#/responses/ErrorResponse501"
},
"503": {
"$ref": "#/responses/ErrorResponse503"
}
}
}
}
},
"definitions": {
"NewSettlementFile": {
"title": "Settlement file object",
"type": "object",
"description": "POST /settlement/",
"properties": {
"settlementId": {
"type": "integer",
"minimum": 0,
"description": "Unique identifier associated with the settlement file"
},
"settlementFile": {
"type": "string",
"description": "A string containing the ISO 20022 pain.001.001.03 XML settlement file. Note that this file is not validated by this service because a) we do not have access to a validator for this format; and b) the settlement bank further restricts our usage to a subset of this format."
},
"source": {
"type": "string",
"description": "A stringyfied JSON object containing the simplified version of the settlement file."
}
}
},
"SettlementFile": {
"title": "Settlement file object",
"type": "object",
"description": "GET /settlement/{settlementId}",
"properties": {
"settlementFileId": {
"type": "integer",
"minimum": 0,
"description": "Unique identifier associated with the settlement file"
},
"settlementId": {
"type": "integer",
"minimum": 0,
"description": "Unique identifier associated with the settlement file"
},
"createdDate": {
"type": "string",
"pattern": "^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)$",
"description": "The API data type Date is a JSON String in a lexical format that is restricted by a regular expression for interoperability reasons. This format, as specified in ISO 8601, contains a date only. A more readable version of the format is yyyy-MM-dd. Examples - \"1982-05-23\", \"1987-08-05”"
},
"settlementFile": {
"type": "string",
"description": "A string containing the ISO 20022 pain.001.001.03 XML settlement file. Note that this file is not validated by this service because a) we do not have access to a validator for this format; and b) the settlement bank further restricts our usage to a subset of this format."
},
"source": {
"type": "string",
"description": "A stringyfied JSON object containing the simplified version of the settlement file."
},
"state": {
"type": "string",
"description": "A stringyfied JSON object containing the simplified version of the settlement file that remains to be processed."
}
}
},
"ErrorInformationResponse": {
"title": "ErrorInformationResponse",
"type": "object",
"description": "Contains ",
"properties": {
"code": {
"type": "integer",
"minimum": 0,
"description": "Error code corresponding to error reason."
},
"message": {
"type": "string",
"description": "Human-readable error information."
}
}
}
},
"responses": {
"Response200": {
"description": "OK"
},
"Response202": {
"description": "Accepted"
},
"SettlementFileListResponse": {
"description": "List of settlement files associated with this settlement",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/SettlementFile"
}
},
"headers": {
"Content-Length": {
"description": "The Content-Length header field indicates the anticipated size of the payload body. Only sent if there is a body.",
"type": "integer"
},
"Content-Type": {
"description": "The Content-Type header indicates the specific version of the API used to send the payload body.",
"type": "string"
}
}
},
"SettlementFileResponse": {
"description": "An object describing (and containing) a settlement file.",
"schema": {
"$ref": "#/definitions/SettlementFile"
},
"headers": {
"Content-Length": {
"description": "The Content-Length header field indicates the anticipated size of the payload body. Only sent if there is a body.",
"type": "integer"
},
"Content-Type": {
"description": "The Content-Type header indicates the specific version of the API used to send the payload body.",
"type": "string"
}
}
},
"ErrorResponse400": {
"description": "Bad Request - The application cannot process the request; for example, due to malformed syntax or the payload exceeded size restrictions.",
"schema": {
"$ref": "#/definitions/ErrorInformationResponse"
},
"headers": {
"Content-Length": {
"description": "The Content-Length header field indicates the anticipated size of the payload body. Only sent if there is a body.",
"type": "integer"
},
"Content-Type": {
"description": "The Content-Type header indicates the specific version of the API used to send the payload body.",
"type": "string"
}
}
},
"ErrorResponse401": {
"description": "Unauthorized - The request requires authentication in order to be processed.",
"schema": {
"$ref": "#/definitions/ErrorInformationResponse"
},
"headers": {
"Content-Length": {
"description": "The Content-Length header field indicates the anticipated size of the payload body. Only sent if there is a body.",
"type": "integer"
},
"Content-Type": {
"description": "The Content-Type header indicates the specific version of the API used to send the payload body.",
"type": "string"
}
}
},
"ErrorResponse403": {
"description": "Forbidden - The request was denied and will be denied in the future.",
"schema": {
"$ref": "#/definitions/ErrorInformationResponse"
},
"headers": {
"Content-Length": {
"description": "The Content-Length header field indicates the anticipated size of the payload body. Only sent if there is a body.",
"type": "integer"
},
"Content-Type": {
"description": "The Content-Type header indicates the specific version of the API used to send the payload body.",
"type": "string"
}
}
},
"ErrorResponse404": {
"description": "Not Found - The resource specified in the URI was not found.",
"schema": {
"$ref": "#/definitions/ErrorInformationResponse"
},
"headers": {
"Content-Length": {
"description": "The Content-Length header field indicates the anticipated size of the payload body. Only sent if there is a body.",
"type": "integer"
},
"Content-Type": {
"description": "The Content-Type header indicates the specific version of the API used to send the payload body.",
"type": "string"
}
}
},
"ErrorResponse405": {
"description": "Method Not Allowed - An unsupported HTTP method for the request was used.",
"schema": {
"$ref": "#/definitions/ErrorInformationResponse"
},
"headers": {
"Content-Length": {
"description": "The Content-Length header field indicates the anticipated size of the payload body. Only sent if there is a body.",
"type": "integer"
},
"Content-Type": {
"description": "The Content-Type header indicates the specific version of the API used to send the payload body.",
"type": "string"
}
}
},
"ErrorResponse406": {
"description": "Not acceptable - The server is not capable of generating content according to the Accept headers sent in the request. Used in the API to indicate that the server does not support the version that the client is requesting.",
"schema": {
"$ref": "#/definitions/ErrorInformationResponse"
},
"headers": {
"Content-Length": {
"description": "The Content-Length header field indicates the anticipated size of the payload body. Only sent if there is a body.",
"type": "integer"
},
"Content-Type": {
"description": "The Content-Type header indicates the specific version of the API used to send the payload body.",
"type": "string"
}
}
},
"ErrorResponse501": {
"description": "Not Implemented - The server does not support the requested service. The client should not retry.",
"schema": {
"$ref": "#/definitions/ErrorInformationResponse"
},
"headers": {
"Content-Length": {
"description": "The Content-Length header field indicates the anticipated size of the payload body. Only sent if there is a body.",
"type": "integer"
},
"Content-Type": {
"description": "The Content-Type header indicates the specific version of the API used to send the payload body.",
"type": "string"
}
}
},
"ErrorResponse503": {
"description": "Service Unavailable - The server is currently unavailable to accept any new service requests. This should be a temporary state, and the client should retry within a reasonable time frame.",
"schema": {
"$ref": "#/definitions/ErrorInformationResponse"
},
"headers": {
"Content-Length": {
"description": "The Content-Length header field indicates the anticipated size of the payload body. Only sent if there is a body.",
"type": "integer"
},
"Content-Type": {
"description": "The Content-Type header indicates the specific version of the API used to send the payload body.",
"type": "string"
}
}
}
},
"parameters": {
"Accept": {
"name": "accept",
"in": "header",
"required": true,
"type": "string",
"pattern": "^application/json$",
"description": "The Accept header field indicates the content type the client accepts. application/json only."
},
"Content-Length": {
"name": "content-length",
"in": "header",
"required": true,
"type": "integer",
"minimum": 0,
"description": "The Content-Length header field indicates the anticipated size of the payload body. Only sent if there is a body. Note - The API supports a maximum size of 5242880 bytes (5 Megabytes)"
},
"Content-Type": {
"name": "content-type",
"in": "header",
"type": "string",
"required": true,
"pattern": "^application/json$",
"description": "The Content-Type header indicates the content type the client is providing data in. application/json only."
}
}
}