3scale_toolbox 0.13.0 → 0.17.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. checksums.yaml +4 -4
  2. data/3scale_toolbox.gemspec +4 -3
  3. data/README.md +31 -10
  4. data/lib/3scale_toolbox.rb +5 -2
  5. data/lib/3scale_toolbox/attribute_filters.rb +2 -0
  6. data/lib/3scale_toolbox/attribute_filters/attribute_filter.rb +9 -0
  7. data/lib/3scale_toolbox/attribute_filters/service_id_from_ref_filter.rb +30 -0
  8. data/lib/3scale_toolbox/cli.rb +4 -0
  9. data/lib/3scale_toolbox/cli/custom_table_printer.rb +32 -0
  10. data/lib/3scale_toolbox/cli/error_handler.rb +17 -14
  11. data/lib/3scale_toolbox/cli/json_printer.rb +13 -0
  12. data/lib/3scale_toolbox/cli/output_flag.rb +20 -0
  13. data/lib/3scale_toolbox/cli/yaml_printer.rb +13 -0
  14. data/lib/3scale_toolbox/commands.rb +5 -1
  15. data/lib/3scale_toolbox/commands/activedocs_command/apply_command.rb +34 -11
  16. data/lib/3scale_toolbox/commands/activedocs_command/create_command.rb +22 -7
  17. data/lib/3scale_toolbox/commands/activedocs_command/list_command.rb +21 -11
  18. data/lib/3scale_toolbox/commands/application_command/apply_command.rb +27 -4
  19. data/lib/3scale_toolbox/commands/application_command/create_command.rb +16 -1
  20. data/lib/3scale_toolbox/commands/application_command/list_command.rb +10 -13
  21. data/lib/3scale_toolbox/commands/application_command/show_command.rb +8 -14
  22. data/lib/3scale_toolbox/commands/backend_command.rb +22 -0
  23. data/lib/3scale_toolbox/commands/backend_command/copy_command.rb +65 -0
  24. data/lib/3scale_toolbox/commands/backend_command/copy_command/copy_mapping_rules_task.rb +52 -0
  25. data/lib/3scale_toolbox/commands/backend_command/copy_command/copy_methods_task.rb +40 -0
  26. data/lib/3scale_toolbox/commands/backend_command/copy_command/copy_metrics_task.rb +30 -0
  27. data/lib/3scale_toolbox/commands/backend_command/copy_command/create_or_update_target_backend_task.rb +45 -0
  28. data/lib/3scale_toolbox/commands/backend_command/copy_command/task.rb +89 -0
  29. data/lib/3scale_toolbox/commands/copy_command.rb +2 -2
  30. data/lib/3scale_toolbox/commands/copy_command/service_command.rb +40 -0
  31. data/lib/3scale_toolbox/commands/import_command/openapi.rb +29 -7
  32. data/lib/3scale_toolbox/commands/import_command/openapi/create_activedocs_step.rb +4 -17
  33. data/lib/3scale_toolbox/commands/import_command/openapi/create_service_step.rb +1 -5
  34. data/lib/3scale_toolbox/commands/import_command/openapi/mapping_rule.rb +3 -2
  35. data/lib/3scale_toolbox/commands/import_command/openapi/step.rb +43 -5
  36. data/lib/3scale_toolbox/commands/import_command/openapi/update_policies_step.rb +9 -10
  37. data/lib/3scale_toolbox/commands/import_command/openapi/update_service_oidc_conf_step.rb +2 -17
  38. data/lib/3scale_toolbox/commands/import_command/openapi/update_service_proxy_step.rb +10 -10
  39. data/lib/3scale_toolbox/commands/methods_command/apply_command.rb +26 -4
  40. data/lib/3scale_toolbox/commands/methods_command/create_command.rb +23 -1
  41. data/lib/3scale_toolbox/commands/methods_command/list_command.rb +11 -9
  42. data/lib/3scale_toolbox/commands/metrics_command/apply_command.rb +26 -4
  43. data/lib/3scale_toolbox/commands/metrics_command/create_command.rb +23 -1
  44. data/lib/3scale_toolbox/commands/metrics_command/list_command.rb +7 -12
  45. data/lib/3scale_toolbox/commands/plans_command/apply_command.rb +36 -7
  46. data/lib/3scale_toolbox/commands/plans_command/create_command.rb +23 -1
  47. data/lib/3scale_toolbox/commands/plans_command/import/import_plan_limits_step.rb +11 -12
  48. data/lib/3scale_toolbox/commands/plans_command/import/import_plan_pricing_rules_step.rb +11 -12
  49. data/lib/3scale_toolbox/commands/plans_command/list_command.rb +8 -13
  50. data/lib/3scale_toolbox/commands/plans_command/show_command.rb +6 -14
  51. data/lib/3scale_toolbox/commands/product_command.rb +22 -0
  52. data/lib/3scale_toolbox/commands/product_command/copy_command.rb +78 -0
  53. data/lib/3scale_toolbox/commands/product_command/copy_command/copy_backends_task.rb +71 -0
  54. data/lib/3scale_toolbox/commands/product_command/copy_command/delete_target_backend_usages_task.rb +48 -0
  55. data/lib/3scale_toolbox/commands/proxy_config_command.rb +3 -0
  56. data/lib/3scale_toolbox/commands/proxy_config_command/export_command.rb +74 -0
  57. data/lib/3scale_toolbox/commands/proxy_config_command/helper.rb +15 -0
  58. data/lib/3scale_toolbox/commands/proxy_config_command/list_command.rb +13 -29
  59. data/lib/3scale_toolbox/commands/proxy_config_command/show_command.rb +20 -23
  60. data/lib/3scale_toolbox/commands/service_command.rb +7 -5
  61. data/lib/3scale_toolbox/commands/service_command/apply_command.rb +69 -58
  62. data/lib/3scale_toolbox/commands/service_command/copy_command.rb +95 -0
  63. data/lib/3scale_toolbox/commands/service_command/copy_command/bump_proxy_version_task.rb +36 -0
  64. data/lib/3scale_toolbox/commands/service_command/copy_command/copy_activedocs_task.rb +46 -0
  65. data/lib/3scale_toolbox/commands/service_command/copy_command/copy_app_plans_task.rb +35 -0
  66. data/lib/3scale_toolbox/commands/service_command/copy_command/copy_limits_task.rb +39 -0
  67. data/lib/3scale_toolbox/commands/service_command/copy_command/copy_mapping_rules_task.rb +35 -0
  68. data/lib/3scale_toolbox/commands/service_command/copy_command/copy_methods_task.rb +40 -0
  69. data/lib/3scale_toolbox/commands/service_command/copy_command/copy_metrics_task.rb +37 -0
  70. data/lib/3scale_toolbox/commands/service_command/copy_command/copy_policies_task.rb +17 -0
  71. data/lib/3scale_toolbox/commands/service_command/copy_command/copy_pricingrules_task.rb +44 -0
  72. data/lib/3scale_toolbox/commands/service_command/copy_command/copy_service_proxy_task.rb +32 -0
  73. data/lib/3scale_toolbox/commands/service_command/copy_command/create_or_update_service_task.rb +48 -0
  74. data/lib/3scale_toolbox/commands/service_command/copy_command/destroy_mapping_rules_task.rb +34 -0
  75. data/lib/3scale_toolbox/commands/service_command/copy_command/task.rb +99 -0
  76. data/lib/3scale_toolbox/commands/service_command/create_command.rb +58 -44
  77. data/lib/3scale_toolbox/commands/service_command/delete_command.rb +31 -33
  78. data/lib/3scale_toolbox/commands/service_command/list_command.rb +24 -34
  79. data/lib/3scale_toolbox/commands/service_command/show_command.rb +39 -44
  80. data/lib/3scale_toolbox/commands/update_command.rb +3 -3
  81. data/lib/3scale_toolbox/commands/update_command/{update_service.rb → service_command.rb} +22 -18
  82. data/lib/3scale_toolbox/commands/update_command/service_command/copy_service_settings_task.rb +35 -0
  83. data/lib/3scale_toolbox/commands/update_command/service_command/delete_activedocs_task.rb +26 -0
  84. data/lib/3scale_toolbox/entities.rb +5 -0
  85. data/lib/3scale_toolbox/entities/application_plan.rb +31 -4
  86. data/lib/3scale_toolbox/entities/backend.rb +152 -0
  87. data/lib/3scale_toolbox/entities/backend_mapping_rule.rb +76 -0
  88. data/lib/3scale_toolbox/entities/backend_method.rb +90 -0
  89. data/lib/3scale_toolbox/entities/backend_metric.rb +88 -0
  90. data/lib/3scale_toolbox/entities/backend_usage.rb +99 -0
  91. data/lib/3scale_toolbox/entities/service.rb +18 -3
  92. data/lib/3scale_toolbox/error.rb +53 -0
  93. data/lib/3scale_toolbox/helper.rb +20 -0
  94. data/lib/3scale_toolbox/openapi.rb +2 -0
  95. data/lib/3scale_toolbox/openapi/oas3.rb +232 -0
  96. data/lib/3scale_toolbox/openapi/swagger.rb +192 -0
  97. data/lib/3scale_toolbox/proxy_logger.rb +1 -1
  98. data/lib/3scale_toolbox/version.rb +1 -1
  99. data/licenses.xml +188 -18
  100. data/resources/oas3_meta_schema.json +1654 -0
  101. metadata +68 -28
  102. data/lib/3scale_toolbox/commands/copy_command/copy_service.rb +0 -144
  103. data/lib/3scale_toolbox/commands/import_command/openapi/threescale_api_spec.rb +0 -80
  104. data/lib/3scale_toolbox/swagger.rb +0 -1
  105. data/lib/3scale_toolbox/swagger/swagger.rb +0 -123
  106. data/lib/3scale_toolbox/tasks.rb +0 -15
  107. data/lib/3scale_toolbox/tasks/bump_proxy_version_task.rb +0 -32
  108. data/lib/3scale_toolbox/tasks/copy_activedocs_task.rb +0 -42
  109. data/lib/3scale_toolbox/tasks/copy_app_plans_task.rb +0 -31
  110. data/lib/3scale_toolbox/tasks/copy_limits_task.rb +0 -36
  111. data/lib/3scale_toolbox/tasks/copy_mapping_rules_task.rb +0 -32
  112. data/lib/3scale_toolbox/tasks/copy_methods_task.rb +0 -36
  113. data/lib/3scale_toolbox/tasks/copy_metrics_task.rb +0 -33
  114. data/lib/3scale_toolbox/tasks/copy_policies_task.rb +0 -13
  115. data/lib/3scale_toolbox/tasks/copy_pricingrules_task.rb +0 -41
  116. data/lib/3scale_toolbox/tasks/copy_service_proxy_task.rb +0 -12
  117. data/lib/3scale_toolbox/tasks/copy_service_settings_task.rb +0 -38
  118. data/lib/3scale_toolbox/tasks/copy_task.rb +0 -66
  119. data/lib/3scale_toolbox/tasks/delete_activedocs_task.rb +0 -22
  120. data/lib/3scale_toolbox/tasks/destroy_mapping_rules_task.rb +0 -22
  121. data/lib/3scale_toolbox/tasks/helper_task.rb +0 -25
