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": []
|
|
@@ -49,7 +49,8 @@
|
|
|
49
49
|
"parameters": [],
|
|
50
50
|
"produces": [
|
|
51
51
|
"application/json"
|
|
52
|
-
]
|
|
52
|
+
],
|
|
53
|
+
"consumes": []
|
|
53
54
|
}
|
|
54
55
|
},
|
|
55
56
|
"/users": {
|
|
@@ -91,7 +92,8 @@
|
|
|
91
92
|
"parameters": [],
|
|
92
93
|
"produces": [
|
|
93
94
|
"application/json"
|
|
94
|
-
]
|
|
95
|
+
],
|
|
96
|
+
"consumes": []
|
|
95
97
|
}
|
|
96
98
|
},
|
|
97
99
|
"/users/{user_id}": {
|
|
@@ -205,7 +207,8 @@
|
|
|
205
207
|
],
|
|
206
208
|
"produces": [
|
|
207
209
|
"application/json"
|
|
208
|
-
]
|
|
210
|
+
],
|
|
211
|
+
"consumes": []
|
|
209
212
|
}
|
|
210
213
|
}
|
|
211
214
|
},
|
|
@@ -51,7 +51,8 @@
|
|
|
51
51
|
"parameters": [],
|
|
52
52
|
"produces": [
|
|
53
53
|
"application/json"
|
|
54
|
-
]
|
|
54
|
+
],
|
|
55
|
+
"consumes": []
|
|
55
56
|
}
|
|
56
57
|
},
|
|
57
58
|
"/users": {
|
|
@@ -93,7 +94,8 @@
|
|
|
93
94
|
"parameters": [],
|
|
94
95
|
"produces": [
|
|
95
96
|
"application/json"
|
|
96
|
-
]
|
|
97
|
+
],
|
|
98
|
+
"consumes": []
|
|
97
99
|
}
|
|
98
100
|
},
|
|
99
101
|
"/users/{user_id}": {
|
|
@@ -144,7 +146,8 @@
|
|
|
144
146
|
],
|
|
145
147
|
"produces": [
|
|
146
148
|
"application/json"
|
|
147
|
-
]
|
|
149
|
+
],
|
|
150
|
+
"consumes": []
|
|
148
151
|
}
|
|
149
152
|
}
|
|
150
153
|
},
|
|
@@ -78,7 +78,8 @@
|
|
|
78
78
|
],
|
|
79
79
|
"produces": [
|
|
80
80
|
"application/json"
|
|
81
|
-
]
|
|
81
|
+
],
|
|
82
|
+
"consumes": []
|
|
82
83
|
},
|
|
83
84
|
"put": {
|
|
84
85
|
"responses": {
|
|
@@ -158,6 +159,9 @@
|
|
|
158
159
|
],
|
|
159
160
|
"produces": [
|
|
160
161
|
"application/json"
|
|
162
|
+
],
|
|
163
|
+
"consumes": [
|
|
164
|
+
"application/json"
|
|
161
165
|
]
|
|
162
166
|
}
|
|
163
167
|
}
|
|
@@ -78,7 +78,8 @@
|
|
|
78
78
|
],
|
|
79
79
|
"produces": [
|
|
80
80
|
"application/json"
|
|
81
|
-
]
|
|
81
|
+
],
|
|
82
|
+
"consumes": []
|
|
82
83
|
},
|
|
83
84
|
"put": {
|
|
84
85
|
"responses": {
|
|
@@ -158,6 +159,9 @@
|
|
|
158
159
|
],
|
|
159
160
|
"produces": [
|
|
160
161
|
"application/json"
|
|
162
|
+
],
|
|
163
|
+
"consumes": [
|
|
164
|
+
"application/json"
|
|
161
165
|
]
|
|
162
166
|
}
|
|
163
167
|
}
|
|
@@ -52,7 +52,8 @@
|
|
|
52
52
|
"parameters": [],
|
|
53
53
|
"produces": [
|
|
54
54
|
"application/json"
|
|
55
|
-
]
|
|
55
|
+
],
|
|
56
|
+
"consumes": []
|
|
56
57
|
}
|
|
57
58
|
},
|
|
58
59
|
"/users": {
|
|
@@ -89,7 +90,8 @@
|
|
|
89
90
|
"parameters": [],
|
|
90
91
|
"produces": [
|
|
91
92
|
"application/json"
|
|
92
|
-
]
|
|
93
|
+
],
|
|
94
|
+
"consumes": []
|
|
93
95
|
}
|
|
94
96
|
}
|
|
95
97
|
},
|
|
@@ -37,7 +37,8 @@
|
|
|
37
37
|
"parameters": [],
|
|
38
38
|
"produces": [
|
|
39
39
|
"application/json"
|
|
40
|
-
]
|
|
40
|
+
],
|
|
41
|
+
"consumes": []
|
|
41
42
|
}
|
|
42
43
|
},
|
|
43
44
|
"/users": {
|
|
@@ -74,7 +75,8 @@
|
|
|
74
75
|
"parameters": [],
|
|
75
76
|
"produces": [
|
|
76
77
|
"application/json"
|
|
77
|
-
]
|
|
78
|
+
],
|
|
79
|
+
"consumes": []
|
|
78
80
|
}
|
|
79
81
|
}
|
|
80
82
|
},
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
{
|
|
2
|
+
"swagger": "2.0",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "",
|
|
5
|
+
"version": "",
|
|
6
|
+
"description": ""
|
|
7
|
+
},
|
|
8
|
+
"paths": {
|
|
9
|
+
"/api/scim/v2/Users": {
|
|
10
|
+
"post": {
|
|
11
|
+
"responses": {
|
|
12
|
+
"201": {
|
|
13
|
+
"description": "Created",
|
|
14
|
+
"headers": {},
|
|
15
|
+
"examples": {
|
|
16
|
+
"application/scim+json": {}
|
|
17
|
+
},
|
|
18
|
+
"schema": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"properties": {}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"summary": "Create a user",
|
|
25
|
+
"operationId": "Create a user",
|
|
26
|
+
"description": "",
|
|
27
|
+
"tags": [],
|
|
28
|
+
"parameters": [
|
|
29
|
+
{
|
|
30
|
+
"name": "body",
|
|
31
|
+
"in": "body",
|
|
32
|
+
"schema": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"properties": {
|
|
35
|
+
"schemas": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"items": {
|
|
38
|
+
"type": "string"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"userName": {
|
|
42
|
+
"type": "string"
|
|
43
|
+
},
|
|
44
|
+
"name": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"properties": {
|
|
47
|
+
"givenName": {
|
|
48
|
+
"type": "string"
|
|
49
|
+
},
|
|
50
|
+
"familyName": {
|
|
51
|
+
"type": "string"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"emails": {
|
|
56
|
+
"type": "array",
|
|
57
|
+
"items": {
|
|
58
|
+
"type": "object",
|
|
59
|
+
"properties": {
|
|
60
|
+
"primary": {
|
|
61
|
+
"type": "boolean"
|
|
62
|
+
},
|
|
63
|
+
"value": {
|
|
64
|
+
"type": "string"
|
|
65
|
+
},
|
|
66
|
+
"type": {
|
|
67
|
+
"type": "string"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"displayName": {
|
|
73
|
+
"type": "string"
|
|
74
|
+
},
|
|
75
|
+
"externalId": {
|
|
76
|
+
"type": "string"
|
|
77
|
+
},
|
|
78
|
+
"active": {
|
|
79
|
+
"type": "boolean"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"example": {
|
|
83
|
+
"schemas": [
|
|
84
|
+
"urn:ietf:params:scim:schemas:core:2.0:User"
|
|
85
|
+
],
|
|
86
|
+
"userName": "fredsmith",
|
|
87
|
+
"name": {
|
|
88
|
+
"givenName": "Fred",
|
|
89
|
+
"familyName": "Smith"
|
|
90
|
+
},
|
|
91
|
+
"emails": [
|
|
92
|
+
{
|
|
93
|
+
"primary": true,
|
|
94
|
+
"value": "fred@example.com",
|
|
95
|
+
"type": "work"
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
"displayName": "Fred Smith",
|
|
99
|
+
"externalId": "fred-external-id",
|
|
100
|
+
"active": true
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
"produces": [
|
|
106
|
+
"application/scim+json"
|
|
107
|
+
],
|
|
108
|
+
"consumes": [
|
|
109
|
+
"application/scim+json"
|
|
110
|
+
],
|
|
111
|
+
"security": [
|
|
112
|
+
{
|
|
113
|
+
"oauth2": []
|
|
114
|
+
}
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"/api2/scim/v2/Users": {
|
|
119
|
+
"post": {
|
|
120
|
+
"responses": {
|
|
121
|
+
"201": {
|
|
122
|
+
"description": "Created",
|
|
123
|
+
"headers": {},
|
|
124
|
+
"examples": {
|
|
125
|
+
"application/scim+json": {}
|
|
126
|
+
},
|
|
127
|
+
"schema": {
|
|
128
|
+
"type": "object",
|
|
129
|
+
"properties": {}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"summary": "Create a user 2",
|
|
134
|
+
"operationId": "Create a user 2",
|
|
135
|
+
"description": "",
|
|
136
|
+
"tags": [],
|
|
137
|
+
"parameters": [],
|
|
138
|
+
"produces": [
|
|
139
|
+
"application/scim+json"
|
|
140
|
+
],
|
|
141
|
+
"consumes": [
|
|
142
|
+
"application/scim+json"
|
|
143
|
+
],
|
|
144
|
+
"security": [
|
|
145
|
+
{
|
|
146
|
+
"oauth2": []
|
|
147
|
+
}
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"definitions": {
|
|
153
|
+
"Create a user": {},
|
|
154
|
+
"Create a user 2": {},
|
|
155
|
+
"ExistingUser": {
|
|
156
|
+
"type": "object",
|
|
157
|
+
"properties": {}
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"securityDefinitions": {
|
|
161
|
+
"oauth2": {
|
|
162
|
+
"type": "oauth2",
|
|
163
|
+
"flow": "accessCode",
|
|
164
|
+
"authorizationUrl": "",
|
|
165
|
+
"tokenUrl": "",
|
|
166
|
+
"scopes": {}
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"tags": []
|
|
170
|
+
}
|