@scalar/openapi-parser 0.28.16 → 0.29.1

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