rapidoc 9.3.8 → 10.0.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.
Files changed (69) hide show
  1. package/README.md +193 -61
  2. package/dist/rapidoc-min.js +279 -3914
  3. package/package.json +23 -46
  4. package/.babelrc.json +0 -42
  5. package/.eslintrc +0 -53
  6. package/.github/FUNDING.yml +0 -13
  7. package/.github/workflow/words.yaml +0 -22
  8. package/CONTRIBUTING.md +0 -35
  9. package/dist/index.html +0 -1010
  10. package/dist/index.html.gz +0 -0
  11. package/dist/rapidoc-min.js.LICENSE.txt +0 -64
  12. package/dist/rapidoc-min.js.LICENSE.txt.gz +0 -0
  13. package/dist/rapidoc-min.js.gz +0 -0
  14. package/dist/rapidoc-min.js.map +0 -1
  15. package/dist/rapidoc-min.js.map.gz +0 -0
  16. package/dist/rapidoc.js +0 -21603
  17. package/dist/report.html +0 -39
  18. package/index-hashroute.html +0 -65
  19. package/index.html +0 -1045
  20. package/index_bak.html +0 -251
  21. package/jsconfig.json +0 -11
  22. package/logo.png +0 -0
  23. package/performance.html +0 -31
  24. package/src/components/api-request.js +0 -1793
  25. package/src/components/api-response.js +0 -335
  26. package/src/components/dialog-box.js +0 -73
  27. package/src/components/json-tree.js +0 -145
  28. package/src/components/schema-table.js +0 -367
  29. package/src/components/schema-tree.js +0 -381
  30. package/src/components/tag-input.js +0 -135
  31. package/src/index.js +0 -7
  32. package/src/json-schema-viewer.js +0 -346
  33. package/src/oauth-receiver.js +0 -56
  34. package/src/rapidoc-mini.js +0 -382
  35. package/src/rapidoc.js +0 -1083
  36. package/src/styles/border-styles.js +0 -24
  37. package/src/styles/custom-styles.js +0 -10
  38. package/src/styles/dialog-box-styles.js +0 -75
  39. package/src/styles/endpoint-styles.js +0 -202
  40. package/src/styles/flex-styles.js +0 -15
  41. package/src/styles/font-styles.js +0 -268
  42. package/src/styles/info-styles.js +0 -21
  43. package/src/styles/input-styles.js +0 -207
  44. package/src/styles/nav-styles.js +0 -198
  45. package/src/styles/prism-styles.js +0 -105
  46. package/src/styles/schema-styles.js +0 -121
  47. package/src/styles/tab-styles.js +0 -47
  48. package/src/styles/table-styles.js +0 -58
  49. package/src/templates/advance-search-template.js +0 -72
  50. package/src/templates/callback-template.js +0 -75
  51. package/src/templates/code-samples-template.js +0 -34
  52. package/src/templates/components-template.js +0 -76
  53. package/src/templates/endpoint-template.js +0 -251
  54. package/src/templates/expanded-endpoint-template.js +0 -199
  55. package/src/templates/focused-endpoint-template.js +0 -110
  56. package/src/templates/header-template.js +0 -66
  57. package/src/templates/json-schema-viewer-template.js +0 -185
  58. package/src/templates/logo-template.js +0 -18
  59. package/src/templates/main-body-template.js +0 -110
  60. package/src/templates/navbar-template.js +0 -272
  61. package/src/templates/overview-template.js +0 -79
  62. package/src/templates/security-scheme-template.js +0 -612
  63. package/src/templates/server-template.js +0 -115
  64. package/src/utils/color-utils.js +0 -59
  65. package/src/utils/common-utils.js +0 -168
  66. package/src/utils/schema-utils.js +0 -1086
  67. package/src/utils/spec-parser.js +0 -462
  68. package/src/utils/theme.js +0 -288
  69. package/webpack.config.js +0 -142
package/index.html DELETED
@@ -1,1045 +0,0 @@
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",
12
- "info": {
13
- "title": "Providing Examples",
14
- "description": "Providing Examples",
15
- "version": "1.0.0"
16
- },
17
- "paths": {
18
- "/multiple-examples-in-request-parameters/{path-param-1}/{path-param-2}": {
19
- "get": {
20
- "tags": [
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"
610
- ],
611
- "responses": {
612
- "200": {
613
- "description": "Object with array type property containing example",
614
- "content": {
615
- "application/json": {
616
- "schema": {
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
- ]
902
- }
903
- }
904
- }
905
- }
906
- }
907
- }
908
- }
909
- },
910
- "components": {
911
- "schemas": {
912
- "cost": {
913
- "type": "object",
914
- "properties": {
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"
947
- }
948
- ]
949
- },
950
- "ArrayOfInt-1": {
951
- "type": "array",
952
- "items": {
953
- "type": "integer",
954
- "format": "int64"
955
- },
956
- "example": [
957
- 1,
958
- 2,
959
- 3,
960
- 4
961
- ]
962
- },
963
- "ArrayOfInt-2": {
964
- "type": "array",
965
- "items": {
966
- "type": "integer",
967
- "format": "int64",
968
- "example": 1
969
- }
970
- },
971
- "PersonObject": {
972
- "type": "object",
973
- "properties": {
974
- "name": {
975
- "type": "string"
976
- },
977
- "age": {
978
- "type": "integer"
979
- }
980
- },
981
- "example": {
982
- "name": "name-1",
983
- "age": 1
984
- }
985
- },
986
- "ObjectWithArrayPropExample": {
987
- "type": "object",
988
- "properties": {
989
- "numberProp": {
990
- "type": "number",
991
- "example": 1000
992
- },
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
- ]
1010
- }
1011
- }
1012
- }
1013
- }
1014
- }
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>