json_schemer 0.2.18 → 2.3.0

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