apib2swagger 1.15.0 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/nodejs.yml +1 -1
- package/.travis.yml +1 -1
- package/Dockerfile +1 -1
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/mson_to_json_schema.js +1 -0
- package/src/requests.js +18 -3
- package/src/responses.js +7 -1
- package/test/input/Issue-#35.md +6 -0
- package/test/input/Issue-#72.md +43 -0
- package/test/output/01. Simplest API.json +2 -1
- package/test/output/01. Simplest API.ref.json +2 -1
- package/test/output/02. Resource and Actions.json +6 -2
- package/test/output/02. Resource and Actions.ref.json +6 -2
- package/test/output/03. Named Resource and Actions.json +6 -2
- package/test/output/03. Named Resource and Actions.ref.json +6 -2
- package/test/output/04. Grouping Resources.json +6 -2
- package/test/output/04. Grouping Resources.ref.json +6 -2
- package/test/output/05. Responses.json +17 -2
- package/test/output/05. Responses.ref.json +17 -2
- package/test/output/06. Requests.json +17 -1
- package/test/output/06. Requests.ref.json +17 -1
- package/test/output/07. Parameters.json +55 -2
- package/test/output/07. Parameters.ref.json +55 -2
- package/test/output/08. Attributes.json +2 -1
- package/test/output/08. Attributes.ref.json +2 -1
- package/test/output/09. Advanced Attributes.json +7 -2
- package/test/output/09. Advanced Attributes.ref.json +7 -2
- package/test/output/10. Data Structures.json +7 -2
- package/test/output/10. Data Structures.ref.json +7 -2
- package/test/output/11. Resource Model.json +6 -1
- package/test/output/11. Resource Model.ref.json +6 -1
- package/test/output/12. Advanced Action.json +69 -3
- package/test/output/12. Advanced Action.ref.json +69 -3
- package/test/output/13. Named Endpoints.json +6 -0
- package/test/output/13. Named Endpoints.ref.json +6 -0
- package/test/output/Attributes.json +3 -0
- package/test/output/Attributes.ref.json +3 -0
- package/test/output/Gist Fox API + Auth.json +76 -7
- package/test/output/Gist Fox API + Auth.ref.json +76 -7
- package/test/output/Issue-#15.json +6 -3
- package/test/output/Issue-#15.ref.json +6 -3
- package/test/output/Issue-#23.json +3 -0
- package/test/output/Issue-#23.ref.json +3 -0
- package/test/output/Issue-#26.json +5 -1
- package/test/output/Issue-#26.ref.json +5 -1
- package/test/output/Issue-#29.json +5 -1
- package/test/output/Issue-#29.ref.json +5 -1
- package/test/output/Issue-#33.json +2 -1
- package/test/output/Issue-#33.ref.json +2 -1
- package/test/output/Issue-#35.json +9 -0
- package/test/output/Issue-#35.ref.json +9 -0
- package/test/output/Issue-#36.json +2 -1
- package/test/output/Issue-#36.ref.json +2 -1
- package/test/output/Issue-#38.bearer.json +3 -0
- package/test/output/Issue-#38.json +3 -0
- package/test/output/Issue-#38.ref.json +3 -0
- package/test/output/Issue-#49.json +4 -2
- package/test/output/Issue-#49.ref.json +4 -2
- package/test/output/Issue-#57.json +3 -0
- package/test/output/Issue-#57.ref.json +3 -0
- package/test/output/Issue-#72.json +170 -0
- package/test/output/Issue-#72.ref.json +168 -0
- package/test/output/OpenAPI3_responses.json +240 -232
- package/test/output/OpenAPI3_responses.ref.json +231 -223
- package/test/output/Schema.json +20 -0
- package/test/output/Schema.ref.json +20 -0
- package/test/output/apiblueprint_uber.json +10 -5
- package/test/output/apiblueprint_uber.ref.json +10 -5
- package/test/output/apiblueprint_valid_simple.json +76 -7
- package/test/output/apiblueprint_valid_simple.ref.json +76 -7
- package/test/output/schema_without_body.json +52 -49
- package/test/output/schema_without_body.ref.json +52 -49
|
@@ -31,6 +31,57 @@
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
+
},
|
|
35
|
+
"schema": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"properties": {
|
|
38
|
+
"_links": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"properties": {
|
|
41
|
+
"self": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"properties": {
|
|
44
|
+
"href": {
|
|
45
|
+
"type": "string"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"gists": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"properties": {
|
|
52
|
+
"href": {
|
|
53
|
+
"type": "string"
|
|
54
|
+
},
|
|
55
|
+
"templated": {
|
|
56
|
+
"type": "boolean"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"authorization": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"properties": {
|
|
63
|
+
"href": {
|
|
64
|
+
"type": "string"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"example": {
|
|
72
|
+
"_links": {
|
|
73
|
+
"self": {
|
|
74
|
+
"href": "/"
|
|
75
|
+
},
|
|
76
|
+
"gists": {
|
|
77
|
+
"href": "/gists?{since}",
|
|
78
|
+
"templated": true
|
|
79
|
+
},
|
|
80
|
+
"authorization": {
|
|
81
|
+
"href": "/authorization"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
34
85
|
}
|
|
35
86
|
}
|
|
36
87
|
},
|
|
@@ -41,7 +92,8 @@
|
|
|
41
92
|
"parameters": [],
|
|
42
93
|
"produces": [
|
|
43
94
|
"application/hal+json"
|
|
44
|
-
]
|
|
95
|
+
],
|
|
96
|
+
"consumes": []
|
|
45
97
|
}
|
|
46
98
|
},
|
|
47
99
|
"/gists/{id}": {
|
|
@@ -81,7 +133,8 @@
|
|
|
81
133
|
"required": false,
|
|
82
134
|
"type": "string"
|
|
83
135
|
}
|
|
84
|
-
]
|
|
136
|
+
],
|
|
137
|
+
"consumes": []
|
|
85
138
|
},
|
|
86
139
|
"patch": {
|
|
87
140
|
"responses": {
|
|
@@ -134,6 +187,9 @@
|
|
|
134
187
|
}
|
|
135
188
|
}
|
|
136
189
|
}
|
|
190
|
+
],
|
|
191
|
+
"consumes": [
|
|
192
|
+
"application/json"
|
|
137
193
|
]
|
|
138
194
|
},
|
|
139
195
|
"delete": {
|
|
@@ -165,7 +221,8 @@
|
|
|
165
221
|
"required": false,
|
|
166
222
|
"type": "string"
|
|
167
223
|
}
|
|
168
|
-
]
|
|
224
|
+
],
|
|
225
|
+
"consumes": []
|
|
169
226
|
}
|
|
170
227
|
},
|
|
171
228
|
"/gists": {
|
|
@@ -224,7 +281,8 @@
|
|
|
224
281
|
],
|
|
225
282
|
"produces": [
|
|
226
283
|
"application/hal+json"
|
|
227
|
-
]
|
|
284
|
+
],
|
|
285
|
+
"consumes": []
|
|
228
286
|
},
|
|
229
287
|
"post": {
|
|
230
288
|
"responses": {
|
|
@@ -274,6 +332,9 @@
|
|
|
274
332
|
}
|
|
275
333
|
}
|
|
276
334
|
}
|
|
335
|
+
],
|
|
336
|
+
"consumes": [
|
|
337
|
+
"application/json"
|
|
277
338
|
]
|
|
278
339
|
}
|
|
279
340
|
},
|
|
@@ -307,7 +368,8 @@
|
|
|
307
368
|
"required": false,
|
|
308
369
|
"type": "string"
|
|
309
370
|
}
|
|
310
|
-
]
|
|
371
|
+
],
|
|
372
|
+
"consumes": []
|
|
311
373
|
},
|
|
312
374
|
"delete": {
|
|
313
375
|
"responses": {
|
|
@@ -338,7 +400,8 @@
|
|
|
338
400
|
"required": false,
|
|
339
401
|
"type": "string"
|
|
340
402
|
}
|
|
341
|
-
]
|
|
403
|
+
],
|
|
404
|
+
"consumes": []
|
|
342
405
|
},
|
|
343
406
|
"get": {
|
|
344
407
|
"responses": {
|
|
@@ -376,7 +439,8 @@
|
|
|
376
439
|
"required": false,
|
|
377
440
|
"type": "string"
|
|
378
441
|
}
|
|
379
|
-
]
|
|
442
|
+
],
|
|
443
|
+
"consumes": []
|
|
380
444
|
}
|
|
381
445
|
},
|
|
382
446
|
"/authorization": {
|
|
@@ -402,6 +466,7 @@
|
|
|
402
466
|
"Access Authorization and Control"
|
|
403
467
|
],
|
|
404
468
|
"parameters": [],
|
|
469
|
+
"consumes": [],
|
|
405
470
|
"security": [
|
|
406
471
|
{
|
|
407
472
|
"basic": []
|
|
@@ -444,6 +509,9 @@
|
|
|
444
509
|
}
|
|
445
510
|
}
|
|
446
511
|
],
|
|
512
|
+
"consumes": [
|
|
513
|
+
"application/json"
|
|
514
|
+
],
|
|
447
515
|
"security": [
|
|
448
516
|
{
|
|
449
517
|
"basic": []
|
|
@@ -465,6 +533,7 @@
|
|
|
465
533
|
"Access Authorization and Control"
|
|
466
534
|
],
|
|
467
535
|
"parameters": [],
|
|
536
|
+
"consumes": [],
|
|
468
537
|
"security": [
|
|
469
538
|
{
|
|
470
539
|
"basic": []
|
|
@@ -31,6 +31,57 @@
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
+
},
|
|
35
|
+
"schema": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"properties": {
|
|
38
|
+
"_links": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"properties": {
|
|
41
|
+
"self": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"properties": {
|
|
44
|
+
"href": {
|
|
45
|
+
"type": "string"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"gists": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"properties": {
|
|
52
|
+
"href": {
|
|
53
|
+
"type": "string"
|
|
54
|
+
},
|
|
55
|
+
"templated": {
|
|
56
|
+
"type": "boolean"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"authorization": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"properties": {
|
|
63
|
+
"href": {
|
|
64
|
+
"type": "string"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"example": {
|
|
72
|
+
"_links": {
|
|
73
|
+
"self": {
|
|
74
|
+
"href": "/"
|
|
75
|
+
},
|
|
76
|
+
"gists": {
|
|
77
|
+
"href": "/gists?{since}",
|
|
78
|
+
"templated": true
|
|
79
|
+
},
|
|
80
|
+
"authorization": {
|
|
81
|
+
"href": "/authorization"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
34
85
|
}
|
|
35
86
|
}
|
|
36
87
|
},
|
|
@@ -41,7 +92,8 @@
|
|
|
41
92
|
"parameters": [],
|
|
42
93
|
"produces": [
|
|
43
94
|
"application/hal+json"
|
|
44
|
-
]
|
|
95
|
+
],
|
|
96
|
+
"consumes": []
|
|
45
97
|
}
|
|
46
98
|
},
|
|
47
99
|
"/gists/{id}": {
|
|
@@ -81,7 +133,8 @@
|
|
|
81
133
|
"required": false,
|
|
82
134
|
"type": "string"
|
|
83
135
|
}
|
|
84
|
-
]
|
|
136
|
+
],
|
|
137
|
+
"consumes": []
|
|
85
138
|
},
|
|
86
139
|
"patch": {
|
|
87
140
|
"responses": {
|
|
@@ -134,6 +187,9 @@
|
|
|
134
187
|
}
|
|
135
188
|
}
|
|
136
189
|
}
|
|
190
|
+
],
|
|
191
|
+
"consumes": [
|
|
192
|
+
"application/json"
|
|
137
193
|
]
|
|
138
194
|
},
|
|
139
195
|
"delete": {
|
|
@@ -165,7 +221,8 @@
|
|
|
165
221
|
"required": false,
|
|
166
222
|
"type": "string"
|
|
167
223
|
}
|
|
168
|
-
]
|
|
224
|
+
],
|
|
225
|
+
"consumes": []
|
|
169
226
|
}
|
|
170
227
|
},
|
|
171
228
|
"/gists": {
|
|
@@ -224,7 +281,8 @@
|
|
|
224
281
|
],
|
|
225
282
|
"produces": [
|
|
226
283
|
"application/hal+json"
|
|
227
|
-
]
|
|
284
|
+
],
|
|
285
|
+
"consumes": []
|
|
228
286
|
},
|
|
229
287
|
"post": {
|
|
230
288
|
"responses": {
|
|
@@ -274,6 +332,9 @@
|
|
|
274
332
|
}
|
|
275
333
|
}
|
|
276
334
|
}
|
|
335
|
+
],
|
|
336
|
+
"consumes": [
|
|
337
|
+
"application/json"
|
|
277
338
|
]
|
|
278
339
|
}
|
|
279
340
|
},
|
|
@@ -307,7 +368,8 @@
|
|
|
307
368
|
"required": false,
|
|
308
369
|
"type": "string"
|
|
309
370
|
}
|
|
310
|
-
]
|
|
371
|
+
],
|
|
372
|
+
"consumes": []
|
|
311
373
|
},
|
|
312
374
|
"delete": {
|
|
313
375
|
"responses": {
|
|
@@ -338,7 +400,8 @@
|
|
|
338
400
|
"required": false,
|
|
339
401
|
"type": "string"
|
|
340
402
|
}
|
|
341
|
-
]
|
|
403
|
+
],
|
|
404
|
+
"consumes": []
|
|
342
405
|
},
|
|
343
406
|
"get": {
|
|
344
407
|
"responses": {
|
|
@@ -376,7 +439,8 @@
|
|
|
376
439
|
"required": false,
|
|
377
440
|
"type": "string"
|
|
378
441
|
}
|
|
379
|
-
]
|
|
442
|
+
],
|
|
443
|
+
"consumes": []
|
|
380
444
|
}
|
|
381
445
|
},
|
|
382
446
|
"/authorization": {
|
|
@@ -402,6 +466,7 @@
|
|
|
402
466
|
"Access Authorization and Control"
|
|
403
467
|
],
|
|
404
468
|
"parameters": [],
|
|
469
|
+
"consumes": [],
|
|
405
470
|
"security": [
|
|
406
471
|
{
|
|
407
472
|
"basic": []
|
|
@@ -444,6 +509,9 @@
|
|
|
444
509
|
}
|
|
445
510
|
}
|
|
446
511
|
],
|
|
512
|
+
"consumes": [
|
|
513
|
+
"application/json"
|
|
514
|
+
],
|
|
447
515
|
"security": [
|
|
448
516
|
{
|
|
449
517
|
"basic": []
|
|
@@ -465,6 +533,7 @@
|
|
|
465
533
|
"Access Authorization and Control"
|
|
466
534
|
],
|
|
467
535
|
"parameters": [],
|
|
536
|
+
"consumes": [],
|
|
468
537
|
"security": [
|
|
469
538
|
{
|
|
470
539
|
"basic": []
|
|
@@ -1,52 +1,55 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
"summary": "Some resource",
|
|
21
|
-
"operationId": "Some resource",
|
|
22
|
-
"description": "",
|
|
23
|
-
"tags": [],
|
|
24
|
-
"parameters": [
|
|
25
|
-
{
|
|
26
|
-
"name": "body",
|
|
27
|
-
"in": "body",
|
|
28
|
-
"schema": {
|
|
29
|
-
"type": "object",
|
|
30
|
-
"properties": {
|
|
31
|
-
"prop1": {
|
|
32
|
-
"type": "string"
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"required": [
|
|
36
|
-
"prop1"
|
|
37
|
-
]
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
],
|
|
41
|
-
"produces": [
|
|
42
|
-
"text/plain"
|
|
43
|
-
]
|
|
2
|
+
"swagger": "2.0",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "",
|
|
5
|
+
"version": "",
|
|
6
|
+
"description": ""
|
|
7
|
+
},
|
|
8
|
+
"paths": {
|
|
9
|
+
"/some/resource": {
|
|
10
|
+
"post": {
|
|
11
|
+
"responses": {
|
|
12
|
+
"200": {
|
|
13
|
+
"description": "OK",
|
|
14
|
+
"headers": {},
|
|
15
|
+
"examples": {
|
|
16
|
+
"text/plain": ""
|
|
44
17
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"Some resource"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"summary": "Some resource",
|
|
21
|
+
"operationId": "Some resource",
|
|
22
|
+
"description": "",
|
|
23
|
+
"tags": [],
|
|
24
|
+
"parameters": [
|
|
25
|
+
{
|
|
26
|
+
"name": "body",
|
|
27
|
+
"in": "body",
|
|
28
|
+
"schema": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"properties": {
|
|
31
|
+
"prop1": {
|
|
32
|
+
"type": "string"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"required": [
|
|
36
|
+
"prop1"
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"produces": [
|
|
42
|
+
"text/plain"
|
|
43
|
+
],
|
|
44
|
+
"consumes": [
|
|
45
|
+
"application/json"
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"definitions": {
|
|
51
|
+
"Some resource": {}
|
|
52
|
+
},
|
|
53
|
+
"securityDefinitions": {},
|
|
54
|
+
"tags": []
|
|
52
55
|
}
|
|
@@ -1,52 +1,55 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
"summary": "Some resource",
|
|
21
|
-
"operationId": "Some resource",
|
|
22
|
-
"description": "",
|
|
23
|
-
"tags": [],
|
|
24
|
-
"parameters": [
|
|
25
|
-
{
|
|
26
|
-
"name": "body",
|
|
27
|
-
"in": "body",
|
|
28
|
-
"schema": {
|
|
29
|
-
"type": "object",
|
|
30
|
-
"properties": {
|
|
31
|
-
"prop1": {
|
|
32
|
-
"type": "string"
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"required": [
|
|
36
|
-
"prop1"
|
|
37
|
-
]
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
],
|
|
41
|
-
"produces": [
|
|
42
|
-
"text/plain"
|
|
43
|
-
]
|
|
2
|
+
"swagger": "2.0",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "",
|
|
5
|
+
"version": "",
|
|
6
|
+
"description": ""
|
|
7
|
+
},
|
|
8
|
+
"paths": {
|
|
9
|
+
"/some/resource": {
|
|
10
|
+
"post": {
|
|
11
|
+
"responses": {
|
|
12
|
+
"200": {
|
|
13
|
+
"description": "OK",
|
|
14
|
+
"headers": {},
|
|
15
|
+
"examples": {
|
|
16
|
+
"text/plain": ""
|
|
44
17
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"Some resource"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"summary": "Some resource",
|
|
21
|
+
"operationId": "Some resource",
|
|
22
|
+
"description": "",
|
|
23
|
+
"tags": [],
|
|
24
|
+
"parameters": [
|
|
25
|
+
{
|
|
26
|
+
"name": "body",
|
|
27
|
+
"in": "body",
|
|
28
|
+
"schema": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"properties": {
|
|
31
|
+
"prop1": {
|
|
32
|
+
"type": "string"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"required": [
|
|
36
|
+
"prop1"
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"produces": [
|
|
42
|
+
"text/plain"
|
|
43
|
+
],
|
|
44
|
+
"consumes": [
|
|
45
|
+
"application/json"
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"definitions": {
|
|
51
|
+
"Some resource": {}
|
|
52
|
+
},
|
|
53
|
+
"securityDefinitions": {},
|
|
54
|
+
"tags": []
|
|
52
55
|
}
|