rapidoc 9.3.6 → 9.3.8
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/.eslintrc +9 -1
- package/dist/index.html +1010 -6
- package/dist/index.html.gz +0 -0
- package/dist/rapidoc-min.js +444 -428
- package/dist/rapidoc-min.js.LICENSE.txt +1 -8
- package/dist/rapidoc-min.js.LICENSE.txt.gz +0 -0
- package/dist/rapidoc-min.js.gz +0 -0
- package/dist/rapidoc-min.js.map +1 -1
- package/dist/rapidoc-min.js.map.gz +0 -0
- package/dist/rapidoc.js +576 -373
- package/dist/report.html +2 -2
- package/index.html +1006 -209
- package/{index1.html → index_bak.html} +13 -6
- package/jsconfig.json +1 -1
- package/package.json +8 -8
- package/src/components/api-request.js +144 -100
- package/src/components/api-response.js +12 -13
- package/src/components/json-tree.js +1 -1
- package/src/components/schema-table.js +16 -6
- package/src/components/schema-tree.js +15 -10
- package/src/json-schema-viewer.js +7 -2
- package/src/rapidoc-mini.js +22 -4
- package/src/rapidoc.js +35 -19
- package/src/styles/border-styles.js +2 -2
- package/src/styles/endpoint-styles.js +13 -10
- package/src/styles/flex-styles.js +1 -1
- package/src/styles/font-styles.js +13 -13
- package/src/styles/input-styles.js +8 -3
- package/src/styles/nav-styles.js +1 -1
- package/src/styles/schema-styles.js +12 -9
- package/src/templates/advance-search-template.js +2 -1
- package/src/templates/callback-template.js +3 -1
- package/src/templates/code-samples-template.js +3 -3
- package/src/templates/endpoint-template.js +33 -28
- package/src/templates/expanded-endpoint-template.js +7 -3
- package/src/templates/json-schema-viewer-template.js +3 -3
- package/src/templates/logo-template.js +1 -1
- package/src/templates/main-body-template.js +6 -17
- package/src/templates/navbar-template.js +6 -6
- package/src/templates/security-scheme-template.js +14 -10
- package/src/utils/common-utils.js +5 -9
- package/src/utils/schema-utils.js +65 -16
- package/src/utils/spec-parser.js +77 -7
- package/src/utils/theme.js +4 -6
package/index.html
CHANGED
|
@@ -1,140 +1,904 @@
|
|
|
1
|
-
<!
|
|
2
|
-
<html
|
|
3
|
-
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<script>
|
|
13
|
-
window.addEventListener('DOMContentLoaded', (event) => {
|
|
14
|
-
const docEl = document.getElementById('thedoc');
|
|
15
|
-
docEl.addEventListener('before-try', (e) => {
|
|
16
|
-
e.detail.request.headers.append('AAA-BBB', 'CCC DDDD');
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
</script>
|
|
20
|
-
|
|
21
|
-
<body>
|
|
22
|
-
<!--
|
|
23
|
-
Some sample spec to try
|
|
24
|
-
https://api.apis.guru/v2/specs/stripe.com/2019-02-19/swagger.json
|
|
25
|
-
https://api.apis.guru/v2/specs/github.com/v3/swagger.json
|
|
26
|
-
https://api.apis.guru/v2/specs/bitbucket.org/2.0/swagger.json
|
|
27
|
-
https://petstore.swagger.io/v2/swagger.json
|
|
28
|
-
https://assets.zuora.com/zuora-documentation/swagger.yaml <<< Large spec with lot of markdown
|
|
29
|
-
./specs/petstore_anyof.yaml <<< contains complex one-of with inline primitives and recursive objects
|
|
30
|
-
./specs/oneof1.yaml <<< nested oneof
|
|
31
|
-
https://cesdev.eng.sonicwall.com/api/q/openapi
|
|
32
|
-
-->
|
|
33
|
-
<rapi-doc
|
|
34
|
-
spec-url = "https://api.apis.guru/v2/specs/azure.com/azureactivedirectory/2017-04-01/swagger.yaml"
|
|
35
|
-
id="thedoc"
|
|
36
|
-
theme = "dark"
|
|
37
|
-
render-style="read"
|
|
38
|
-
schema-style="table"
|
|
39
|
-
show-method-in-nav-bar = "true"
|
|
40
|
-
use-path-in-nav-bar = "true"
|
|
41
|
-
show-components = "true"
|
|
42
|
-
show-info = "true"
|
|
43
|
-
show-header = "true"
|
|
44
|
-
allow-search = "false"
|
|
45
|
-
allow-advanced-search = "true"
|
|
46
|
-
allow-spec-url-load="false"
|
|
47
|
-
allow-spec-file-download="true"
|
|
48
|
-
allow-server-selection = "true"
|
|
49
|
-
allow-authentication = "true"
|
|
50
|
-
update-route="false"
|
|
51
|
-
match-type="regex"
|
|
52
|
-
persist-auth="true"
|
|
53
|
-
scroll-behavior="smooth"
|
|
54
|
-
></rapi-doc>
|
|
55
|
-
<!--
|
|
56
|
-
<rapi-doc-mini
|
|
57
|
-
style= "width:600px; padding:0 10px"
|
|
58
|
-
id = "thedoc"
|
|
59
|
-
spec-url="./specs/code-highlight.yaml"
|
|
60
|
-
theme = "light"
|
|
61
|
-
schema-style = 'table'
|
|
62
|
-
sort-endpoints-by = "method"
|
|
63
|
-
layout = "column"
|
|
64
|
-
match-paths = "post /code"
|
|
65
|
-
paths-expanded = "true"
|
|
66
|
-
> </rapi-doc-mini>
|
|
67
|
-
<br/>
|
|
68
|
-
<rapi-doc-mini
|
|
69
|
-
style= "width:600px; padding:0 10px"
|
|
70
|
-
id = "thedoc"
|
|
71
|
-
spec-url="./specs/code-highlight.yaml"
|
|
72
|
-
theme = "light"
|
|
73
|
-
schema-style = 'table'
|
|
74
|
-
sort-endpoints-by = "method"
|
|
75
|
-
layout = "column"
|
|
76
|
-
match-paths = "get /code"
|
|
77
|
-
> </rapi-doc-mini>
|
|
78
|
-
-->
|
|
79
|
-
|
|
80
|
-
<!--
|
|
81
|
-
|
|
82
|
-
<rapi-doc
|
|
83
|
-
id = "thedoc"
|
|
84
|
-
spec-url="./specs/code-highlight.yaml"
|
|
85
|
-
theme = "light"
|
|
86
|
-
render-style = "view"
|
|
87
|
-
schema-style = 'tree'
|
|
88
|
-
sort-endpoints-by = "method"
|
|
89
|
-
show-info = "false"
|
|
90
|
-
show-header = "false"
|
|
91
|
-
allow-server-selection = "false"
|
|
92
|
-
allow-authentication = "false"
|
|
93
|
-
> </rapi-doc>
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
<rapi-doc
|
|
97
|
-
id = "thedoc"
|
|
98
|
-
spec-url="https://petstore.swagger.io/v2/swagger.json1"
|
|
99
|
-
render-style = "read"
|
|
100
|
-
load-fonts = "false"
|
|
101
|
-
show-header = "false"
|
|
102
|
-
>
|
|
103
|
-
<div slot="nav-logo" style="width:100%; display: flex;justify-content: center;">
|
|
104
|
-
<button class='btn medium' onclick="document.getElementById('thedoc').setAttribute('schema-style', 'table')" >Table</button>
|
|
105
|
-
<button class='btn medium' onclick="document.getElementById('thedoc').setAttribute('schema-style', 'tree')" >Tree</button>
|
|
106
|
-
</div>
|
|
107
|
-
<div slot="put-/pet" style="width:100%; display: flex;justify-content: center;">
|
|
108
|
-
<b style="color:red"> Hello world</b>
|
|
109
|
-
</div>
|
|
110
|
-
</rapi-doc>
|
|
111
|
-
-->
|
|
112
|
-
<!--
|
|
113
|
-
<rapi-doc id = "thedoc" ></rapi-doc>
|
|
114
|
-
<script>
|
|
115
|
-
document.addEventListener('DOMContentLoaded', (event) => {
|
|
116
|
-
let docEl = document.getElementById("thedoc");
|
|
117
|
-
let strSpec = `
|
|
118
|
-
{
|
|
119
|
-
"openapi": "3.0.1",
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<script
|
|
6
|
+
type="module"
|
|
7
|
+
src="https://unpkg.com/rapidoc/dist/rapidoc-min.js"
|
|
8
|
+
></script>
|
|
9
|
+
<script>
|
|
10
|
+
const spec = {
|
|
11
|
+
"openapi": "3.0.0",
|
|
120
12
|
"info": {
|
|
121
|
-
"title": "
|
|
122
|
-
"
|
|
13
|
+
"title": "Providing Examples",
|
|
14
|
+
"description": "Providing Examples",
|
|
15
|
+
"version": "1.0.0"
|
|
123
16
|
},
|
|
124
17
|
"paths": {
|
|
125
|
-
"/
|
|
18
|
+
"/multiple-examples-in-request-parameters/{path-param-1}/{path-param-2}": {
|
|
126
19
|
"get": {
|
|
127
20
|
"tags": [
|
|
128
|
-
"
|
|
21
|
+
"Providing Examples"
|
|
22
|
+
],
|
|
23
|
+
"parameters": [
|
|
24
|
+
{
|
|
25
|
+
"name": "path-param-1",
|
|
26
|
+
"in": "path",
|
|
27
|
+
"schema": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"default": "p1-opt-2"
|
|
30
|
+
},
|
|
31
|
+
"examples": {
|
|
32
|
+
"example1": {
|
|
33
|
+
"value": "p1-opt-1"
|
|
34
|
+
},
|
|
35
|
+
"example2": {
|
|
36
|
+
"value": "p1-opt-2"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"name": "path-param-2",
|
|
42
|
+
"in": "path",
|
|
43
|
+
"schema": {
|
|
44
|
+
"type": "string"
|
|
45
|
+
},
|
|
46
|
+
"examples": {
|
|
47
|
+
"example1": {
|
|
48
|
+
"value": "p2-opt-1"
|
|
49
|
+
},
|
|
50
|
+
"example2": {
|
|
51
|
+
"value": "p2-opt-2"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "age",
|
|
57
|
+
"description": "Single Example",
|
|
58
|
+
"in": "query",
|
|
59
|
+
"schema": {
|
|
60
|
+
"type": "number"
|
|
61
|
+
},
|
|
62
|
+
"example": 24
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "country-code",
|
|
66
|
+
"description": "Multiple examples _(Notice `us` do not have a summary)_",
|
|
67
|
+
"in": "query",
|
|
68
|
+
"schema": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"default": " "
|
|
71
|
+
},
|
|
72
|
+
"examples": {
|
|
73
|
+
"example1": {
|
|
74
|
+
"value": "uk",
|
|
75
|
+
"summary": "United Kingdom"
|
|
76
|
+
},
|
|
77
|
+
"example2": {
|
|
78
|
+
"value": "us"
|
|
79
|
+
},
|
|
80
|
+
"example3": {
|
|
81
|
+
"value": "ch",
|
|
82
|
+
"summary": "China"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "marital-status",
|
|
88
|
+
"in": "query",
|
|
89
|
+
"schema": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"default": "unmarried"
|
|
92
|
+
},
|
|
93
|
+
"examples": {
|
|
94
|
+
"example1": {
|
|
95
|
+
"value": "married"
|
|
96
|
+
},
|
|
97
|
+
"example2": {
|
|
98
|
+
"value": "unmarried"
|
|
99
|
+
},
|
|
100
|
+
"example3": {
|
|
101
|
+
"value": "widowed"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"name": "luckyNumbers",
|
|
107
|
+
"in": "query",
|
|
108
|
+
"schema": {
|
|
109
|
+
"type": "array",
|
|
110
|
+
"items": {
|
|
111
|
+
"type": "number"
|
|
112
|
+
},
|
|
113
|
+
"minItems": 4,
|
|
114
|
+
"maxItems": 4,
|
|
115
|
+
"examples": [
|
|
116
|
+
"",
|
|
117
|
+
" ",
|
|
118
|
+
[
|
|
119
|
+
10
|
|
120
|
+
],
|
|
121
|
+
[
|
|
122
|
+
10,
|
|
123
|
+
20,
|
|
124
|
+
30,
|
|
125
|
+
40
|
|
126
|
+
]
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"/multiple-examples-by-response-type": {
|
|
134
|
+
"get": {
|
|
135
|
+
"description": "Multiple Examples provide for each media-type (`application/json` or `application/json`)",
|
|
136
|
+
"tags": [
|
|
137
|
+
"Providing Examples"
|
|
138
|
+
],
|
|
139
|
+
"responses": {
|
|
140
|
+
"200": {
|
|
141
|
+
"description": "Successful operation",
|
|
142
|
+
"content": {
|
|
143
|
+
"application/json": {
|
|
144
|
+
"schema": {
|
|
145
|
+
"type": "object",
|
|
146
|
+
"properties": {
|
|
147
|
+
"age": {
|
|
148
|
+
"description": "Person Age",
|
|
149
|
+
"type": "integer"
|
|
150
|
+
},
|
|
151
|
+
"fullName": {
|
|
152
|
+
"description": "Person Full name",
|
|
153
|
+
"type": "object",
|
|
154
|
+
"properties": {
|
|
155
|
+
"firstName": {
|
|
156
|
+
"description": "First name",
|
|
157
|
+
"type": "string"
|
|
158
|
+
},
|
|
159
|
+
"lastName": {
|
|
160
|
+
"description": "Last name",
|
|
161
|
+
"type": "string"
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"examples": {
|
|
168
|
+
"valid-json": {
|
|
169
|
+
"summary": "Example with Valid JSON String",
|
|
170
|
+
"description": "If valid JSON is provided in the example, It will be displayed in JSON tree form. Allowing copy/expand/collapse functionality",
|
|
171
|
+
"value": "{\n \"person\": {\n \"fullName\": {\n \"firstName\": \"Mickey\",\n \"lastName\": \"Mouse\"\n },\n \"age\": \"9\"\n }\n}\n"
|
|
172
|
+
},
|
|
173
|
+
"invalid-json": {
|
|
174
|
+
"summary": "Example with Invalid JSON String",
|
|
175
|
+
"description": "Invalid JSON is displayed in text-area as is",
|
|
176
|
+
"value": "{\n person: {\n fullName: {\n firstName: Donald,\n lastName: Duck\n },\n age: 10\n }\n}\n"
|
|
177
|
+
},
|
|
178
|
+
"as-object": {
|
|
179
|
+
"summary": "Example specified as object",
|
|
180
|
+
"value": {
|
|
181
|
+
"fullName": {
|
|
182
|
+
"firstName": "Donald",
|
|
183
|
+
"lastName": "Duck"
|
|
184
|
+
},
|
|
185
|
+
"age": 10
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
"application/xml": {
|
|
191
|
+
"schema": {
|
|
192
|
+
"type": "object",
|
|
193
|
+
"properties": {
|
|
194
|
+
"age": {
|
|
195
|
+
"description": "Person Age",
|
|
196
|
+
"type": "integer"
|
|
197
|
+
},
|
|
198
|
+
"fullName": {
|
|
199
|
+
"description": "Person Full name",
|
|
200
|
+
"type": "object",
|
|
201
|
+
"properties": {
|
|
202
|
+
"firstName": {
|
|
203
|
+
"description": "First name",
|
|
204
|
+
"type": "string"
|
|
205
|
+
},
|
|
206
|
+
"lastName": {
|
|
207
|
+
"description": "Last name",
|
|
208
|
+
"type": "string"
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
"examples": {
|
|
215
|
+
"example-1": {
|
|
216
|
+
"description": "Exmple 1 Description",
|
|
217
|
+
"value": "<root>\n <person>\n <fullName>\n <firstName> Mickey </firstName>\n <lastName> Mouse </lastName>\n </fullName>\n <age> 9 </age>\n </person>\n</root>\n"
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
"/single-example-by-response-type": {
|
|
227
|
+
"get": {
|
|
228
|
+
"summary": "Single Example at schema Level",
|
|
229
|
+
"tags": [
|
|
230
|
+
"Providing Examples"
|
|
231
|
+
],
|
|
232
|
+
"responses": {
|
|
233
|
+
"200": {
|
|
234
|
+
"description": "Successful operation",
|
|
235
|
+
"content": {
|
|
236
|
+
"application/json": {
|
|
237
|
+
"schema": {
|
|
238
|
+
"type": "object",
|
|
239
|
+
"properties": {
|
|
240
|
+
"age": {
|
|
241
|
+
"description": "Person Age",
|
|
242
|
+
"type": "integer"
|
|
243
|
+
},
|
|
244
|
+
"fullName": {
|
|
245
|
+
"description": "Person Full name",
|
|
246
|
+
"type": "object",
|
|
247
|
+
"properties": {
|
|
248
|
+
"firstName": {
|
|
249
|
+
"description": "First name",
|
|
250
|
+
"type": "string"
|
|
251
|
+
},
|
|
252
|
+
"lastName": {
|
|
253
|
+
"description": "Last name",
|
|
254
|
+
"type": "string"
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
"example": "{\n age: 10,\n fullName: {\n firstName: Donald,\n lastName: Duck\n }\n}\n"
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
"/example-with-array-1": {
|
|
268
|
+
"get": {
|
|
269
|
+
"summary": "Single Example at schema Level",
|
|
270
|
+
"tags": [
|
|
271
|
+
"Providing Examples"
|
|
272
|
+
],
|
|
273
|
+
"responses": {
|
|
274
|
+
"200": {
|
|
275
|
+
"description": "Successful operation",
|
|
276
|
+
"content": {
|
|
277
|
+
"application/json": {
|
|
278
|
+
"schema": {
|
|
279
|
+
"$ref": "#/components/schemas/ArrayOfInt-1"
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
"/example-with-array-2": {
|
|
288
|
+
"get": {
|
|
289
|
+
"summary": "Single Example at schema Level",
|
|
290
|
+
"tags": [
|
|
291
|
+
"Providing Examples"
|
|
292
|
+
],
|
|
293
|
+
"responses": {
|
|
294
|
+
"200": {
|
|
295
|
+
"description": "Successful operation",
|
|
296
|
+
"content": {
|
|
297
|
+
"application/json": {
|
|
298
|
+
"schema": {
|
|
299
|
+
"$ref": "#/components/schemas/ArrayOfInt-2"
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
"/object-example-for-a-schema": {
|
|
308
|
+
"get": {
|
|
309
|
+
"summary": "Single example having invalid JSON, under a Schema",
|
|
310
|
+
"tags": [
|
|
311
|
+
"Providing Examples"
|
|
312
|
+
],
|
|
313
|
+
"responses": {
|
|
314
|
+
"200": {
|
|
315
|
+
"description": "Successful operation",
|
|
316
|
+
"content": {
|
|
317
|
+
"application/json": {
|
|
318
|
+
"schema": {
|
|
319
|
+
"type": "object",
|
|
320
|
+
"properties": {
|
|
321
|
+
"age": {
|
|
322
|
+
"description": "Person Age",
|
|
323
|
+
"type": "integer"
|
|
324
|
+
},
|
|
325
|
+
"fullName": {
|
|
326
|
+
"description": "Person Full name",
|
|
327
|
+
"type": "object",
|
|
328
|
+
"properties": {
|
|
329
|
+
"firstName": {
|
|
330
|
+
"description": "First name",
|
|
331
|
+
"type": "string"
|
|
332
|
+
},
|
|
333
|
+
"lastName": {
|
|
334
|
+
"description": "Last name",
|
|
335
|
+
"type": "string"
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
"example": "{\n person: {\n fullName: {\n firstName: Donald,\n lastName: Duck\n },\n age: 10\n }\n}\n"
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
"/array-example-for-a-schema": {
|
|
349
|
+
"get": {
|
|
350
|
+
"summary": "Single Example of Type Array Under a Schema",
|
|
351
|
+
"tags": [
|
|
352
|
+
"Providing Examples"
|
|
353
|
+
],
|
|
354
|
+
"responses": {
|
|
355
|
+
"200": {
|
|
356
|
+
"description": "An array of currency codes",
|
|
357
|
+
"content": {
|
|
358
|
+
"application/json": {
|
|
359
|
+
"schema": {
|
|
360
|
+
"$ref": "#/components/schemas/currencies"
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
"/example-with-simple-object": {
|
|
369
|
+
"get": {
|
|
370
|
+
"summary": "Single Example of Type Array Under a Schema",
|
|
371
|
+
"tags": [
|
|
372
|
+
"Providing Examples"
|
|
373
|
+
],
|
|
374
|
+
"responses": {
|
|
375
|
+
"200": {
|
|
376
|
+
"description": "An array of currency codes",
|
|
377
|
+
"content": {
|
|
378
|
+
"application/json": {
|
|
379
|
+
"schema": {
|
|
380
|
+
"$ref": "#/components/schemas/PersonObject"
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
},
|
|
388
|
+
"/per-field-example-with-root-as-object": {
|
|
389
|
+
"get": {
|
|
390
|
+
"summary": "Root node of the example is an object. and the object is constituted using field level example",
|
|
391
|
+
"tags": [
|
|
392
|
+
"Providing Examples"
|
|
393
|
+
],
|
|
394
|
+
"responses": {
|
|
395
|
+
"200": {
|
|
396
|
+
"description": "Successful operation",
|
|
397
|
+
"content": {
|
|
398
|
+
"application/json": {
|
|
399
|
+
"schema": {
|
|
400
|
+
"type": "object",
|
|
401
|
+
"properties": {
|
|
402
|
+
"age": {
|
|
403
|
+
"description": "Person Age",
|
|
404
|
+
"type": "integer",
|
|
405
|
+
"example": 8
|
|
406
|
+
},
|
|
407
|
+
"fullName": {
|
|
408
|
+
"description": "Person Full name",
|
|
409
|
+
"type": "object",
|
|
410
|
+
"properties": {
|
|
411
|
+
"firstName": {
|
|
412
|
+
"description": "First name",
|
|
413
|
+
"type": "string",
|
|
414
|
+
"example": "Daisy"
|
|
415
|
+
},
|
|
416
|
+
"lastName": {
|
|
417
|
+
"description": "Last name",
|
|
418
|
+
"type": "string",
|
|
419
|
+
"example": "Duck"
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
"dependents": {
|
|
424
|
+
"type": "array",
|
|
425
|
+
"items": {
|
|
426
|
+
"type": "object",
|
|
427
|
+
"properties": {
|
|
428
|
+
"dependentName": {
|
|
429
|
+
"type": "string"
|
|
430
|
+
},
|
|
431
|
+
"relation": {
|
|
432
|
+
"type": "string"
|
|
433
|
+
},
|
|
434
|
+
"age": {
|
|
435
|
+
"type": "number"
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
},
|
|
448
|
+
"/per-field-example-with-root-as-array": {
|
|
449
|
+
"get": {
|
|
450
|
+
"summary": "Root node of the example is an array. and the object is constituted using field level example",
|
|
451
|
+
"tags": [
|
|
452
|
+
"Providing Examples"
|
|
453
|
+
],
|
|
454
|
+
"responses": {
|
|
455
|
+
"200": {
|
|
456
|
+
"description": "Successful operation",
|
|
457
|
+
"content": {
|
|
458
|
+
"application/json": {
|
|
459
|
+
"schema": {
|
|
460
|
+
"type": "array",
|
|
461
|
+
"items": {
|
|
462
|
+
"type": "object",
|
|
463
|
+
"properties": {
|
|
464
|
+
"dependentName": {
|
|
465
|
+
"type": "string"
|
|
466
|
+
},
|
|
467
|
+
"relation": {
|
|
468
|
+
"type": "string"
|
|
469
|
+
},
|
|
470
|
+
"age": {
|
|
471
|
+
"type": "number"
|
|
472
|
+
}
|
|
473
|
+
},
|
|
474
|
+
"example": {
|
|
475
|
+
"dependentName": "Natasha",
|
|
476
|
+
"relation": "wife",
|
|
477
|
+
"age": 28
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
},
|
|
487
|
+
"/example-with-refs": {
|
|
488
|
+
"get": {
|
|
489
|
+
"description": "When a Schema definition is `provided` as a ref \n(provide the example at schema-level)\n",
|
|
490
|
+
"tags": [
|
|
491
|
+
"Providing Examples"
|
|
492
|
+
],
|
|
493
|
+
"responses": {
|
|
494
|
+
"200": {
|
|
495
|
+
"description": "Successful operation",
|
|
496
|
+
"content": {
|
|
497
|
+
"application/json": {
|
|
498
|
+
"schema": {
|
|
499
|
+
"type": "array",
|
|
500
|
+
"items": {
|
|
501
|
+
"$ref": "#/components/schemas/cost"
|
|
502
|
+
}
|
|
503
|
+
},
|
|
504
|
+
"examples": {
|
|
505
|
+
"USD": {
|
|
506
|
+
"description": "Cost in `US Dollars`",
|
|
507
|
+
"value": "{\n amount: 10,\n currency: USD\n}\n"
|
|
508
|
+
},
|
|
509
|
+
"INR": {
|
|
510
|
+
"description": "Cost in `Indian Rupees`",
|
|
511
|
+
"value": "{\n amount: 700,\n currency: INR\n}\n"
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
},
|
|
520
|
+
"/example-with-request-body-as-string": {
|
|
521
|
+
"post": {
|
|
522
|
+
"summary": "Test RequestBody as string",
|
|
523
|
+
"requestBody": {
|
|
524
|
+
"content": {
|
|
525
|
+
"text/plain": {
|
|
526
|
+
"schema": {
|
|
527
|
+
"type": "string"
|
|
528
|
+
},
|
|
529
|
+
"examples": [
|
|
530
|
+
"one",
|
|
531
|
+
"two"
|
|
532
|
+
]
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
},
|
|
538
|
+
"/example-with-request-body-as-integer": {
|
|
539
|
+
"post": {
|
|
540
|
+
"summary": "Test RequestBody as integer",
|
|
541
|
+
"requestBody": {
|
|
542
|
+
"content": {
|
|
543
|
+
"text/plain": {
|
|
544
|
+
"schema": {
|
|
545
|
+
"type": "integer"
|
|
546
|
+
},
|
|
547
|
+
"examples": [
|
|
548
|
+
1,
|
|
549
|
+
2
|
|
550
|
+
]
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
},
|
|
556
|
+
"/example-with-request-body-as-array-of-string": {
|
|
557
|
+
"post": {
|
|
558
|
+
"summary": "Test RequestBody as array of string",
|
|
559
|
+
"requestBody": {
|
|
560
|
+
"content": {
|
|
561
|
+
"application/json": {
|
|
562
|
+
"schema": {
|
|
563
|
+
"type": "array",
|
|
564
|
+
"items": {
|
|
565
|
+
"type": "string"
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
},
|
|
573
|
+
"/multiple-example-in-request-body": {
|
|
574
|
+
"post": {
|
|
575
|
+
"summary": "Request body with multiple examples",
|
|
576
|
+
"tags": [
|
|
577
|
+
"Providing Examples"
|
|
578
|
+
],
|
|
579
|
+
"requestBody": {
|
|
580
|
+
"description": "Request body containing **multiple** examples",
|
|
581
|
+
"required": true,
|
|
582
|
+
"content": {
|
|
583
|
+
"application/json": {
|
|
584
|
+
"schema": {
|
|
585
|
+
"type": "array",
|
|
586
|
+
"items": {
|
|
587
|
+
"$ref": "#/components/schemas/cost"
|
|
588
|
+
}
|
|
589
|
+
},
|
|
590
|
+
"examples": {
|
|
591
|
+
"USD": {
|
|
592
|
+
"description": "Cost in `US Dollars`",
|
|
593
|
+
"value": "{\n amount: 10,\n currency: USD\n}\n"
|
|
594
|
+
},
|
|
595
|
+
"INR": {
|
|
596
|
+
"description": "Cost in `Indian Rupees`",
|
|
597
|
+
"value": "{\n amount: 700,\n currency: INR\n}\n"
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
},
|
|
605
|
+
"/object-containg-array-property-with-example": {
|
|
606
|
+
"get": {
|
|
607
|
+
"summary": "Object schema with array type property containing example",
|
|
608
|
+
"tags": [
|
|
609
|
+
"Providing Examples"
|
|
129
610
|
],
|
|
130
|
-
"summary": "Complicated action.",
|
|
131
611
|
"responses": {
|
|
132
612
|
"200": {
|
|
133
|
-
"description": "
|
|
613
|
+
"description": "Object with array type property containing example",
|
|
134
614
|
"content": {
|
|
135
615
|
"application/json": {
|
|
136
616
|
"schema": {
|
|
137
|
-
"$ref": "#/components/schemas/
|
|
617
|
+
"$ref": "#/components/schemas/ObjectWithArrayPropExample"
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
},
|
|
625
|
+
"/examples-anyOf": {
|
|
626
|
+
"get": {
|
|
627
|
+
"tags": [
|
|
628
|
+
"Providing Examples"
|
|
629
|
+
],
|
|
630
|
+
"summary": "AnyOf schemas with examples as part of the subschema",
|
|
631
|
+
"responses": {
|
|
632
|
+
"200": {
|
|
633
|
+
"description": "AnyOf schemas with examples as part of the subschema",
|
|
634
|
+
"content": {
|
|
635
|
+
"application/problem+json": {
|
|
636
|
+
"schema": {
|
|
637
|
+
"anyOf": [
|
|
638
|
+
{
|
|
639
|
+
"title": "AnyOf example 1",
|
|
640
|
+
"description": "First example",
|
|
641
|
+
"type": "object",
|
|
642
|
+
"properties": {
|
|
643
|
+
"foo": {
|
|
644
|
+
"type": "string"
|
|
645
|
+
},
|
|
646
|
+
"bar": {
|
|
647
|
+
"type": "integer"
|
|
648
|
+
}
|
|
649
|
+
},
|
|
650
|
+
"example": {
|
|
651
|
+
"foo": "foo",
|
|
652
|
+
"bar": 42
|
|
653
|
+
}
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
"title": "Second anyOf",
|
|
657
|
+
"description": "Another example",
|
|
658
|
+
"type": "array",
|
|
659
|
+
"items": {
|
|
660
|
+
"type": "object",
|
|
661
|
+
"properties": {
|
|
662
|
+
"foo": {
|
|
663
|
+
"type": "string"
|
|
664
|
+
},
|
|
665
|
+
"quux": {
|
|
666
|
+
"type": "array",
|
|
667
|
+
"items": {
|
|
668
|
+
"type": "number"
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
},
|
|
673
|
+
"example": {
|
|
674
|
+
"foo": "foo",
|
|
675
|
+
"quux": [
|
|
676
|
+
42,
|
|
677
|
+
24
|
|
678
|
+
]
|
|
679
|
+
}
|
|
680
|
+
},
|
|
681
|
+
{
|
|
682
|
+
"title": "No example defined",
|
|
683
|
+
"type": "array",
|
|
684
|
+
"items": {
|
|
685
|
+
"type": "object",
|
|
686
|
+
"properties": {
|
|
687
|
+
"foo": {
|
|
688
|
+
"type": "string"
|
|
689
|
+
},
|
|
690
|
+
"quux": {
|
|
691
|
+
"type": "array",
|
|
692
|
+
"items": {
|
|
693
|
+
"type": "number"
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
]
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
},
|
|
707
|
+
"/examples-anyOf-with-general-properties": {
|
|
708
|
+
"get": {
|
|
709
|
+
"tags": [
|
|
710
|
+
"Providing Examples"
|
|
711
|
+
],
|
|
712
|
+
"summary": "AnyOf schemas with general properties",
|
|
713
|
+
"responses": {
|
|
714
|
+
"200": {
|
|
715
|
+
"description": "AnyOf schemas with general properties",
|
|
716
|
+
"content": {
|
|
717
|
+
"application/problem+json": {
|
|
718
|
+
"schema": {
|
|
719
|
+
"title": "A composed object",
|
|
720
|
+
"type": "object",
|
|
721
|
+
"properties": {
|
|
722
|
+
"common": {
|
|
723
|
+
"type": "string"
|
|
724
|
+
},
|
|
725
|
+
"other": {
|
|
726
|
+
"type": "number"
|
|
727
|
+
}
|
|
728
|
+
},
|
|
729
|
+
"anyOf": [
|
|
730
|
+
{
|
|
731
|
+
"title": "Schema 1",
|
|
732
|
+
"type": "object",
|
|
733
|
+
"properties": {
|
|
734
|
+
"foo": {
|
|
735
|
+
"type": "string"
|
|
736
|
+
},
|
|
737
|
+
"bar": {
|
|
738
|
+
"type": "integer"
|
|
739
|
+
}
|
|
740
|
+
},
|
|
741
|
+
"example": {
|
|
742
|
+
"foo": "foo",
|
|
743
|
+
"bar": 42
|
|
744
|
+
}
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
"title": "Second schema",
|
|
748
|
+
"type": "object",
|
|
749
|
+
"properties": {
|
|
750
|
+
"baz": {
|
|
751
|
+
"type": "string",
|
|
752
|
+
"format": "url"
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
]
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
},
|
|
764
|
+
"/examples-oneOf": {
|
|
765
|
+
"get": {
|
|
766
|
+
"tags": [
|
|
767
|
+
"Providing Examples"
|
|
768
|
+
],
|
|
769
|
+
"summary": "OneOf schema with examples as part of the subschema",
|
|
770
|
+
"responses": {
|
|
771
|
+
"200": {
|
|
772
|
+
"description": "OneOf schema with examples as part of the subschema",
|
|
773
|
+
"content": {
|
|
774
|
+
"application/problem+json": {
|
|
775
|
+
"schema": {
|
|
776
|
+
"oneOf": [
|
|
777
|
+
{
|
|
778
|
+
"title": "Schema 1",
|
|
779
|
+
"type": "object",
|
|
780
|
+
"properties": {
|
|
781
|
+
"foo": {
|
|
782
|
+
"type": "string"
|
|
783
|
+
},
|
|
784
|
+
"bar": {
|
|
785
|
+
"type": "integer"
|
|
786
|
+
}
|
|
787
|
+
},
|
|
788
|
+
"example": {
|
|
789
|
+
"foo": "foo",
|
|
790
|
+
"bar": 42
|
|
791
|
+
}
|
|
792
|
+
},
|
|
793
|
+
{
|
|
794
|
+
"title": "Second schema",
|
|
795
|
+
"type": "object",
|
|
796
|
+
"properties": {
|
|
797
|
+
"baz": {
|
|
798
|
+
"type": "string",
|
|
799
|
+
"format": "url"
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
]
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
},
|
|
811
|
+
"/examples-allOf": {
|
|
812
|
+
"get": {
|
|
813
|
+
"tags": [
|
|
814
|
+
"Providing Examples"
|
|
815
|
+
],
|
|
816
|
+
"summary": "AllOf schemas with examples as part of the subschema",
|
|
817
|
+
"responses": {
|
|
818
|
+
"200": {
|
|
819
|
+
"description": "AllOf schemas with examples as part of the subschema",
|
|
820
|
+
"content": {
|
|
821
|
+
"application/problem+json": {
|
|
822
|
+
"schema": {
|
|
823
|
+
"allOf": [
|
|
824
|
+
{
|
|
825
|
+
"title": "Schema 1",
|
|
826
|
+
"type": "object",
|
|
827
|
+
"properties": {
|
|
828
|
+
"foo": {
|
|
829
|
+
"type": "string"
|
|
830
|
+
},
|
|
831
|
+
"bar": {
|
|
832
|
+
"type": "integer"
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
},
|
|
836
|
+
{
|
|
837
|
+
"title": "Second schema",
|
|
838
|
+
"type": "object",
|
|
839
|
+
"properties": {
|
|
840
|
+
"baz": {
|
|
841
|
+
"type": "string",
|
|
842
|
+
"format": "url"
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
]
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
},
|
|
854
|
+
"/examples-allOf-anyOf": {
|
|
855
|
+
"get": {
|
|
856
|
+
"tags": [
|
|
857
|
+
"Providing Examples"
|
|
858
|
+
],
|
|
859
|
+
"summary": "Combination of allOf & nested anyOf schemas",
|
|
860
|
+
"responses": {
|
|
861
|
+
"200": {
|
|
862
|
+
"description": "Combination of allOf & nested anyOf schemas",
|
|
863
|
+
"content": {
|
|
864
|
+
"application/problem+json": {
|
|
865
|
+
"schema": {
|
|
866
|
+
"allOf": [
|
|
867
|
+
{
|
|
868
|
+
"title": "Schema 1",
|
|
869
|
+
"type": "object",
|
|
870
|
+
"properties": {
|
|
871
|
+
"foo": {
|
|
872
|
+
"type": "string"
|
|
873
|
+
},
|
|
874
|
+
"bar": {
|
|
875
|
+
"type": "integer"
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
},
|
|
879
|
+
{
|
|
880
|
+
"title": "Second schema",
|
|
881
|
+
"anyOf": [
|
|
882
|
+
{
|
|
883
|
+
"type": "object",
|
|
884
|
+
"properties": {
|
|
885
|
+
"baz": {
|
|
886
|
+
"type": "string",
|
|
887
|
+
"format": "url"
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
"type": "object",
|
|
893
|
+
"properties": {
|
|
894
|
+
"foobar": {
|
|
895
|
+
"type": "string"
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
]
|
|
900
|
+
}
|
|
901
|
+
]
|
|
138
902
|
}
|
|
139
903
|
}
|
|
140
904
|
}
|
|
@@ -145,104 +909,137 @@
|
|
|
145
909
|
},
|
|
146
910
|
"components": {
|
|
147
911
|
"schemas": {
|
|
148
|
-
"
|
|
149
|
-
"enum": [
|
|
150
|
-
0,
|
|
151
|
-
1,
|
|
152
|
-
2
|
|
153
|
-
],
|
|
154
|
-
"type": "integer",
|
|
155
|
-
"description": "Tag for TodoItem.",
|
|
156
|
-
"format": "int32"
|
|
157
|
-
},
|
|
158
|
-
"InnerEnum": {
|
|
159
|
-
"enum": [
|
|
160
|
-
1
|
|
161
|
-
],
|
|
162
|
-
"type": "integer",
|
|
163
|
-
"description": "Inner enum.",
|
|
164
|
-
"format": "int32"
|
|
165
|
-
},
|
|
166
|
-
"SecondInnerEnum": {
|
|
167
|
-
"enum": [
|
|
168
|
-
0
|
|
169
|
-
],
|
|
170
|
-
"type": "integer",
|
|
171
|
-
"description": "Second inner enum.",
|
|
172
|
-
"format": "int32"
|
|
173
|
-
},
|
|
174
|
-
"SecondInnerEnumSecondInnerClass": {
|
|
912
|
+
"cost": {
|
|
175
913
|
"type": "object",
|
|
176
914
|
"properties": {
|
|
177
|
-
"
|
|
178
|
-
"
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
"
|
|
915
|
+
"amount": {
|
|
916
|
+
"type": "integer",
|
|
917
|
+
"description": "Amount"
|
|
918
|
+
},
|
|
919
|
+
"currency": {
|
|
920
|
+
"description": "Currency Code",
|
|
921
|
+
"type": "string"
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
},
|
|
925
|
+
"currencies": {
|
|
926
|
+
"type": "array",
|
|
927
|
+
"items": {
|
|
928
|
+
"type": "object",
|
|
929
|
+
"properties": {
|
|
930
|
+
"currencyCode": {
|
|
931
|
+
"type": "string"
|
|
932
|
+
},
|
|
933
|
+
"evaluationDate": {
|
|
934
|
+
"type": "string",
|
|
935
|
+
"format": "date-time"
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
},
|
|
939
|
+
"example": [
|
|
940
|
+
{
|
|
941
|
+
"currencyCode": "USD",
|
|
942
|
+
"evaluationDate": "2017-07-21T17:32:28Z"
|
|
943
|
+
},
|
|
944
|
+
{
|
|
945
|
+
"currencyCode": "INR",
|
|
946
|
+
"evaluationDate": "2017-07-21T17:32:28Z"
|
|
184
947
|
}
|
|
948
|
+
]
|
|
949
|
+
},
|
|
950
|
+
"ArrayOfInt-1": {
|
|
951
|
+
"type": "array",
|
|
952
|
+
"items": {
|
|
953
|
+
"type": "integer",
|
|
954
|
+
"format": "int64"
|
|
185
955
|
},
|
|
186
|
-
"
|
|
187
|
-
|
|
956
|
+
"example": [
|
|
957
|
+
1,
|
|
958
|
+
2,
|
|
959
|
+
3,
|
|
960
|
+
4
|
|
961
|
+
]
|
|
188
962
|
},
|
|
189
|
-
"
|
|
963
|
+
"ArrayOfInt-2": {
|
|
964
|
+
"type": "array",
|
|
965
|
+
"items": {
|
|
966
|
+
"type": "integer",
|
|
967
|
+
"format": "int64",
|
|
968
|
+
"example": 1
|
|
969
|
+
}
|
|
970
|
+
},
|
|
971
|
+
"PersonObject": {
|
|
190
972
|
"type": "object",
|
|
191
973
|
"properties": {
|
|
192
|
-
"
|
|
193
|
-
"type": "
|
|
194
|
-
"items": {
|
|
195
|
-
"$ref": "#/components/schemas/InnerEnum"
|
|
196
|
-
},
|
|
197
|
-
"description": "List of inner enums.",
|
|
198
|
-
"nullable": true
|
|
974
|
+
"name": {
|
|
975
|
+
"type": "string"
|
|
199
976
|
},
|
|
200
|
-
"
|
|
201
|
-
"
|
|
202
|
-
{
|
|
203
|
-
"$ref": "#/components/schemas/SecondInnerEnumSecondInnerClass"
|
|
204
|
-
}
|
|
205
|
-
],
|
|
206
|
-
"description": "Second inner class.",
|
|
207
|
-
"nullable": true
|
|
977
|
+
"age": {
|
|
978
|
+
"type": "integer"
|
|
208
979
|
}
|
|
209
980
|
},
|
|
210
|
-
"
|
|
211
|
-
|
|
981
|
+
"example": {
|
|
982
|
+
"name": "name-1",
|
|
983
|
+
"age": 1
|
|
984
|
+
}
|
|
212
985
|
},
|
|
213
|
-
"
|
|
986
|
+
"ObjectWithArrayPropExample": {
|
|
214
987
|
"type": "object",
|
|
215
988
|
"properties": {
|
|
216
|
-
"
|
|
217
|
-
"
|
|
218
|
-
|
|
219
|
-
"$ref": "#/components/schemas/Tag"
|
|
220
|
-
}
|
|
221
|
-
],
|
|
222
|
-
"description": "Tag."
|
|
989
|
+
"numberProp": {
|
|
990
|
+
"type": "number",
|
|
991
|
+
"example": 1000
|
|
223
992
|
},
|
|
224
|
-
"
|
|
225
|
-
"
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
]
|
|
230
|
-
|
|
231
|
-
|
|
993
|
+
"stringProp": {
|
|
994
|
+
"type": "string",
|
|
995
|
+
"enum": [
|
|
996
|
+
"value0",
|
|
997
|
+
"value1"
|
|
998
|
+
]
|
|
999
|
+
},
|
|
1000
|
+
"arrayProp": {
|
|
1001
|
+
"type": "array",
|
|
1002
|
+
"items": {
|
|
1003
|
+
"type": "number"
|
|
1004
|
+
},
|
|
1005
|
+
"example": [
|
|
1006
|
+
0,
|
|
1007
|
+
1,
|
|
1008
|
+
2
|
|
1009
|
+
]
|
|
232
1010
|
}
|
|
233
|
-
}
|
|
234
|
-
"additionalProperties": false,
|
|
235
|
-
"description": "Complicated class for testing enums."
|
|
1011
|
+
}
|
|
236
1012
|
}
|
|
237
1013
|
}
|
|
238
1014
|
}
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
1015
|
+
};
|
|
1016
|
+
function loadSpec() {
|
|
1017
|
+
const el = document.getElementById("thedoc");
|
|
1018
|
+
el.loadSpec(spec);
|
|
1019
|
+
}
|
|
1020
|
+
</script>
|
|
1021
|
+
</head>
|
|
1022
|
+
<body onload="loadSpec()">
|
|
1023
|
+
<rapi-doc id="thedoc"
|
|
1024
|
+
theme="light"
|
|
1025
|
+
show-header="false"
|
|
1026
|
+
show-info="false"
|
|
1027
|
+
allow-server-selection="false"
|
|
1028
|
+
allow-api-list-style-selection="false"
|
|
1029
|
+
on-nav-tag-click="show-description"
|
|
1030
|
+
render-style="focused"
|
|
1031
|
+
schema-style="table"
|
|
1032
|
+
schema-expand-level="3"
|
|
1033
|
+
info-description-headings-in-navbar="true"
|
|
1034
|
+
nav-bg-color="#fafafa"
|
|
1035
|
+
nav-hover-text-color="#000000"
|
|
1036
|
+
nav-hover-bg-color="#ECF6FD"
|
|
1037
|
+
primary-color="#012169"
|
|
1038
|
+
bg-color="#ffffff"
|
|
1039
|
+
font-size="largest"
|
|
1040
|
+
allow-authentication='false'
|
|
1041
|
+
fill-request-fields-with-example="false"
|
|
1042
|
+
show-method-in-nav-bar="as-colored-block"
|
|
1043
|
+
> </rapi-doc>
|
|
1044
|
+
</body>
|
|
1045
|
+
</html>
|