@@ -9,7 +9,7 @@ module ThreeScaleToolbox
9
9
  result = @subject.public_send(name, *args)
10
10
  ensure
11
11
  end_time = ::Process.clock_gettime(::Process::CLOCK_MONOTONIC) - start_time
12
- ::Kernel.warn "-- call #{name} args |#{args.inspect[0..200]}| response |#{result.inspect[0..200]}| - (#{end_time}s)"
12
+ ::Kernel.warn "-- call #{name} args |#{args.inspect[0..2000]}| response |#{result.inspect[0..2000]}| - (#{end_time}s)"
13
13
  result
14
14
  end
15
15
 
@@ -1,3 +1,3 @@
1
1
  module ThreeScaleToolbox
2
- VERSION = '0.13.0'
2
+ VERSION = '0.17.1'
3
3
  end
@@ -3,7 +3,7 @@
3
3
  <dependencies>
4
4
  <dependency>
5
5
  <packageName>3scale-api</packageName>
6
- <version>0.6.0</version>
6
+ <version>1.1.0</version>
7
7
  <licenses>
8
8
  <license>
9
9
  <name>MIT</name>
@@ -13,7 +13,17 @@
13
13
  </dependency>
14
14
  <dependency>
15
15
  <packageName>3scale_toolbox</packageName>
