fictium 0.1.0

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