@scalar/openapi-validator 0.1.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.
@@ -0,0 +1,1466 @@
1
+ export default {
2
+ 'title': 'A JSON Schema for Swagger 2.0 API.',
3
+ 'id': 'http://swagger.io/v2/schema.json#',
4
+ '$schema': 'http://json-schema.org/draft-04/schema#',
5
+ 'type': 'object',
6
+ 'required': ['swagger', 'info', 'paths'],
7
+ 'additionalProperties': false,
8
+ 'patternProperties': {
9
+ '^x-': {
10
+ '$ref': '#/definitions/vendorExtension',
11
+ },
12
+ },
13
+ 'properties': {
14
+ 'swagger': {
15
+ 'type': 'string',
16
+ 'enum': ['2.0'],
17
+ 'description': 'The Swagger version of this document.',
18
+ },
19
+ 'info': {
20
+ '$ref': '#/definitions/info',
21
+ },
22
+ 'host': {
23
+ 'type': 'string',
24
+ 'pattern': '^[^{}/ :\\\\]+(?::\\d+)?$',
25
+ 'description': "The host (name or ip) of the API. Example: 'swagger.io'",
26
+ },
27
+ 'basePath': {
28
+ 'type': 'string',
29
+ 'pattern': '^/',
30
+ 'description': "The base path to the API. Example: '/api'.",
31
+ },
32
+ 'schemes': {
33
+ '$ref': '#/definitions/schemesList',
34
+ },
35
+ 'consumes': {
36
+ 'description': 'A list of MIME types accepted by the API.',
37
+ 'allOf': [
38
+ {
39
+ '$ref': '#/definitions/mediaTypeList',
40
+ },
41
+ ],
42
+ },
43
+ 'produces': {
44
+ 'description': 'A list of MIME types the API can produce.',
45
+ 'allOf': [
46
+ {
47
+ '$ref': '#/definitions/mediaTypeList',
48
+ },
49
+ ],
50
+ },
51
+ 'paths': {
52
+ '$ref': '#/definitions/paths',
53
+ },
54
+ 'definitions': {
55
+ '$ref': '#/definitions/definitions',
56
+ },
57
+ 'parameters': {
58
+ '$ref': '#/definitions/parameterDefinitions',
59
+ },
60
+ 'responses': {
61
+ '$ref': '#/definitions/responseDefinitions',
62
+ },
63
+ 'security': {
64
+ '$ref': '#/definitions/security',
65
+ },
66
+ 'securityDefinitions': {
67
+ '$ref': '#/definitions/securityDefinitions',
68
+ },
69
+ 'tags': {
70
+ 'type': 'array',
71
+ 'items': {
72
+ '$ref': '#/definitions/tag',
73
+ },
74
+ 'uniqueItems': true,
75
+ },
76
+ 'externalDocs': {
77
+ '$ref': '#/definitions/externalDocs',
78
+ },
79
+ },
80
+ 'definitions': {
81
+ 'info': {
82
+ 'type': 'object',
83
+ 'description': 'General information about the API.',
84
+ 'required': ['version', 'title'],
85
+ 'additionalProperties': false,
86
+ 'patternProperties': {
87
+ '^x-': {
88
+ '$ref': '#/definitions/vendorExtension',
89
+ },
90
+ },
91
+ 'properties': {
92
+ 'title': {
93
+ 'type': 'string',
94
+ 'description': 'A unique and precise title of the API.',
95
+ },
96
+ 'version': {
97
+ 'type': 'string',
98
+ 'description': 'A semantic version number of the API.',
99
+ },
100
+ 'description': {
101
+ 'type': 'string',
102
+ 'description': 'A longer description of the API. Should be different from the title. GitHub Flavored Markdown is allowed.',
103
+ },
104
+ 'termsOfService': {
105
+ 'type': 'string',
106
+ 'description': 'The terms of service for the API.',
107
+ },
108
+ 'contact': {
109
+ '$ref': '#/definitions/contact',
110
+ },
111
+ 'license': {
112
+ '$ref': '#/definitions/license',
113
+ },
114
+ },
115
+ },
116
+ 'contact': {
117
+ 'type': 'object',
118
+ 'description': 'Contact information for the owners of the API.',
119
+ 'additionalProperties': false,
120
+ 'properties': {
121
+ 'name': {
122
+ 'type': 'string',
123
+ 'description': 'The identifying name of the contact person/organization.',
124
+ },
125
+ 'url': {
126
+ 'type': 'string',
127
+ 'description': 'The URL pointing to the contact information.',
128
+ 'format': 'uri',
129
+ },
130
+ 'email': {
131
+ 'type': 'string',
132
+ 'description': 'The email address of the contact person/organization.',
133
+ 'format': 'email',
134
+ },
135
+ },
136
+ 'patternProperties': {
137
+ '^x-': {
138
+ '$ref': '#/definitions/vendorExtension',
139
+ },
140
+ },
141
+ },
142
+ 'license': {
143
+ 'type': 'object',
144
+ 'required': ['name'],
145
+ 'additionalProperties': false,
146
+ 'properties': {
147
+ 'name': {
148
+ 'type': 'string',
149
+ 'description': "The name of the license type. It's encouraged to use an OSI compatible license.",
150
+ },
151
+ 'url': {
152
+ 'type': 'string',
153
+ 'description': 'The URL pointing to the license.',
154
+ 'format': 'uri',
155
+ },
156
+ },
157
+ 'patternProperties': {
158
+ '^x-': {
159
+ '$ref': '#/definitions/vendorExtension',
160
+ },
161
+ },
162
+ },
163
+ 'paths': {
164
+ 'type': 'object',
165
+ 'description': "Relative paths to the individual endpoints. They must be relative to the 'basePath'.",
166
+ 'patternProperties': {
167
+ '^x-': {
168
+ '$ref': '#/definitions/vendorExtension',
169
+ },
170
+ '^/': {
171
+ 'oneOf': [
172
+ {
173
+ '$ref': '#/definitions/pathItem',
174
+ },
175
+ {
176
+ '$ref': '#/definitions/jsonReference',
177
+ },
178
+ ],
179
+ },
180
+ },
181
+ 'additionalProperties': false,
182
+ },
183
+ 'definitions': {
184
+ 'type': 'object',
185
+ 'additionalProperties': {
186
+ '$ref': '#/definitions/schema',
187
+ },
188
+ 'description': 'One or more JSON objects describing the schemas being consumed and produced by the API.',
189
+ },
190
+ 'parameterDefinitions': {
191
+ 'type': 'object',
192
+ 'additionalProperties': {
193
+ '$ref': '#/definitions/parameter',
194
+ },
195
+ 'description': 'One or more JSON representations for parameters',
196
+ },
197
+ 'responseDefinitions': {
198
+ 'type': 'object',
199
+ 'additionalProperties': {
200
+ '$ref': '#/definitions/response',
201
+ },
202
+ 'description': 'One or more JSON representations for responses',
203
+ },
204
+ 'externalDocs': {
205
+ 'type': 'object',
206
+ 'additionalProperties': false,
207
+ 'description': 'information about external documentation',
208
+ 'required': ['url'],
209
+ 'properties': {
210
+ 'description': {
211
+ 'type': 'string',
212
+ },
213
+ 'url': {
214
+ 'type': 'string',
215
+ 'format': 'uri',
216
+ },
217
+ },
218
+ 'patternProperties': {
219
+ '^x-': {
220
+ '$ref': '#/definitions/vendorExtension',
221
+ },
222
+ },
223
+ },
224
+ 'examples': {
225
+ 'type': 'object',
226
+ 'additionalProperties': true,
227
+ },
228
+ 'mimeType': {
229
+ 'type': 'string',
230
+ 'description': 'The MIME type of the HTTP message.',
231
+ },
232
+ 'operation': {
233
+ 'type': 'object',
234
+ 'required': ['responses'],
235
+ 'additionalProperties': false,
236
+ 'patternProperties': {
237
+ '^x-': {
238
+ '$ref': '#/definitions/vendorExtension',
239
+ },
240
+ },
241
+ 'properties': {
242
+ 'tags': {
243
+ 'type': 'array',
244
+ 'items': {
245
+ 'type': 'string',
246
+ },
247
+ 'uniqueItems': true,
248
+ },
249
+ 'summary': {
250
+ 'type': 'string',
251
+ 'description': 'A brief summary of the operation.',
252
+ },
253
+ 'description': {
254
+ 'type': 'string',
255
+ 'description': 'A longer description of the operation, GitHub Flavored Markdown is allowed.',
256
+ },
257
+ 'externalDocs': {
258
+ '$ref': '#/definitions/externalDocs',
259
+ },
260
+ 'operationId': {
261
+ 'type': 'string',
262
+ 'description': 'A unique identifier of the operation.',
263
+ },
264
+ 'produces': {
265
+ 'description': 'A list of MIME types the API can produce.',
266
+ 'allOf': [
267
+ {
268
+ '$ref': '#/definitions/mediaTypeList',
269
+ },
270
+ ],
271
+ },
272
+ 'consumes': {
273
+ 'description': 'A list of MIME types the API can consume.',
274
+ 'allOf': [
275
+ {
276
+ '$ref': '#/definitions/mediaTypeList',
277
+ },
278
+ ],
279
+ },
280
+ 'parameters': {
281
+ '$ref': '#/definitions/parametersList',
282
+ },
283
+ 'responses': {
284
+ '$ref': '#/definitions/responses',
285
+ },
286
+ 'schemes': {
287
+ '$ref': '#/definitions/schemesList',
288
+ },
289
+ 'deprecated': {
290
+ 'type': 'boolean',
291
+ 'default': false,
292
+ },
293
+ 'security': {
294
+ '$ref': '#/definitions/security',
295
+ },
296
+ },
297
+ },
298
+ 'pathItem': {
299
+ 'type': 'object',
300
+ 'additionalProperties': false,
301
+ 'patternProperties': {
302
+ '^x-': {
303
+ '$ref': '#/definitions/vendorExtension',
304
+ },
305
+ },
306
+ 'properties': {
307
+ '$ref': {
308
+ 'type': 'string',
309
+ },
310
+ 'get': {
311
+ '$ref': '#/definitions/operation',
312
+ },
313
+ 'put': {
314
+ '$ref': '#/definitions/operation',
315
+ },
316
+ 'post': {
317
+ '$ref': '#/definitions/operation',
318
+ },
319
+ 'delete': {
320
+ '$ref': '#/definitions/operation',
321
+ },
322
+ 'options': {
323
+ '$ref': '#/definitions/operation',
324
+ },
325
+ 'head': {
326
+ '$ref': '#/definitions/operation',
327
+ },
328
+ 'patch': {
329
+ '$ref': '#/definitions/operation',
330
+ },
331
+ 'parameters': {
332
+ '$ref': '#/definitions/parametersList',
333
+ },
334
+ },
335
+ },
336
+ 'responses': {
337
+ 'type': 'object',
338
+ 'description': "Response objects names can either be any valid HTTP status code or 'default'.",
339
+ 'minProperties': 1,
340
+ 'additionalProperties': false,
341
+ 'patternProperties': {
342
+ '^([0-9]{3})$|^(default)$': {
343
+ '$ref': '#/definitions/responseValue',
344
+ },
345
+ '^x-': {
346
+ '$ref': '#/definitions/vendorExtension',
347
+ },
348
+ },
349
+ 'not': {
350
+ 'type': 'object',
351
+ 'additionalProperties': false,
352
+ 'patternProperties': {
353
+ '^x-': {
354
+ '$ref': '#/definitions/vendorExtension',
355
+ },
356
+ },
357
+ },
358
+ },
359
+ 'responseValue': {
360
+ 'oneOf': [
361
+ {
362
+ '$ref': '#/definitions/response',
363
+ },
364
+ {
365
+ '$ref': '#/definitions/jsonReference',
366
+ },
367
+ ],
368
+ },
369
+ 'response': {
370
+ 'type': 'object',
371
+ 'required': ['description'],
372
+ 'properties': {
373
+ 'description': {
374
+ 'type': 'string',
375
+ },
376
+ 'schema': {
377
+ 'oneOf': [
378
+ {
379
+ '$ref': '#/definitions/schema',
380
+ },
381
+ {
382
+ '$ref': '#/definitions/fileSchema',
383
+ },
384
+ ],
385
+ },
386
+ 'headers': {
387
+ '$ref': '#/definitions/headers',
388
+ },
389
+ 'examples': {
390
+ '$ref': '#/definitions/examples',
391
+ },
392
+ },
393
+ 'additionalProperties': false,
394
+ 'patternProperties': {
395
+ '^x-': {
396
+ '$ref': '#/definitions/vendorExtension',
397
+ },
398
+ },
399
+ },
400
+ 'headers': {
401
+ 'type': 'object',
402
+ 'additionalProperties': {
403
+ '$ref': '#/definitions/header',
404
+ },
405
+ },
406
+ 'header': {
407
+ 'type': 'object',
408
+ 'additionalProperties': false,
409
+ 'required': ['type'],
410
+ 'properties': {
411
+ 'type': {
412
+ 'type': 'string',
413
+ 'enum': ['string', 'number', 'integer', 'boolean', 'array'],
414
+ },
415
+ 'format': {
416
+ 'type': 'string',
417
+ },
418
+ 'items': {
419
+ '$ref': '#/definitions/primitivesItems',
420
+ },
421
+ 'collectionFormat': {
422
+ '$ref': '#/definitions/collectionFormat',
423
+ },
424
+ 'default': {
425
+ '$ref': '#/definitions/default',
426
+ },
427
+ 'maximum': {
428
+ '$ref': '#/definitions/maximum',
429
+ },
430
+ 'exclusiveMaximum': {
431
+ '$ref': '#/definitions/exclusiveMaximum',
432
+ },
433
+ 'minimum': {
434
+ '$ref': '#/definitions/minimum',
435
+ },
436
+ 'exclusiveMinimum': {
437
+ '$ref': '#/definitions/exclusiveMinimum',
438
+ },
439
+ 'maxLength': {
440
+ '$ref': '#/definitions/maxLength',
441
+ },
442
+ 'minLength': {
443
+ '$ref': '#/definitions/minLength',
444
+ },
445
+ 'pattern': {
446
+ '$ref': '#/definitions/pattern',
447
+ },
448
+ 'maxItems': {
449
+ '$ref': '#/definitions/maxItems',
450
+ },
451
+ 'minItems': {
452
+ '$ref': '#/definitions/minItems',
453
+ },
454
+ 'uniqueItems': {
455
+ '$ref': '#/definitions/uniqueItems',
456
+ },
457
+ 'enum': {
458
+ '$ref': '#/definitions/enum',
459
+ },
460
+ 'multipleOf': {
461
+ '$ref': '#/definitions/multipleOf',
462
+ },
463
+ 'description': {
464
+ 'type': 'string',
465
+ },
466
+ },
467
+ 'patternProperties': {
468
+ '^x-': {
469
+ '$ref': '#/definitions/vendorExtension',
470
+ },
471
+ },
472
+ },
473
+ 'vendorExtension': {
474
+ 'description': 'Any property starting with x- is valid.',
475
+ 'additionalProperties': true,
476
+ 'additionalItems': true,
477
+ },
478
+ 'bodyParameter': {
479
+ 'type': 'object',
480
+ 'required': ['name', 'in', 'schema'],
481
+ 'patternProperties': {
482
+ '^x-': {
483
+ '$ref': '#/definitions/vendorExtension',
484
+ },
485
+ },
486
+ 'properties': {
487
+ 'description': {
488
+ 'type': 'string',
489
+ 'description': 'A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.',
490
+ },
491
+ 'name': {
492
+ 'type': 'string',
493
+ 'description': 'The name of the parameter.',
494
+ },
495
+ 'in': {
496
+ 'type': 'string',
497
+ 'description': 'Determines the location of the parameter.',
498
+ 'enum': ['body'],
499
+ },
500
+ 'required': {
501
+ 'type': 'boolean',
502
+ 'description': 'Determines whether or not this parameter is required or optional.',
503
+ 'default': false,
504
+ },
505
+ 'schema': {
506
+ '$ref': '#/definitions/schema',
507
+ },
508
+ },
509
+ 'additionalProperties': false,
510
+ },
511
+ 'headerParameterSubSchema': {
512
+ 'additionalProperties': false,
513
+ 'patternProperties': {
514
+ '^x-': {
515
+ '$ref': '#/definitions/vendorExtension',
516
+ },
517
+ },
518
+ 'properties': {
519
+ 'required': {
520
+ 'type': 'boolean',
521
+ 'description': 'Determines whether or not this parameter is required or optional.',
522
+ 'default': false,
523
+ },
524
+ 'in': {
525
+ 'type': 'string',
526
+ 'description': 'Determines the location of the parameter.',
527
+ 'enum': ['header'],
528
+ },
529
+ 'description': {
530
+ 'type': 'string',
531
+ 'description': 'A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.',
532
+ },
533
+ 'name': {
534
+ 'type': 'string',
535
+ 'description': 'The name of the parameter.',
536
+ },
537
+ 'type': {
538
+ 'type': 'string',
539
+ 'enum': ['string', 'number', 'boolean', 'integer', 'array'],
540
+ },
541
+ 'format': {
542
+ 'type': 'string',
543
+ },
544
+ 'items': {
545
+ '$ref': '#/definitions/primitivesItems',
546
+ },
547
+ 'collectionFormat': {
548
+ '$ref': '#/definitions/collectionFormat',
549
+ },
550
+ 'default': {
551
+ '$ref': '#/definitions/default',
552
+ },
553
+ 'maximum': {
554
+ '$ref': '#/definitions/maximum',
555
+ },
556
+ 'exclusiveMaximum': {
557
+ '$ref': '#/definitions/exclusiveMaximum',
558
+ },
559
+ 'minimum': {
560
+ '$ref': '#/definitions/minimum',
561
+ },
562
+ 'exclusiveMinimum': {
563
+ '$ref': '#/definitions/exclusiveMinimum',
564
+ },
565
+ 'maxLength': {
566
+ '$ref': '#/definitions/maxLength',
567
+ },
568
+ 'minLength': {
569
+ '$ref': '#/definitions/minLength',
570
+ },
571
+ 'pattern': {
572
+ '$ref': '#/definitions/pattern',
573
+ },
574
+ 'maxItems': {
575
+ '$ref': '#/definitions/maxItems',
576
+ },
577
+ 'minItems': {
578
+ '$ref': '#/definitions/minItems',
579
+ },
580
+ 'uniqueItems': {
581
+ '$ref': '#/definitions/uniqueItems',
582
+ },
583
+ 'enum': {
584
+ '$ref': '#/definitions/enum',
585
+ },
586
+ 'multipleOf': {
587
+ '$ref': '#/definitions/multipleOf',
588
+ },
589
+ },
590
+ },
591
+ 'queryParameterSubSchema': {
592
+ 'additionalProperties': false,
593
+ 'patternProperties': {
594
+ '^x-': {
595
+ '$ref': '#/definitions/vendorExtension',
596
+ },
597
+ },
598
+ 'properties': {
599
+ 'required': {
600
+ 'type': 'boolean',
601
+ 'description': 'Determines whether or not this parameter is required or optional.',
602
+ 'default': false,
603
+ },
604
+ 'in': {
605
+ 'type': 'string',
606
+ 'description': 'Determines the location of the parameter.',
607
+ 'enum': ['query'],
608
+ },
609
+ 'description': {
610
+ 'type': 'string',
611
+ 'description': 'A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.',
612
+ },
613
+ 'name': {
614
+ 'type': 'string',
615
+ 'description': 'The name of the parameter.',
616
+ },
617
+ 'allowEmptyValue': {
618
+ 'type': 'boolean',
619
+ 'default': false,
620
+ 'description': 'allows sending a parameter by name only or with an empty value.',
621
+ },
622
+ 'type': {
623
+ 'type': 'string',
624
+ 'enum': ['string', 'number', 'boolean', 'integer', 'array'],
625
+ },
626
+ 'format': {
627
+ 'type': 'string',
628
+ },
629
+ 'items': {
630
+ '$ref': '#/definitions/primitivesItems',
631
+ },
632
+ 'collectionFormat': {
633
+ '$ref': '#/definitions/collectionFormatWithMulti',
634
+ },
635
+ 'default': {
636
+ '$ref': '#/definitions/default',
637
+ },
638
+ 'maximum': {
639
+ '$ref': '#/definitions/maximum',
640
+ },
641
+ 'exclusiveMaximum': {
642
+ '$ref': '#/definitions/exclusiveMaximum',
643
+ },
644
+ 'minimum': {
645
+ '$ref': '#/definitions/minimum',
646
+ },
647
+ 'exclusiveMinimum': {
648
+ '$ref': '#/definitions/exclusiveMinimum',
649
+ },
650
+ 'maxLength': {
651
+ '$ref': '#/definitions/maxLength',
652
+ },
653
+ 'minLength': {
654
+ '$ref': '#/definitions/minLength',
655
+ },
656
+ 'pattern': {
657
+ '$ref': '#/definitions/pattern',
658
+ },
659
+ 'maxItems': {
660
+ '$ref': '#/definitions/maxItems',
661
+ },
662
+ 'minItems': {
663
+ '$ref': '#/definitions/minItems',
664
+ },
665
+ 'uniqueItems': {
666
+ '$ref': '#/definitions/uniqueItems',
667
+ },
668
+ 'enum': {
669
+ '$ref': '#/definitions/enum',
670
+ },
671
+ 'multipleOf': {
672
+ '$ref': '#/definitions/multipleOf',
673
+ },
674
+ },
675
+ },
676
+ 'formDataParameterSubSchema': {
677
+ 'additionalProperties': false,
678
+ 'patternProperties': {
679
+ '^x-': {
680
+ '$ref': '#/definitions/vendorExtension',
681
+ },
682
+ },
683
+ 'properties': {
684
+ 'required': {
685
+ 'type': 'boolean',
686
+ 'description': 'Determines whether or not this parameter is required or optional.',
687
+ 'default': false,
688
+ },
689
+ 'in': {
690
+ 'type': 'string',
691
+ 'description': 'Determines the location of the parameter.',
692
+ 'enum': ['formData'],
693
+ },
694
+ 'description': {
695
+ 'type': 'string',
696
+ 'description': 'A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.',
697
+ },
698
+ 'name': {
699
+ 'type': 'string',
700
+ 'description': 'The name of the parameter.',
701
+ },
702
+ 'allowEmptyValue': {
703
+ 'type': 'boolean',
704
+ 'default': false,
705
+ 'description': 'allows sending a parameter by name only or with an empty value.',
706
+ },
707
+ 'type': {
708
+ 'type': 'string',
709
+ 'enum': ['string', 'number', 'boolean', 'integer', 'array', 'file'],
710
+ },
711
+ 'format': {
712
+ 'type': 'string',
713
+ },
714
+ 'items': {
715
+ '$ref': '#/definitions/primitivesItems',
716
+ },
717
+ 'collectionFormat': {
718
+ '$ref': '#/definitions/collectionFormatWithMulti',
719
+ },
720
+ 'default': {
721
+ '$ref': '#/definitions/default',
722
+ },
723
+ 'maximum': {
724
+ '$ref': '#/definitions/maximum',
725
+ },
726
+ 'exclusiveMaximum': {
727
+ '$ref': '#/definitions/exclusiveMaximum',
728
+ },
729
+ 'minimum': {
730
+ '$ref': '#/definitions/minimum',
731
+ },
732
+ 'exclusiveMinimum': {
733
+ '$ref': '#/definitions/exclusiveMinimum',
734
+ },
735
+ 'maxLength': {
736
+ '$ref': '#/definitions/maxLength',
737
+ },
738
+ 'minLength': {
739
+ '$ref': '#/definitions/minLength',
740
+ },
741
+ 'pattern': {
742
+ '$ref': '#/definitions/pattern',
743
+ },
744
+ 'maxItems': {
745
+ '$ref': '#/definitions/maxItems',
746
+ },
747
+ 'minItems': {
748
+ '$ref': '#/definitions/minItems',
749
+ },
750
+ 'uniqueItems': {
751
+ '$ref': '#/definitions/uniqueItems',
752
+ },
753
+ 'enum': {
754
+ '$ref': '#/definitions/enum',
755
+ },
756
+ 'multipleOf': {
757
+ '$ref': '#/definitions/multipleOf',
758
+ },
759
+ },
760
+ },
761
+ 'pathParameterSubSchema': {
762
+ 'additionalProperties': false,
763
+ 'patternProperties': {
764
+ '^x-': {
765
+ '$ref': '#/definitions/vendorExtension',
766
+ },
767
+ },
768
+ 'required': ['required'],
769
+ 'properties': {
770
+ 'required': {
771
+ 'type': 'boolean',
772
+ 'enum': [true],
773
+ 'description': 'Determines whether or not this parameter is required or optional.',
774
+ },
775
+ 'in': {
776
+ 'type': 'string',
777
+ 'description': 'Determines the location of the parameter.',
778
+ 'enum': ['path'],
779
+ },
780
+ 'description': {
781
+ 'type': 'string',
782
+ 'description': 'A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.',
783
+ },
784
+ 'name': {
785
+ 'type': 'string',
786
+ 'description': 'The name of the parameter.',
787
+ },
788
+ 'type': {
789
+ 'type': 'string',
790
+ 'enum': ['string', 'number', 'boolean', 'integer', 'array'],
791
+ },
792
+ 'format': {
793
+ 'type': 'string',
794
+ },
795
+ 'items': {
796
+ '$ref': '#/definitions/primitivesItems',
797
+ },
798
+ 'collectionFormat': {
799
+ '$ref': '#/definitions/collectionFormat',
800
+ },
801
+ 'default': {
802
+ '$ref': '#/definitions/default',
803
+ },
804
+ 'maximum': {
805
+ '$ref': '#/definitions/maximum',
806
+ },
807
+ 'exclusiveMaximum': {
808
+ '$ref': '#/definitions/exclusiveMaximum',
809
+ },
810
+ 'minimum': {
811
+ '$ref': '#/definitions/minimum',
812
+ },
813
+ 'exclusiveMinimum': {
814
+ '$ref': '#/definitions/exclusiveMinimum',
815
+ },
816
+ 'maxLength': {
817
+ '$ref': '#/definitions/maxLength',
818
+ },
819
+ 'minLength': {
820
+ '$ref': '#/definitions/minLength',
821
+ },
822
+ 'pattern': {
823
+ '$ref': '#/definitions/pattern',
824
+ },
825
+ 'maxItems': {
826
+ '$ref': '#/definitions/maxItems',
827
+ },
828
+ 'minItems': {
829
+ '$ref': '#/definitions/minItems',
830
+ },
831
+ 'uniqueItems': {
832
+ '$ref': '#/definitions/uniqueItems',
833
+ },
834
+ 'enum': {
835
+ '$ref': '#/definitions/enum',
836
+ },
837
+ 'multipleOf': {
838
+ '$ref': '#/definitions/multipleOf',
839
+ },
840
+ },
841
+ },
842
+ 'nonBodyParameter': {
843
+ 'type': 'object',
844
+ 'required': ['name', 'in', 'type'],
845
+ 'oneOf': [
846
+ {
847
+ '$ref': '#/definitions/headerParameterSubSchema',
848
+ },
849
+ {
850
+ '$ref': '#/definitions/formDataParameterSubSchema',
851
+ },
852
+ {
853
+ '$ref': '#/definitions/queryParameterSubSchema',
854
+ },
855
+ {
856
+ '$ref': '#/definitions/pathParameterSubSchema',
857
+ },
858
+ ],
859
+ },
860
+ 'parameter': {
861
+ 'oneOf': [
862
+ {
863
+ '$ref': '#/definitions/bodyParameter',
864
+ },
865
+ {
866
+ '$ref': '#/definitions/nonBodyParameter',
867
+ },
868
+ ],
869
+ },
870
+ 'schema': {
871
+ 'type': 'object',
872
+ 'description': 'A deterministic version of a JSON Schema object.',
873
+ 'patternProperties': {
874
+ '^x-': {
875
+ '$ref': '#/definitions/vendorExtension',
876
+ },
877
+ },
878
+ 'properties': {
879
+ '$ref': {
880
+ 'type': 'string',
881
+ },
882
+ 'format': {
883
+ 'type': 'string',
884
+ },
885
+ 'title': {
886
+ '$ref': 'http://json-schema.org/draft-04/schema#/properties/title',
887
+ },
888
+ 'description': {
889
+ '$ref': 'http://json-schema.org/draft-04/schema#/properties/description',
890
+ },
891
+ 'default': {
892
+ '$ref': 'http://json-schema.org/draft-04/schema#/properties/default',
893
+ },
894
+ 'multipleOf': {
895
+ '$ref': 'http://json-schema.org/draft-04/schema#/properties/multipleOf',
896
+ },
897
+ 'maximum': {
898
+ '$ref': 'http://json-schema.org/draft-04/schema#/properties/maximum',
899
+ },
900
+ 'exclusiveMaximum': {
901
+ '$ref': 'http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum',
902
+ },
903
+ 'minimum': {
904
+ '$ref': 'http://json-schema.org/draft-04/schema#/properties/minimum',
905
+ },
906
+ 'exclusiveMinimum': {
907
+ '$ref': 'http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum',
908
+ },
909
+ 'maxLength': {
910
+ '$ref': 'http://json-schema.org/draft-04/schema#/definitions/positiveInteger',
911
+ },
912
+ 'minLength': {
913
+ '$ref': 'http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0',
914
+ },
915
+ 'pattern': {
916
+ '$ref': 'http://json-schema.org/draft-04/schema#/properties/pattern',
917
+ },
918
+ 'maxItems': {
919
+ '$ref': 'http://json-schema.org/draft-04/schema#/definitions/positiveInteger',
920
+ },
921
+ 'minItems': {
922
+ '$ref': 'http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0',
923
+ },
924
+ 'uniqueItems': {
925
+ '$ref': 'http://json-schema.org/draft-04/schema#/properties/uniqueItems',
926
+ },
927
+ 'maxProperties': {
928
+ '$ref': 'http://json-schema.org/draft-04/schema#/definitions/positiveInteger',
929
+ },
930
+ 'minProperties': {
931
+ '$ref': 'http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0',
932
+ },
933
+ 'required': {
934
+ '$ref': 'http://json-schema.org/draft-04/schema#/definitions/stringArray',
935
+ },
936
+ 'enum': {
937
+ '$ref': 'http://json-schema.org/draft-04/schema#/properties/enum',
938
+ },
939
+ 'additionalProperties': {
940
+ 'anyOf': [
941
+ {
942
+ '$ref': '#/definitions/schema',
943
+ },
944
+ {
945
+ 'type': 'boolean',
946
+ },
947
+ ],
948
+ 'default': {},
949
+ },
950
+ 'type': {
951
+ '$ref': 'http://json-schema.org/draft-04/schema#/properties/type',
952
+ },
953
+ 'items': {
954
+ 'anyOf': [
955
+ {
956
+ '$ref': '#/definitions/schema',
957
+ },
958
+ {
959
+ 'type': 'array',
960
+ 'minItems': 1,
961
+ 'items': {
962
+ '$ref': '#/definitions/schema',
963
+ },
964
+ },
965
+ ],
966
+ 'default': {},
967
+ },
968
+ 'allOf': {
969
+ 'type': 'array',
970
+ 'minItems': 1,
971
+ 'items': {
972
+ '$ref': '#/definitions/schema',
973
+ },
974
+ },
975
+ 'properties': {
976
+ 'type': 'object',
977
+ 'additionalProperties': {
978
+ '$ref': '#/definitions/schema',
979
+ },
980
+ 'default': {},
981
+ },
982
+ 'discriminator': {
983
+ 'type': 'string',
984
+ },
985
+ 'readOnly': {
986
+ 'type': 'boolean',
987
+ 'default': false,
988
+ },
989
+ 'xml': {
990
+ '$ref': '#/definitions/xml',
991
+ },
992
+ 'externalDocs': {
993
+ '$ref': '#/definitions/externalDocs',
994
+ },
995
+ 'example': {},
996
+ },
997
+ 'additionalProperties': false,
998
+ },
999
+ 'fileSchema': {
1000
+ 'type': 'object',
1001
+ 'description': 'A deterministic version of a JSON Schema object.',
1002
+ 'patternProperties': {
1003
+ '^x-': {
1004
+ '$ref': '#/definitions/vendorExtension',
1005
+ },
1006
+ },
1007
+ 'required': ['type'],
1008
+ 'properties': {
1009
+ 'format': {
1010
+ 'type': 'string',
1011
+ },
1012
+ 'title': {
1013
+ '$ref': 'http://json-schema.org/draft-04/schema#/properties/title',
1014
+ },
1015
+ 'description': {
1016
+ '$ref': 'http://json-schema.org/draft-04/schema#/properties/description',
1017
+ },
1018
+ 'default': {
1019
+ '$ref': 'http://json-schema.org/draft-04/schema#/properties/default',
1020
+ },
1021
+ 'required': {
1022
+ '$ref': 'http://json-schema.org/draft-04/schema#/definitions/stringArray',
1023
+ },
1024
+ 'type': {
1025
+ 'type': 'string',
1026
+ 'enum': ['file'],
1027
+ },
1028
+ 'readOnly': {
1029
+ 'type': 'boolean',
1030
+ 'default': false,
1031
+ },
1032
+ 'externalDocs': {
1033
+ '$ref': '#/definitions/externalDocs',
1034
+ },
1035
+ 'example': {},
1036
+ },
1037
+ 'additionalProperties': false,
1038
+ },
1039
+ 'primitivesItems': {
1040
+ 'type': 'object',
1041
+ 'additionalProperties': false,
1042
+ 'properties': {
1043
+ 'type': {
1044
+ 'type': 'string',
1045
+ 'enum': ['string', 'number', 'integer', 'boolean', 'array'],
1046
+ },
1047
+ 'format': {
1048
+ 'type': 'string',
1049
+ },
1050
+ 'items': {
1051
+ '$ref': '#/definitions/primitivesItems',
1052
+ },
1053
+ 'collectionFormat': {
1054
+ '$ref': '#/definitions/collectionFormat',
1055
+ },
1056
+ 'default': {
1057
+ '$ref': '#/definitions/default',
1058
+ },
1059
+ 'maximum': {
1060
+ '$ref': '#/definitions/maximum',
1061
+ },
1062
+ 'exclusiveMaximum': {
1063
+ '$ref': '#/definitions/exclusiveMaximum',
1064
+ },
1065
+ 'minimum': {
1066
+ '$ref': '#/definitions/minimum',
1067
+ },
1068
+ 'exclusiveMinimum': {
1069
+ '$ref': '#/definitions/exclusiveMinimum',
1070
+ },
1071
+ 'maxLength': {
1072
+ '$ref': '#/definitions/maxLength',
1073
+ },
1074
+ 'minLength': {
1075
+ '$ref': '#/definitions/minLength',
1076
+ },
1077
+ 'pattern': {
1078
+ '$ref': '#/definitions/pattern',
1079
+ },
1080
+ 'maxItems': {
1081
+ '$ref': '#/definitions/maxItems',
1082
+ },
1083
+ 'minItems': {
1084
+ '$ref': '#/definitions/minItems',
1085
+ },
1086
+ 'uniqueItems': {
1087
+ '$ref': '#/definitions/uniqueItems',
1088
+ },
1089
+ 'enum': {
1090
+ '$ref': '#/definitions/enum',
1091
+ },
1092
+ 'multipleOf': {
1093
+ '$ref': '#/definitions/multipleOf',
1094
+ },
1095
+ },
1096
+ 'patternProperties': {
1097
+ '^x-': {
1098
+ '$ref': '#/definitions/vendorExtension',
1099
+ },
1100
+ },
1101
+ },
1102
+ 'security': {
1103
+ 'type': 'array',
1104
+ 'items': {
1105
+ '$ref': '#/definitions/securityRequirement',
1106
+ },
1107
+ 'uniqueItems': true,
1108
+ },
1109
+ 'securityRequirement': {
1110
+ 'type': 'object',
1111
+ 'additionalProperties': {
1112
+ 'type': 'array',
1113
+ 'items': {
1114
+ 'type': 'string',
1115
+ },
1116
+ 'uniqueItems': true,
1117
+ },
1118
+ },
1119
+ 'xml': {
1120
+ 'type': 'object',
1121
+ 'additionalProperties': false,
1122
+ 'properties': {
1123
+ 'name': {
1124
+ 'type': 'string',
1125
+ },
1126
+ 'namespace': {
1127
+ 'type': 'string',
1128
+ },
1129
+ 'prefix': {
1130
+ 'type': 'string',
1131
+ },
1132
+ 'attribute': {
1133
+ 'type': 'boolean',
1134
+ 'default': false,
1135
+ },
1136
+ 'wrapped': {
1137
+ 'type': 'boolean',
1138
+ 'default': false,
1139
+ },
1140
+ },
1141
+ 'patternProperties': {
1142
+ '^x-': {
1143
+ '$ref': '#/definitions/vendorExtension',
1144
+ },
1145
+ },
1146
+ },
1147
+ 'tag': {
1148
+ 'type': 'object',
1149
+ 'additionalProperties': false,
1150
+ 'required': ['name'],
1151
+ 'properties': {
1152
+ 'name': {
1153
+ 'type': 'string',
1154
+ },
1155
+ 'description': {
1156
+ 'type': 'string',
1157
+ },
1158
+ 'externalDocs': {
1159
+ '$ref': '#/definitions/externalDocs',
1160
+ },
1161
+ },
1162
+ 'patternProperties': {
1163
+ '^x-': {
1164
+ '$ref': '#/definitions/vendorExtension',
1165
+ },
1166
+ },
1167
+ },
1168
+ 'securityDefinitions': {
1169
+ 'type': 'object',
1170
+ 'additionalProperties': {
1171
+ 'oneOf': [
1172
+ {
1173
+ '$ref': '#/definitions/basicAuthenticationSecurity',
1174
+ },
1175
+ {
1176
+ '$ref': '#/definitions/apiKeySecurity',
1177
+ },
1178
+ {
1179
+ '$ref': '#/definitions/oauth2ImplicitSecurity',
1180
+ },
1181
+ {
1182
+ '$ref': '#/definitions/oauth2PasswordSecurity',
1183
+ },
1184
+ {
1185
+ '$ref': '#/definitions/oauth2ApplicationSecurity',
1186
+ },
1187
+ {
1188
+ '$ref': '#/definitions/oauth2AccessCodeSecurity',
1189
+ },
1190
+ ],
1191
+ },
1192
+ },
1193
+ 'basicAuthenticationSecurity': {
1194
+ 'type': 'object',
1195
+ 'additionalProperties': false,
1196
+ 'required': ['type'],
1197
+ 'properties': {
1198
+ 'type': {
1199
+ 'type': 'string',
1200
+ 'enum': ['basic'],
1201
+ },
1202
+ 'description': {
1203
+ 'type': 'string',
1204
+ },
1205
+ },
1206
+ 'patternProperties': {
1207
+ '^x-': {
1208
+ '$ref': '#/definitions/vendorExtension',
1209
+ },
1210
+ },
1211
+ },
1212
+ 'apiKeySecurity': {
1213
+ 'type': 'object',
1214
+ 'additionalProperties': false,
1215
+ 'required': ['type', 'name', 'in'],
1216
+ 'properties': {
1217
+ 'type': {
1218
+ 'type': 'string',
1219
+ 'enum': ['apiKey'],
1220
+ },
1221
+ 'name': {
1222
+ 'type': 'string',
1223
+ },
1224
+ 'in': {
1225
+ 'type': 'string',
1226
+ 'enum': ['header', 'query'],
1227
+ },
1228
+ 'description': {
1229
+ 'type': 'string',
1230
+ },
1231
+ },
1232
+ 'patternProperties': {
1233
+ '^x-': {
1234
+ '$ref': '#/definitions/vendorExtension',
1235
+ },
1236
+ },
1237
+ },
1238
+ 'oauth2ImplicitSecurity': {
1239
+ 'type': 'object',
1240
+ 'additionalProperties': false,
1241
+ 'required': ['type', 'flow', 'authorizationUrl'],
1242
+ 'properties': {
1243
+ 'type': {
1244
+ 'type': 'string',
1245
+ 'enum': ['oauth2'],
1246
+ },
1247
+ 'flow': {
1248
+ 'type': 'string',
1249
+ 'enum': ['implicit'],
1250
+ },
1251
+ 'scopes': {
1252
+ '$ref': '#/definitions/oauth2Scopes',
1253
+ },
1254
+ 'authorizationUrl': {
1255
+ 'type': 'string',
1256
+ 'format': 'uri',
1257
+ },
1258
+ 'description': {
1259
+ 'type': 'string',
1260
+ },
1261
+ },
1262
+ 'patternProperties': {
1263
+ '^x-': {
1264
+ '$ref': '#/definitions/vendorExtension',
1265
+ },
1266
+ },
1267
+ },
1268
+ 'oauth2PasswordSecurity': {
1269
+ 'type': 'object',
1270
+ 'additionalProperties': false,
1271
+ 'required': ['type', 'flow', 'tokenUrl'],
1272
+ 'properties': {
1273
+ 'type': {
1274
+ 'type': 'string',
1275
+ 'enum': ['oauth2'],
1276
+ },
1277
+ 'flow': {
1278
+ 'type': 'string',
1279
+ 'enum': ['password'],
1280
+ },
1281
+ 'scopes': {
1282
+ '$ref': '#/definitions/oauth2Scopes',
1283
+ },
1284
+ 'tokenUrl': {
1285
+ 'type': 'string',
1286
+ 'format': 'uri',
1287
+ },
1288
+ 'description': {
1289
+ 'type': 'string',
1290
+ },
1291
+ },
1292
+ 'patternProperties': {
1293
+ '^x-': {
1294
+ '$ref': '#/definitions/vendorExtension',
1295
+ },
1296
+ },
1297
+ },
1298
+ 'oauth2ApplicationSecurity': {
1299
+ 'type': 'object',
1300
+ 'additionalProperties': false,
1301
+ 'required': ['type', 'flow', 'tokenUrl'],
1302
+ 'properties': {
1303
+ 'type': {
1304
+ 'type': 'string',
1305
+ 'enum': ['oauth2'],
1306
+ },
1307
+ 'flow': {
1308
+ 'type': 'string',
1309
+ 'enum': ['application'],
1310
+ },
1311
+ 'scopes': {
1312
+ '$ref': '#/definitions/oauth2Scopes',
1313
+ },
1314
+ 'tokenUrl': {
1315
+ 'type': 'string',
1316
+ 'format': 'uri',
1317
+ },
1318
+ 'description': {
1319
+ 'type': 'string',
1320
+ },
1321
+ },
1322
+ 'patternProperties': {
1323
+ '^x-': {
1324
+ '$ref': '#/definitions/vendorExtension',
1325
+ },
1326
+ },
1327
+ },
1328
+ 'oauth2AccessCodeSecurity': {
1329
+ 'type': 'object',
1330
+ 'additionalProperties': false,
1331
+ 'required': ['type', 'flow', 'authorizationUrl', 'tokenUrl'],
1332
+ 'properties': {
1333
+ 'type': {
1334
+ 'type': 'string',
1335
+ 'enum': ['oauth2'],
1336
+ },
1337
+ 'flow': {
1338
+ 'type': 'string',
1339
+ 'enum': ['accessCode'],
1340
+ },
1341
+ 'scopes': {
1342
+ '$ref': '#/definitions/oauth2Scopes',
1343
+ },
1344
+ 'authorizationUrl': {
1345
+ 'type': 'string',
1346
+ 'format': 'uri',
1347
+ },
1348
+ 'tokenUrl': {
1349
+ 'type': 'string',
1350
+ 'format': 'uri',
1351
+ },
1352
+ 'description': {
1353
+ 'type': 'string',
1354
+ },
1355
+ },
1356
+ 'patternProperties': {
1357
+ '^x-': {
1358
+ '$ref': '#/definitions/vendorExtension',
1359
+ },
1360
+ },
1361
+ },
1362
+ 'oauth2Scopes': {
1363
+ 'type': 'object',
1364
+ 'additionalProperties': {
1365
+ 'type': 'string',
1366
+ },
1367
+ },
1368
+ 'mediaTypeList': {
1369
+ 'type': 'array',
1370
+ 'items': {
1371
+ '$ref': '#/definitions/mimeType',
1372
+ },
1373
+ 'uniqueItems': true,
1374
+ },
1375
+ 'parametersList': {
1376
+ 'type': 'array',
1377
+ 'description': 'The parameters needed to send a valid API call.',
1378
+ 'additionalItems': false,
1379
+ 'items': {
1380
+ 'oneOf': [
1381
+ {
1382
+ '$ref': '#/definitions/parameter',
1383
+ },
1384
+ {
1385
+ '$ref': '#/definitions/jsonReference',
1386
+ },
1387
+ ],
1388
+ },
1389
+ 'uniqueItems': true,
1390
+ },
1391
+ 'schemesList': {
1392
+ 'type': 'array',
1393
+ 'description': 'The transfer protocol of the API.',
1394
+ 'items': {
1395
+ 'type': 'string',
1396
+ 'enum': ['http', 'https', 'ws', 'wss'],
1397
+ },
1398
+ 'uniqueItems': true,
1399
+ },
1400
+ 'collectionFormat': {
1401
+ 'type': 'string',
1402
+ 'enum': ['csv', 'ssv', 'tsv', 'pipes'],
1403
+ 'default': 'csv',
1404
+ },
1405
+ 'collectionFormatWithMulti': {
1406
+ 'type': 'string',
1407
+ 'enum': ['csv', 'ssv', 'tsv', 'pipes', 'multi'],
1408
+ 'default': 'csv',
1409
+ },
1410
+ 'title': {
1411
+ '$ref': 'http://json-schema.org/draft-04/schema#/properties/title',
1412
+ },
1413
+ 'description': {
1414
+ '$ref': 'http://json-schema.org/draft-04/schema#/properties/description',
1415
+ },
1416
+ 'default': {
1417
+ '$ref': 'http://json-schema.org/draft-04/schema#/properties/default',
1418
+ },
1419
+ 'multipleOf': {
1420
+ '$ref': 'http://json-schema.org/draft-04/schema#/properties/multipleOf',
1421
+ },
1422
+ 'maximum': {
1423
+ '$ref': 'http://json-schema.org/draft-04/schema#/properties/maximum',
1424
+ },
1425
+ 'exclusiveMaximum': {
1426
+ '$ref': 'http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum',
1427
+ },
1428
+ 'minimum': {
1429
+ '$ref': 'http://json-schema.org/draft-04/schema#/properties/minimum',
1430
+ },
1431
+ 'exclusiveMinimum': {
1432
+ '$ref': 'http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum',
1433
+ },
1434
+ 'maxLength': {
1435
+ '$ref': 'http://json-schema.org/draft-04/schema#/definitions/positiveInteger',
1436
+ },
1437
+ 'minLength': {
1438
+ '$ref': 'http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0',
1439
+ },
1440
+ 'pattern': {
1441
+ '$ref': 'http://json-schema.org/draft-04/schema#/properties/pattern',
1442
+ },
1443
+ 'maxItems': {
1444
+ '$ref': 'http://json-schema.org/draft-04/schema#/definitions/positiveInteger',
1445
+ },
1446
+ 'minItems': {
1447
+ '$ref': 'http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0',
1448
+ },
1449
+ 'uniqueItems': {
1450
+ '$ref': 'http://json-schema.org/draft-04/schema#/properties/uniqueItems',
1451
+ },
1452
+ 'enum': {
1453
+ '$ref': 'http://json-schema.org/draft-04/schema#/properties/enum',
1454
+ },
1455
+ 'jsonReference': {
1456
+ 'type': 'object',
1457
+ 'required': ['$ref'],
1458
+ 'additionalProperties': false,
1459
+ 'properties': {
1460
+ '$ref': {
1461
+ 'type': 'string',
1462
+ },
1463
+ },
1464
+ },
1465
+ },
1466
+ };