16
- <version>0.13.0</version>
16
+ <version>0.17.1</version>
17
+ <licenses>
18
+ <license>
19
+ <name>MIT</name>
20
+ <url>http://opensource.org/licenses/mit-license</url>
21
+ </license>
22
+ </licenses>
23
+ </dependency>
24
+ <dependency>
25
+ <packageName>activesupport</packageName>
26
+ <version>6.0.3.2</version>
17
27
  <licenses>
18
28
  <license>
19
29
  <name>MIT</name>
@@ -30,10 +40,20 @@
30
40
  <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
31
41
  </license>
32
42
  </licenses>
43
+ </dependency>
44
+ <dependency>
45
+ <packageName>builder</packageName>
46
+ <version>3.2.4</version>
47
+ <licenses>
48
+ <license>
49
+ <name>MIT</name>
50
+ <url>http://opensource.org/licenses/mit-license</url>
51
+ </license>
52
+ </licenses>
33
53
  </dependency>
34
54
  <dependency>
35
55
  <packageName>bundler</packageName>
36
- <version>1.16.1</version>
56
+ <version>1.17.3</version>
37
57
  <licenses>
38
58
  <license>
39
59
  <name>unknown</name>
@@ -50,6 +70,16 @@
50
70
  <url>http://opensource.org/licenses/mit-license</url>
