skooma 0.1.0

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