@amritk/lint 0.0.0 → 0.2.0

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