51
71
  </license>
52
72
  </licenses>
73
+ </dependency>
74
+ <dependency>
75
+ <packageName>concurrent-ruby</packageName>
76
+ <version>1.1.6</version>
77
+ <licenses>
78
+ <license>
79
+ <name>MIT</name>
80
+ <url>http://opensource.org/licenses/mit-license</url>
81
+ </license>
82
+ </licenses>
53
83
  </dependency>
54
84
  <dependency>
55
85
  <packageName>crack</packageName>
@@ -63,7 +93,17 @@
63
93
  </dependency>
64
94
  <dependency>
65
95
  <packageName>cri</packageName>
66
- <version>2.15.9</version>
96
+ <version>2.15.10</version>
97
+ <licenses>
98
+ <license>
99
+ <name>MIT</name>
100
+ <url>http://opensource.org/licenses/mit-license</url>
101
+ </license>
102
+ </licenses>
103
+ </dependency>
104
+ <dependency>
105
+ <packageName>deep_merge</packageName>
106
+ <version>1.2.1</version>
67
107
  <licenses>
68
108
  <license>
69
109
  <name>MIT</name>
@@ -98,10 +138,40 @@
98
138
  <url>http://opensource.org/licenses/mit-license</url>
99
139
  </license>
100
140
  </licenses>
141
+ </dependency>
142
+ <dependency>
143
+ <packageName>hansi</packageName>
144
+ <version>0.2.0</version>
145
+ <licenses>
146
+ <license>
147
+ <name>MIT</name>
148
+ <url>http://opensource.org/licenses/mit-license</url>
149
+ </license>
150
+ </licenses>
151
+ </dependency>
152
+ <dependency>
153
+ <packageName>hash-deep-merge</packageName>
154
+ <version>0.1.1</version>
155
+ <licenses>
156
+ <license>
157
+ <name>CC0 1.0 Universal</name>
158
+ <url>http://creativecommons.org/publicdomain/zero/1.0</url>
159
+ </license>
160
+ </licenses>
101
161
  </dependency>
102
162
  <dependency>
103
163
  <packageName>hashdiff</packageName>
104
- <version>1.0.0</version>
164
+ <version>1.0.1</version>
165
+ <licenses>
166
+ <license>
167
+ <name>MIT</name>
168
+ <url>http://opensource.org/licenses/mit-license</url>
169
+ </license>
170
+ </licenses>
171
+ </dependency>
172
+ <dependency>
173
+ <packageName>i18n</packageName>
174
+ <version>1.8.3</version>
105
175
  <licenses>
