-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathOAS3.json
583 lines (583 loc) · 18.2 KB
/
OAS3.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
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
{
"openapi": "3.0.0",
"info": {
"title": "APIRegistration",
"description": "The APIRegistration microService provides the ability to perform several operations on an API during the Registration flow of API Provisioning, including create, update, retrieve and delete.",
"version": "1.0.0",
"contact": {
"email": "[email protected]"
}
},
"servers": [
{
"url": "http://att.non-prod.com/rest/apiregistration/v1",
"description": "Non-prod"
},
{
"url": "http://att.prod.com/rest/apiregistration/v1",
"description": "Production"
}
],
"tags": [
{
"name": "apis"
}
],
"paths": {
"/apis": {
"post": {
"summary": "Adds a new API/service.",
"description": "",
"operationId": "createAPI",
"parameters": [
{
"in": "header",
"name": "Content-Type",
"description": "Specifies the format of the body of the request. Valid value is application/json.",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "header",
"name": "Accept",
"description": "Specifies the format of the body of the response. Valid value is application/json and if header is not sent, the default value of application/json will be used.",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/API"
}
}
},
"description": "new service object",
"required": true
},
"responses": {
"201": {
"description": "created",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/API"
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RequestError"
}
}
}
},
"500": {
"description": "Unexpected Runtime error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RequestError"
}
}
}
}
},
"tags": [
"apis"
]
}
},
"/apis/{tenant_namespace}/{name}": {
"get": {
"summary": "Retrieve a specific API/service.",
"description": "",
"operationId": "getAPI",
"parameters": [
{
"in": "header",
"name": "Accept",
"description": "Specifies the format of the body of the response. Valid value is application/json and if header is not sent, the default value of application/json will be used.",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "tenant_namespace",
"in": "path",
"description": "the service's tenant_namespace",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "name",
"in": "path",
"description": "existing service name",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "successful operation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/API"
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RequestError"
}
}
}
},
"404": {
"description": "Service not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RequestError"
}
}
}
},
"500": {
"description": "Unexpected Runtime error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RequestError"
}
}
}
}
},
"tags": [
"apis"
]
},
"delete": {
"summary": "Removes an API/service.",
"description": "",
"operationId": "deleteAPI",
"parameters": [
{
"in": "header",
"name": "Accept",
"description": "Specifies the format of the body of the response. Valid value is application/json and if header is not sent, the default value of application/json will be used.",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "tenant_namespace",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "name",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"204": {
"description": "No content"
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RequestError"
}
}
}
},
"404": {
"description": "Service not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RequestError"
}
}
}
},
"500": {
"description": "Unexpected Runtime error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RequestError"
}
}
}
}
},
"tags": [
"apis"
]
},
"patch": {
"summary": "Updates an existing API/service.",
"description": "",
"operationId": "updateAPI",
"parameters": [
{
"in": "header",
"name": "Content-Type",
"description": "Specifies the format of the body of the request. Valid value is application/json.",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "header",
"name": "Accept",
"description": "Specifies the format of the body of the response. Valid value is application/json and if header is not sent, the default value of application/json will be used.",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "tenant_namespace",
"in": "path",
"description": "the service's tenant_namespace",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "name",
"in": "path",
"description": "existing service name or id",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/API"
}
}
},
"description": "updated service object",
"required": true
},
"responses": {
"200": {
"description": "successful operation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/API"
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RequestError"
}
}
}
},
"404": {
"description": "Service not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RequestError"
}
}
}
},
"500": {
"description": "Unexpected Runtime error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RequestError"
}
}
}
}
},
"tags": [
"apis"
]
}
}
},
"components": {
"schemas": {
"API": {
"type": "object",
"required": [
"tenant_namespace",
"name"
],
"properties": {
"tenant_namespace": {
"type": "string",
"description": "The provider's tenant_namespace (e.g. com.att.lgw)."
},
"name": {
"type": "string"
},
"hosts": {
"type": "array",
"description": "A list of domain names that point to your API. For example: [ \"example.com\" ]. At least one of hosts, uris, or methods should be specified.",
"items": {
"type": "string"
}
},
"uris": {
"type": "array",
"description": "A list of URIs prefixes that point to your API. For example: [ \"/my-path\" ]. At least one of hosts, uris, or methods should be specified.",
"items": {
"type": "string"
}
},
"methods": {
"type": "array",
"description": "A comma-separated list of HTTP methods that point to your API. For example: [ \"GET\", \"POST\" ]. For example: example.com. At least one of hosts, uris, or methods should be specified.",
"items": {
"type": "string"
}
},
"retries": {
"type": "integer",
"format": "int32",
"description": "The number of retries to execute upon failure to proxy. The default is 5."
},
"plugins": {
"type": "array",
"description": "Zero or more plugins to apply to the API.",
"items": {
"$ref": "#/components/schemas/Ratelimiting"
}
},
"created_at": {
"type": "integer",
"format": "int64"
},
"grm_service_name": {
"type": "string"
},
"grm_service_version": {
"type": "string"
},
"grm_environment_context": {
"type": "string"
},
"grm_partner": {
"type": "string"
},
"grm_route_offer": {
"type": "string"
},
"grm_subcontext": {
"type": "string"
},
"upstream_url": {
"type": "string",
"description": "The base target URL that points to your GRM-registered service. This will always present in responses, but only required in requests if GRM properties are not provided."
},
"strip_uri": {
"type": "boolean",
"description": "When matching an API via one of the uris prefixes, strip that matching prefix from the upstream URI to be requested. ",
"default": true
},
"preserve_host": {
"type": "boolean",
"description": "When matching an API via one of the hosts domain names, make sure the request Host header is forwarded to the upstream service. By default, this is false, and the upstream Host header will be extracted from the configured upstream_url."
},
"https_only": {
"type": "boolean",
"description": "To be enabled if you wish to only serve an API through HTTPS, on the appropriate port. ",
"default": false
},
"http_if_terminated": {
"type": "boolean",
"description": "Consider the X-Forwarded-Proto header when enforcing HTTPS only traffic. ",
"default": false
},
"upstream_connect_timeout": {
"type": "integer",
"format": "int32",
"description": "The timeout in milliseconds for establishing a connection to your upstream service. Defaults to 60000."
},
"upstream_read_timeout": {
"type": "integer",
"format": "int32",
"description": "The timeout in milliseconds between two successive read operations for transmitting a request to your upstream service.",
"default": 60000
},
"upstream_send_timeout": {
"type": "integer",
"format": "int32",
"description": "The timeout in milliseconds between two successive write operations for transmitting a request to your upstream service.",
"default": 60000
}
},
"description": "An API object represents an LGW api along with any associated plugins."
},
"Ratelimiting": {
"type": "object",
"properties": {
"tenant_namespace": {
"type": "string",
"description": "The api owning provider's tenant tenant_namespace (e.g. com.att.lgw)."
},
"apiname": {
"type": "string",
"description": "The name of the api the operation applies to"
},
"consumer": {
"type": "string",
"description": "The name of the specific consumer the operation applies to, if applicable"
},
"ratelimit": {
"$ref": "#/components/schemas/Ratelimit"
}
},
"required": [
"apiname",
"tenant_namespace"
]
},
"Ratelimit": {
"type": "object",
"description": "The defined rate limits. One or more must exist in each configuration.",
"properties": {
"config.second": {
"type": "integer",
"description": "The maximum number of transactions allowed each second by this ratelimiting configuration."
},
"config.minute": {
"type": "integer",
"description": "The maximum number of transactions allowed each minute by this ratelimiting configuration."
},
"config.hour": {
"type": "integer",
"description": "The maximum number of transactions allowed each hour by this ratelimiting configuration."
},
"config.day": {
"type": "integer",
"description": "The maximum number of transactions allowed each day by this ratelimiting configuration."
},
"config.month": {
"type": "integer",
"description": "The maximum number of transactions allowed each month by this ratelimiting configuration."
},
"config.year": {
"type": "integer",
"description": "The maximum number of transactions allowed each year by this ratelimiting configuration."
}
}
},
"RequestError": {
"type": "object",
"required": [
"errorId",
"message",
"variables",
"error",
"errorUrl"
],
"properties": {
"error": {
"type": "object",
"description": "Container for service exception",
"properties": {
"errorId": {
"type": "string",
"description": "The id for the error",
"example": "General-0003"
},
"message": {
"type": "string",
"description": "The error text for the error or the error message from the back end",
"example": "Error response format is not specified"
},
"errorUrl": {
"type": "string",
"description": "The error text for the error",
"example": "http://developer.att.com/apis/errors?id=General-0003"
},
"variables": {
"type": "string",
"description": "The variables that correspond to the error text",
"example": "[ Accept Header ]"
}
}
}
}
}
},
"requestBodies": {
"CompleteRateLimit": {
"description": "Definition of a new rate limiting configuration. The apiname field is required. If no consumer is specified, the configuration is the default rate limit for each consumer on the api, unless otherwise specified. If a consumer is specified, the rate limiting configuration applies to that consumer for that api and overrides the api default. One or more rate limits must be included.",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Ratelimiting"
}
}
}
},
"Ratelimit": {
"description": "Defined rate limits. One or more must exist in each rate limiting configuration.",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Ratelimit"
}
}
}
}
}
}
}