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