106
176
  <license>
107
177
  <name>MIT</name>
@@ -121,7 +191,7 @@
121
191
  </dependency>
122
192
  <dependency>
123
193
  <packageName>license_finder</packageName>
124
- <version>5.10.2</version>
194
+ <version>5.11.1</version>
125
195
  <licenses>
126
196
  <license>
127
197
  <name>MIT</name>
@@ -131,7 +201,67 @@
131
201
  </dependency>
132
202
  <dependency>
133
203
  <packageName>method_source</packageName>
134
- <version>0.9.2</version>
204
+ <version>1.0.0</version>
205
+ <licenses>
206
+ <license>
207
+ <name>MIT</name>
208
+ <url>http://opensource.org/licenses/mit-license</url>
209
+ </license>
210
+ </licenses>
211
+ </dependency>
212
+ <dependency>
213
+ <packageName>mini_portile2</packageName>
214
+ <version>2.4.0</version>
215
+ <licenses>
216
+ <license>
217
+ <name>MIT</name>
218
+ <url>http://opensource.org/licenses/mit-license</url>
219
+ </license>
220
+ </licenses>
221
+ </dependency>
222
+ <dependency>
223
+ <packageName>minitest</packageName>
224
+ <version>5.14.1</version>
225
+ <licenses>
226
+ <license>
227
+ <name>MIT</name>
228
+ <url>http://opensource.org/licenses/mit-license</url>
229
+ </license>
230
+ </licenses>
231
+ </dependency>
232
+ <dependency>
233
+ <packageName>mustermann</packageName>
234
+ <version>1.1.1</version>
235
+ <licenses>
236
+ <license>
237
+ <name>MIT</name>
238
+ <url>http://opensource.org/licenses/mit-license</url>
239
+ </license>
240
+ </licenses>
241
+ </dependency>
242
+ <dependency>
243
+ <packageName>mustermann-contrib</packageName>
244
+ <version>1.1.1</version>
245
+ <licenses>
246
+ <license>
247
+ <name>MIT</name>
248
+ <url>http://opensource.org/licenses/mit-license</url>
249
+ </license>
250
+ </licenses>
251
+ </dependency>
252
+ <dependency>
253
+ <packageName>nokogiri</packageName>
254
+ <version>1.10.9</version>
255
+ <licenses>
256
+ <license>
257
+ <name>MIT</name>
258
+ <url>http://opensource.org/licenses/mit-license</url>
259
+ </license>
260
+ </licenses>
261
+ </dependency>
262
+ <dependency>
263
+ <packageName>oas_parser</packageName>
264
+ <version>0.25.1</version>
135
265
  <licenses>
136
266
  <license>
137
267
  <name>MIT</name>
@@ -151,7 +281,7 @@
151
281
  </dependency>
152
282
  <dependency>
153
283
  <packageName>pry</packageName>
154
- <version>0.12.2</version>
284
+ <version>0.13.1</version>
155
285
  <licenses>
156
286
  <license>
157
287
  <name>MIT</name>
@@ -161,7 +291,7 @@
161
291
  </dependency>
162
292
  <dependency>
163
293
  <packageName>public_suffix</packageName>
164
- <version>4.0.1</version>
294
+ <version>4.0.4</version>
165
295
  <licenses>
166
296
  <license>
167
297
  <name>MIT</name>
@@ -171,7 +301,7 @@
171
301
  </dependency>
172
302
  <dependency>
173
303
  <packageName>rake</packageName>
174
- <version>10.5.0</version>
304
+ <version>13.0.1</version>
175
305
  <licenses>
176
306
  <license>
177
307
  <name>MIT</name>
@@ -181,7 +311,7 @@
181
311
  </dependency>
182
312
  <dependency>
183
313
  <packageName>rspec</packageName>
184
- <version>3.8.0</version>
314
+ <version>3.9.0</version>
185
315
  <licenses>
186
316
  <license>
187
317
  <name>MIT</name>
@@ -191,7 +321,7 @@
191
321
  </dependency>
192
322
  <dependency>
193
323
  <packageName>rspec-core</packageName>
194
- <version>3.8.2</version>
324
+ <version>3.9.1</version>
195
325
  <licenses>
196
326
  <license>
197
327
  <name>MIT</name>
@@ -201,7 +331,7 @@
201
331
  </dependency>
202
332
  <dependency>
203
333
  <packageName>rspec-expectations</packageName>
204
- <version>3.8.4</version>
334
+ <version>3.9.1</version>
205
335
  <licenses>
206
336
  <license>
207
337
  <name>MIT</name>
@@ -211,7 +341,7 @@
211
341
  </dependency>
212
342
  <dependency>
213
343
  <packageName>rspec-mocks</packageName>
214
- <version>3.8.1</version>
344
+ <version>3.9.1</version>
215
345
  <licenses>
216
346
  <license>
217
347
  <name>MIT</name>
@@ -221,17 +351,27 @@
221
351
  </dependency>
222
352
  <dependency>
223
353
  <packageName>rspec-support</packageName>
224
- <version>3.8.2</version>
354
+ <version>3.9.2</version>
225
355
  <licenses>
226
356
  <license>
227
357
  <name>MIT</name>
228
358
  <url>http://opensource.org/licenses/mit-license</url>
229
359
  </license>
230
360
  </licenses>
361
+ </dependency>
362
+ <dependency>
363
+ <packageName>ruby2_keywords</packageName>
364
+ <version>0.0.2</version>
365
+ <licenses>
366
+ <license>
367
+ <name>ruby</name>
368
+ <url>http://www.ruby-lang.org/en/LICENSE.txt</url>
369
+ </license>
370
+ </licenses>
231
371
  </dependency>
232
372
  <dependency>
233
373
  <packageName>rubyzip</packageName>
234
- <version>1.2.4</version>
374
+ <version>2.3.0</version>
235
375
  <licenses>
236
376
  <license>
237
377
  <name>Simplified BSD</name>
@@ -251,13 +391,23 @@
251
391
  </dependency>
252
392
  <dependency>
253
393
  <packageName>thor</packageName>
254
- <version>0.20.3</version>
394
+ <version>1.0.1</version>
255
395
  <licenses>
256
396
  <license>
257
397
  <name>MIT</name>
258
398
  <url>http://opensource.org/licenses/mit-license</url>
259
399
  </license>
260
400
  </licenses>
401
+ </dependency>
402
+ <dependency>
403
+ <packageName>thread_safe</packageName>
404
+ <version>0.3.6</version>
405
+ <licenses>
406
+ <license>
407
+ <name>Apache 2.0</name>
408
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
409
+ </license>
410
+ </licenses>
261
411
  </dependency>
262
412
  <dependency>
263
413
  <packageName>toml</packageName>
@@ -268,10 +418,20 @@
268
418
  <url>http://opensource.org/licenses/mit-license</url>
269
419
  </license>
270
420
  </licenses>
421
+ </dependency>
422
+ <dependency>
423
+ <packageName>tzinfo</packageName>
424
+ <version>1.2.7</version>
425
+ <licenses>
426
+ <license>
427
+ <name>MIT</name>
428
+ <url>http://opensource.org/licenses/mit-license</url>
429
+ </license>
430
+ </licenses>
271
431
  </dependency>
272
432
  <dependency>
273
433
  <packageName>webmock</packageName>
274
- <version>3.7.5</version>
434
+ <version>3.8.3</version>
275
435
  <licenses>
276
436
  <license>
277
437
  <name>MIT</name>
@@ -298,6 +458,16 @@
298
458
  <url>http://www.ruby-lang.org/en/LICENSE.txt</url>
299
459
  </license>
300
460
  </licenses>
461
+ </dependency>
462
+ <dependency>
463
+ <packageName>zeitwerk</packageName>
464
+ <version>2.3.1</version>
465
+ <licenses>
466
+ <license>
467
+ <name>MIT</name>
468
+ <url>http://opensource.org/licenses/mit-license</url>
469
+ </license>
470
+ </licenses>
301
471
  </dependency>
302
472
  </dependencies>
303
473
  </licenseSummary>
@@ -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
+ }