@kubb/adapter-oas 5.0.0-beta.53 → 5.0.0-beta.55

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.
package/dist/index.d.ts CHANGED
@@ -1,9 +1,742 @@
1
1
  import { t as __name } from "./chunk-C0LytTxp.js";
2
2
  import { AdapterFactoryOptions, ast } from "@kubb/core";
3
- import { DiscriminatorObject as DiscriminatorObject$2, MediaTypeObject as MediaTypeObject$2, OASDocument, ResponseObject as ResponseObject$2, SchemaObject as SchemaObject$2 } from "oas/types";
4
- import { Operation as Operation$1 } from "oas/operation";
5
3
 
4
+ //#region ../../node_modules/.pnpm/@types+json-schema@7.0.15/node_modules/@types/json-schema/index.d.ts
5
+ // ==================================================================================================
6
+ // JSON Schema Draft 04
7
+ // ==================================================================================================
8
+ /**
9
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1
10
+ */
11
+ type JSONSchema4TypeName = "string" //
12
+ | "number" | "integer" | "boolean" | "object" | "array" | "null" | "any";
13
+ /**
14
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-3.5
15
+ */
16
+ type JSONSchema4Type = string //
17
+ | number | boolean | JSONSchema4Object | JSONSchema4Array | null;
18
+ // Workaround for infinite type recursion
19
+ interface JSONSchema4Object {
20
+ [key: string]: JSONSchema4Type;
21
+ }
22
+ // Workaround for infinite type recursion
23
+ // https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540
24
+ interface JSONSchema4Array extends Array<JSONSchema4Type> {}
25
+ /**
26
+ * Meta schema
27
+ *
28
+ * Recommended values:
29
+ * - 'http://json-schema.org/schema#'
30
+ * - 'http://json-schema.org/hyper-schema#'
31
+ * - 'http://json-schema.org/draft-04/schema#'
32
+ * - 'http://json-schema.org/draft-04/hyper-schema#'
33
+ * - 'http://json-schema.org/draft-03/schema#'
34
+ * - 'http://json-schema.org/draft-03/hyper-schema#'
35
+ *
36
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
37
+ */
38
+ type JSONSchema4Version = string;
39
+ /**
40
+ * JSON Schema V4
41
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-04
42
+ */
43
+ interface JSONSchema4 {
44
+ id?: string | undefined;
45
+ $ref?: string | undefined;
46
+ $schema?: JSONSchema4Version | undefined;
47
+ /**
48
+ * This attribute is a string that provides a short description of the
49
+ * instance property.
50
+ *
51
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.21
52
+ */
53
+ title?: string | undefined;
54
+ /**
55
+ * This attribute is a string that provides a full description of the of
56
+ * purpose the instance property.
57
+ *
58
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.22
59
+ */
60
+ description?: string | undefined;
61
+ default?: JSONSchema4Type | undefined;
62
+ multipleOf?: number | undefined;
63
+ maximum?: number | undefined;
64
+ exclusiveMaximum?: boolean | undefined;
65
+ minimum?: number | undefined;
66
+ exclusiveMinimum?: boolean | undefined;
67
+ maxLength?: number | undefined;
68
+ minLength?: number | undefined;
69
+ pattern?: string | undefined;
70
+ /**
71
+ * May only be defined when "items" is defined, and is a tuple of JSONSchemas.
72
+ *
73
+ * This provides a definition for additional items in an array instance
74
+ * when tuple definitions of the items is provided. This can be false
75
+ * to indicate additional items in the array are not allowed, or it can
76
+ * be a schema that defines the schema of the additional items.
77
+ *
78
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.6
79
+ */
80
+ additionalItems?: boolean | JSONSchema4 | undefined;
81
+ /**
82
+ * This attribute defines the allowed items in an instance array, and
83
+ * MUST be a schema or an array of schemas. The default value is an
84
+ * empty schema which allows any value for items in the instance array.
85
+ *
86
+ * When this attribute value is a schema and the instance value is an
87
+ * array, then all the items in the array MUST be valid according to the
88
+ * schema.
89
+ *
90
+ * When this attribute value is an array of schemas and the instance
91
+ * value is an array, each position in the instance array MUST conform
92
+ * to the schema in the corresponding position for this array. This
93
+ * called tuple typing. When tuple typing is used, additional items are
94
+ * allowed, disallowed, or constrained by the "additionalItems"
95
+ * (Section 5.6) attribute using the same rules as
96
+ * "additionalProperties" (Section 5.4) for objects.
97
+ *
98
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.5
99
+ */
100
+ items?: JSONSchema4 | JSONSchema4[] | undefined;
101
+ maxItems?: number | undefined;
102
+ minItems?: number | undefined;
103
+ uniqueItems?: boolean | undefined;
104
+ maxProperties?: number | undefined;
105
+ minProperties?: number | undefined;
106
+ /**
107
+ * This attribute indicates if the instance must have a value, and not
108
+ * be undefined. This is false by default, making the instance
109
+ * optional.
110
+ *
111
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.7
112
+ */
113
+ required?: boolean | string[] | undefined;
114
+ /**
115
+ * This attribute defines a schema for all properties that are not
116
+ * explicitly defined in an object type definition. If specified, the
117
+ * value MUST be a schema or a boolean. If false is provided, no
118
+ * additional properties are allowed beyond the properties defined in
119
+ * the schema. The default value is an empty schema which allows any
120
+ * value for additional properties.
121
+ *
122
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.4
123
+ */
124
+ additionalProperties?: boolean | JSONSchema4 | undefined;
125
+ definitions?: {
126
+ [k: string]: JSONSchema4;
127
+ } | undefined;
128
+ /**
129
+ * This attribute is an object with property definitions that define the
130
+ * valid values of instance object property values. When the instance
131
+ * value is an object, the property values of the instance object MUST
132
+ * conform to the property definitions in this object. In this object,
133
+ * each property definition's value MUST be a schema, and the property's
134
+ * name MUST be the name of the instance property that it defines. The
135
+ * instance property value MUST be valid according to the schema from
136
+ * the property definition. Properties are considered unordered, the
137
+ * order of the instance properties MAY be in any order.
138
+ *
139
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.2
140
+ */
141
+ properties?: {
142
+ [k: string]: JSONSchema4;
143
+ } | undefined;
144
+ /**
145
+ * This attribute is an object that defines the schema for a set of
146
+ * property names of an object instance. The name of each property of
147
+ * this attribute's object is a regular expression pattern in the ECMA
148
+ * 262/Perl 5 format, while the value is a schema. If the pattern
149
+ * matches the name of a property on the instance object, the value of
150
+ * the instance's property MUST be valid against the pattern name's
151
+ * schema value.
152
+ *
153
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.3
154
+ */
155
+ patternProperties?: {
156
+ [k: string]: JSONSchema4;
157
+ } | undefined;
158
+ dependencies?: {
159
+ [k: string]: JSONSchema4 | string[];
160
+ } | undefined;
161
+ /**
162
+ * This provides an enumeration of all possible values that are valid
163
+ * for the instance property. This MUST be an array, and each item in
164
+ * the array represents a possible value for the instance value. If
165
+ * this attribute is defined, the instance value MUST be one of the
166
+ * values in the array in order for the schema to be valid.
167
+ *
168
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.19
169
+ */
170
+ enum?: JSONSchema4Type[] | undefined;
171
+ /**
172
+ * A single type, or a union of simple types
173
+ */
174
+ type?: JSONSchema4TypeName | JSONSchema4TypeName[] | undefined;
175
+ allOf?: JSONSchema4[] | undefined;
176
+ anyOf?: JSONSchema4[] | undefined;
177
+ oneOf?: JSONSchema4[] | undefined;
178
+ not?: JSONSchema4 | undefined;
179
+ /**
180
+ * The value of this property MUST be another schema which will provide
181
+ * a base schema which the current schema will inherit from. The
182
+ * inheritance rules are such that any instance that is valid according
183
+ * to the current schema MUST be valid according to the referenced
184
+ * schema. This MAY also be an array, in which case, the instance MUST
185
+ * be valid for all the schemas in the array. A schema that extends
186
+ * another schema MAY define additional attributes, constrain existing
187
+ * attributes, or add other constraints.
188
+ *
189
+ * Conceptually, the behavior of extends can be seen as validating an
190
+ * instance against all constraints in the extending schema as well as
191
+ * the extended schema(s).
192
+ *
193
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.26
194
+ */
195
+ extends?: string | string[] | undefined;
196
+ /**
197
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-5.6
198
+ */
199
+ [k: string]: any;
200
+ format?: string | undefined;
201
+ }
202
+ // ==================================================================================================
203
+ // JSON Schema Draft 06
204
+ // ==================================================================================================
205
+ type JSONSchema6TypeName = "string" //
206
+ | "number" | "integer" | "boolean" | "object" | "array" | "null" | "any";
207
+ type JSONSchema6Type = string //
208
+ | number | boolean | JSONSchema6Object | JSONSchema6Array | null;
209
+ // Workaround for infinite type recursion
210
+ interface JSONSchema6Object {
211
+ [key: string]: JSONSchema6Type;
212
+ }
213
+ // Workaround for infinite type recursion
214
+ // https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540
215
+ interface JSONSchema6Array extends Array<JSONSchema6Type> {}
216
+ /**
217
+ * Meta schema
218
+ *
219
+ * Recommended values:
220
+ * - 'http://json-schema.org/schema#'
221
+ * - 'http://json-schema.org/hyper-schema#'
222
+ * - 'http://json-schema.org/draft-06/schema#'
223
+ * - 'http://json-schema.org/draft-06/hyper-schema#'
224
+ *
225
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
226
+ */
227
+ type JSONSchema6Version = string;
228
+ /**
229
+ * JSON Schema V6
230
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01
231
+ */
232
+ type JSONSchema6Definition = JSONSchema6 | boolean;
233
+ interface JSONSchema6 {
234
+ $id?: string | undefined;
235
+ $ref?: string | undefined;
236
+ $schema?: JSONSchema6Version | undefined;
237
+ /**
238
+ * Must be strictly greater than 0.
239
+ * A numeric instance is valid only if division by this keyword's value results in an integer.
240
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.1
241
+ */
242
+ multipleOf?: number | undefined;
243
+ /**
244
+ * Representing an inclusive upper limit for a numeric instance.
245
+ * This keyword validates only if the instance is less than or exactly equal to "maximum".
246
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.2
247
+ */
248
+ maximum?: number | undefined;
249
+ /**
250
+ * Representing an exclusive upper limit for a numeric instance.
251
+ * This keyword validates only if the instance is strictly less than (not equal to) to "exclusiveMaximum".
252
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.3
253
+ */
254
+ exclusiveMaximum?: number | undefined;
255
+ /**
256
+ * Representing an inclusive lower limit for a numeric instance.
257
+ * This keyword validates only if the instance is greater than or exactly equal to "minimum".
258
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.4
259
+ */
260
+ minimum?: number | undefined;
261
+ /**
262
+ * Representing an exclusive lower limit for a numeric instance.
263
+ * This keyword validates only if the instance is strictly greater than (not equal to) to "exclusiveMinimum".
264
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.5
265
+ */
266
+ exclusiveMinimum?: number | undefined;
267
+ /**
268
+ * Must be a non-negative integer.
269
+ * A string instance is valid against this keyword if its length is less than, or equal to, the value of this keyword.
270
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.6
271
+ */
272
+ maxLength?: number | undefined;
273
+ /**
274
+ * Must be a non-negative integer.
275
+ * A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword.
276
+ * Omitting this keyword has the same behavior as a value of 0.
277
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.7
278
+ */
279
+ minLength?: number | undefined;
280
+ /**
281
+ * Should be a valid regular expression, according to the ECMA 262 regular expression dialect.
282
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.8
283
+ */
284
+ pattern?: string | undefined;
285
+ /**
286
+ * This keyword determines how child instances validate for arrays, and does not directly validate the immediate instance itself.
287
+ * Omitting this keyword has the same behavior as an empty schema.
288
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.9
289
+ */
290
+ items?: JSONSchema6Definition | JSONSchema6Definition[] | undefined;
291
+ /**
292
+ * This keyword determines how child instances validate for arrays, and does not directly validate the immediate instance itself.
293
+ * If "items" is an array of schemas, validation succeeds if every instance element
294
+ * at a position greater than the size of "items" validates against "additionalItems".
295
+ * Otherwise, "additionalItems" MUST be ignored, as the "items" schema
296
+ * (possibly the default value of an empty schema) is applied to all elements.
297
+ * Omitting this keyword has the same behavior as an empty schema.
298
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.10
299
+ */
300
+ additionalItems?: JSONSchema6Definition | undefined;
301
+ /**
302
+ * Must be a non-negative integer.
303
+ * An array instance is valid against "maxItems" if its size is less than, or equal to, the value of this keyword.
304
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.11
305
+ */
306
+ maxItems?: number | undefined;
307
+ /**
308
+ * Must be a non-negative integer.
309
+ * An array instance is valid against "maxItems" if its size is greater than, or equal to, the value of this keyword.
310
+ * Omitting this keyword has the same behavior as a value of 0.
311
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.12
312
+ */
313
+ minItems?: number | undefined;
314
+ /**
315
+ * If this keyword has boolean value false, the instance validates successfully.
316
+ * If it has boolean value true, the instance validates successfully if all of its elements are unique.
317
+ * Omitting this keyword has the same behavior as a value of false.
318
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.13
319
+ */
320
+ uniqueItems?: boolean | undefined;
321
+ /**
322
+ * An array instance is valid against "contains" if at least one of its elements is valid against the given schema.
323
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.14
324
+ */
325
+ contains?: JSONSchema6Definition | undefined;
326
+ /**
327
+ * Must be a non-negative integer.
328
+ * An object instance is valid against "maxProperties" if its number of properties is less than, or equal to, the value of this keyword.
329
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.15
330
+ */
331
+ maxProperties?: number | undefined;
332
+ /**
333
+ * Must be a non-negative integer.
334
+ * An object instance is valid against "maxProperties" if its number of properties is greater than,
335
+ * or equal to, the value of this keyword.
336
+ * Omitting this keyword has the same behavior as a value of 0.
337
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.16
338
+ */
339
+ minProperties?: number | undefined;
340
+ /**
341
+ * Elements of this array must be unique.
342
+ * An object instance is valid against this keyword if every item in the array is the name of a property in the instance.
343
+ * Omitting this keyword has the same behavior as an empty array.
344
+ *
345
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.17
346
+ */
347
+ required?: string[] | undefined;
348
+ /**
349
+ * This keyword determines how child instances validate for objects, and does not directly validate the immediate instance itself.
350
+ * Validation succeeds if, for each name that appears in both the instance and as a name within this keyword's value,
351
+ * the child instance for that name successfully validates against the corresponding schema.
352
+ * Omitting this keyword has the same behavior as an empty object.
353
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.18
354
+ */
355
+ properties?: {
356
+ [k: string]: JSONSchema6Definition;
357
+ } | undefined;
358
+ /**
359
+ * This attribute is an object that defines the schema for a set of property names of an object instance.
360
+ * The name of each property of this attribute's object is a regular expression pattern in the ECMA 262, while the value is a schema.
361
+ * If the pattern matches the name of a property on the instance object, the value of the instance's property
362
+ * MUST be valid against the pattern name's schema value.
363
+ * Omitting this keyword has the same behavior as an empty object.
364
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.19
365
+ */
366
+ patternProperties?: {
367
+ [k: string]: JSONSchema6Definition;
368
+ } | undefined;
369
+ /**
370
+ * This attribute defines a schema for all properties that are not explicitly defined in an object type definition.
371
+ * If specified, the value MUST be a schema or a boolean.
372
+ * If false is provided, no additional properties are allowed beyond the properties defined in the schema.
373
+ * The default value is an empty schema which allows any value for additional properties.
374
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.20
375
+ */
376
+ additionalProperties?: JSONSchema6Definition | undefined;
377
+ /**
378
+ * This keyword specifies rules that are evaluated if the instance is an object and contains a certain property.
379
+ * Each property specifies a dependency.
380
+ * If the dependency value is an array, each element in the array must be unique.
381
+ * Omitting this keyword has the same behavior as an empty object.
382
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.21
383
+ */
384
+ dependencies?: {
385
+ [k: string]: JSONSchema6Definition | string[];
386
+ } | undefined;
387
+ /**
388
+ * Takes a schema which validates the names of all properties rather than their values.
389
+ * Note the property name that the schema is testing will always be a string.
390
+ * Omitting this keyword has the same behavior as an empty schema.
391
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.22
392
+ */
393
+ propertyNames?: JSONSchema6Definition | undefined;
394
+ /**
395
+ * This provides an enumeration of all possible values that are valid
396
+ * for the instance property. This MUST be an array, and each item in
397
+ * the array represents a possible value for the instance value. If
398
+ * this attribute is defined, the instance value MUST be one of the
399
+ * values in the array in order for the schema to be valid.
400
+ *
401
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.23
402
+ */
403
+ enum?: JSONSchema6Type[] | undefined;
404
+ /**
405
+ * More readable form of a one-element "enum"
406
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.24
407
+ */
408
+ const?: JSONSchema6Type | undefined;
409
+ /**
410
+ * A single type, or a union of simple types
411
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.25
412
+ */
413
+ type?: JSONSchema6TypeName | JSONSchema6TypeName[] | undefined;
414
+ /**
415
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26
416
+ */
417
+ allOf?: JSONSchema6Definition[] | undefined;
418
+ /**
419
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27
420
+ */
421
+ anyOf?: JSONSchema6Definition[] | undefined;
422
+ /**
423
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28
424
+ */
425
+ oneOf?: JSONSchema6Definition[] | undefined;
426
+ /**
427
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.29
428
+ */
429
+ not?: JSONSchema6Definition | undefined;
430
+ /**
431
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.1
432
+ */
433
+ definitions?: {
434
+ [k: string]: JSONSchema6Definition;
435
+ } | undefined;
436
+ /**
437
+ * This attribute is a string that provides a short description of the instance property.
438
+ *
439
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.2
440
+ */
441
+ title?: string | undefined;
442
+ /**
443
+ * This attribute is a string that provides a full description of the of purpose the instance property.
444
+ *
445
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.2
446
+ */
447
+ description?: string | undefined;
448
+ /**
449
+ * This keyword can be used to supply a default JSON value associated with a particular schema.
450
+ * It is RECOMMENDED that a default value be valid against the associated schema.
451
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.3
452
+ */
453
+ default?: JSONSchema6Type | undefined;
454
+ /**
455
+ * Array of examples with no validation effect the value of "default" is usable as an example without repeating it under this keyword
456
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.4
457
+ */
458
+ examples?: JSONSchema6Type[] | undefined;
459
+ /**
460
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-8
461
+ */
462
+ format?: string | undefined;
463
+ }
464
+ // ==================================================================================================
465
+ // JSON Schema Draft 07
466
+ // ==================================================================================================
467
+ // https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
468
+ // --------------------------------------------------------------------------------------------------
469
+ /**
470
+ * Primitive type
471
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1
472
+ */
473
+ type JSONSchema7TypeName = "string" //
474
+ | "number" | "integer" | "boolean" | "object" | "array" | "null";
475
+ /**
476
+ * Primitive type
477
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1
478
+ */
479
+ type JSONSchema7Type = string //
480
+ | number | boolean | JSONSchema7Object | JSONSchema7Array | null;
481
+ // Workaround for infinite type recursion
482
+ interface JSONSchema7Object {
483
+ [key: string]: JSONSchema7Type;
484
+ }
485
+ // Workaround for infinite type recursion
486
+ // https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540
487
+ interface JSONSchema7Array extends Array<JSONSchema7Type> {}
488
+ /**
489
+ * Meta schema
490
+ *
491
+ * Recommended values:
492
+ * - 'http://json-schema.org/schema#'
493
+ * - 'http://json-schema.org/hyper-schema#'
494
+ * - 'http://json-schema.org/draft-07/schema#'
495
+ * - 'http://json-schema.org/draft-07/hyper-schema#'
496
+ *
497
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
498
+ */
499
+ type JSONSchema7Version = string;
500
+ /**
501
+ * JSON Schema v7
502
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
503
+ */
504
+ type JSONSchema7Definition = JSONSchema7 | boolean;
505
+ interface JSONSchema7 {
506
+ $id?: string | undefined;
507
+ $ref?: string | undefined;
508
+ $schema?: JSONSchema7Version | undefined;
509
+ $comment?: string | undefined;
510
+ /**
511
+ * @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-00#section-8.2.4
512
+ * @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00#appendix-A
513
+ */
514
+ $defs?: {
515
+ [key: string]: JSONSchema7Definition;
516
+ } | undefined;
517
+ /**
518
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1
519
+ */
520
+ type?: JSONSchema7TypeName | JSONSchema7TypeName[] | undefined;
521
+ enum?: JSONSchema7Type[] | undefined;
522
+ const?: JSONSchema7Type | undefined;
523
+ /**
524
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.2
525
+ */
526
+ multipleOf?: number | undefined;
527
+ maximum?: number | undefined;
528
+ exclusiveMaximum?: number | undefined;
529
+ minimum?: number | undefined;
530
+ exclusiveMinimum?: number | undefined;
531
+ /**
532
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.3
533
+ */
534
+ maxLength?: number | undefined;
535
+ minLength?: number | undefined;
536
+ pattern?: string | undefined;
537
+ /**
538
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.4
539
+ */
540
+ items?: JSONSchema7Definition | JSONSchema7Definition[] | undefined;
541
+ additionalItems?: JSONSchema7Definition | undefined;
542
+ maxItems?: number | undefined;
543
+ minItems?: number | undefined;
544
+ uniqueItems?: boolean | undefined;
545
+ contains?: JSONSchema7Definition | undefined;
546
+ /**
547
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.5
548
+ */
549
+ maxProperties?: number | undefined;
550
+ minProperties?: number | undefined;
551
+ required?: string[] | undefined;
552
+ properties?: {
553
+ [key: string]: JSONSchema7Definition;
554
+ } | undefined;
555
+ patternProperties?: {
556
+ [key: string]: JSONSchema7Definition;
557
+ } | undefined;
558
+ additionalProperties?: JSONSchema7Definition | undefined;
559
+ dependencies?: {
560
+ [key: string]: JSONSchema7Definition | string[];
561
+ } | undefined;
562
+ propertyNames?: JSONSchema7Definition | undefined;
563
+ /**
564
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.6
565
+ */
566
+ if?: JSONSchema7Definition | undefined;
567
+ then?: JSONSchema7Definition | undefined;
568
+ else?: JSONSchema7Definition | undefined;
569
+ /**
570
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.7
571
+ */
572
+ allOf?: JSONSchema7Definition[] | undefined;
573
+ anyOf?: JSONSchema7Definition[] | undefined;
574
+ oneOf?: JSONSchema7Definition[] | undefined;
575
+ not?: JSONSchema7Definition | undefined;
576
+ /**
577
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-7
578
+ */
579
+ format?: string | undefined;
580
+ /**
581
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-8
582
+ */
583
+ contentMediaType?: string | undefined;
584
+ contentEncoding?: string | undefined;
585
+ /**
586
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-9
587
+ */
588
+ definitions?: {
589
+ [key: string]: JSONSchema7Definition;
590
+ } | undefined;
591
+ /**
592
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-10
593
+ */
594
+ title?: string | undefined;
595
+ description?: string | undefined;
596
+ default?: JSONSchema7Type | undefined;
597
+ readOnly?: boolean | undefined;
598
+ writeOnly?: boolean | undefined;
599
+ examples?: JSONSchema7Type | undefined;
600
+ }
601
+ //#endregion
6
602
  //#region ../../node_modules/.pnpm/openapi-types@12.1.3/node_modules/openapi-types/dist/index.d.ts
603
+ declare namespace OpenAPIV3_1 {
604
+ type Modify<T, R> = Omit<T, keyof R> & R;
605
+ type PathsWebhooksComponents<T extends {} = {}> = {
606
+ paths: PathsObject<T>;
607
+ webhooks: Record<string, PathItemObject | ReferenceObject>;
608
+ components: ComponentsObject;
609
+ };
610
+ export type Document<T extends {} = {}> = Modify<Omit<OpenAPIV3.Document<T>, 'paths' | 'components'>, {
611
+ info: InfoObject;
612
+ jsonSchemaDialect?: string;
613
+ servers?: ServerObject[];
614
+ } & ((Pick<PathsWebhooksComponents<T>, 'paths'> & Omit<Partial<PathsWebhooksComponents<T>>, 'paths'>) | (Pick<PathsWebhooksComponents<T>, 'webhooks'> & Omit<Partial<PathsWebhooksComponents<T>>, 'webhooks'>) | (Pick<PathsWebhooksComponents<T>, 'components'> & Omit<Partial<PathsWebhooksComponents<T>>, 'components'>))>;
615
+ export type InfoObject = Modify<OpenAPIV3.InfoObject, {
616
+ summary?: string;
617
+ license?: LicenseObject;
618
+ }>;
619
+ export type ContactObject = OpenAPIV3.ContactObject;
620
+ export type LicenseObject = Modify<OpenAPIV3.LicenseObject, {
621
+ identifier?: string;
622
+ }>;
623
+ export type ServerObject = Modify<OpenAPIV3.ServerObject, {
624
+ url: string;
625
+ description?: string;
626
+ variables?: Record<string, ServerVariableObject>;
627
+ }>;
628
+ export type ServerVariableObject = Modify<OpenAPIV3.ServerVariableObject, {
629
+ enum?: [string, ...string[]];
630
+ }>;
631
+ export type PathsObject<T extends {} = {}, P extends {} = {}> = Record<string, (PathItemObject<T> & P) | undefined>;
632
+ export type HttpMethods = OpenAPIV3.HttpMethods;
633
+ export type PathItemObject<T extends {} = {}> = Modify<OpenAPIV3.PathItemObject<T>, {
634
+ servers?: ServerObject[];
635
+ parameters?: (ReferenceObject | ParameterObject)[];
636
+ }> & { [method in HttpMethods]?: OperationObject<T> };
637
+ export type OperationObject<T extends {} = {}> = Modify<OpenAPIV3.OperationObject<T>, {
638
+ parameters?: (ReferenceObject | ParameterObject)[];
639
+ requestBody?: ReferenceObject | RequestBodyObject;
640
+ responses?: ResponsesObject;
641
+ callbacks?: Record<string, ReferenceObject | CallbackObject>;
642
+ servers?: ServerObject[];
643
+ }> & T;
644
+ export type ExternalDocumentationObject = OpenAPIV3.ExternalDocumentationObject;
645
+ export type ParameterObject = OpenAPIV3.ParameterObject;
646
+ export type HeaderObject = OpenAPIV3.HeaderObject;
647
+ export type ParameterBaseObject = OpenAPIV3.ParameterBaseObject;
648
+ export type NonArraySchemaObjectType = OpenAPIV3.NonArraySchemaObjectType | 'null';
649
+ export type ArraySchemaObjectType = OpenAPIV3.ArraySchemaObjectType;
650
+ /**
651
+ * There is no way to tell typescript to require items when type is either 'array' or array containing 'array' type
652
+ * 'items' will be always visible as optional
653
+ * Casting schema object to ArraySchemaObject or NonArraySchemaObject will work fine
654
+ */
655
+ export type SchemaObject = ArraySchemaObject | NonArraySchemaObject | MixedSchemaObject;
656
+ export interface ArraySchemaObject extends BaseSchemaObject {
657
+ type: ArraySchemaObjectType;
658
+ items: ReferenceObject | SchemaObject;
659
+ }
660
+ export interface NonArraySchemaObject extends BaseSchemaObject {
661
+ type?: NonArraySchemaObjectType;
662
+ }
663
+ interface MixedSchemaObject extends BaseSchemaObject {
664
+ type?: (ArraySchemaObjectType | NonArraySchemaObjectType)[];
665
+ items?: ReferenceObject | SchemaObject;
666
+ }
667
+ export type BaseSchemaObject = Modify<Omit<OpenAPIV3.BaseSchemaObject, 'nullable'>, {
668
+ examples?: OpenAPIV3.BaseSchemaObject['example'][];
669
+ exclusiveMinimum?: boolean | number;
670
+ exclusiveMaximum?: boolean | number;
671
+ contentMediaType?: string;
672
+ $schema?: string;
673
+ additionalProperties?: boolean | ReferenceObject | SchemaObject;
674
+ properties?: {
675
+ [name: string]: ReferenceObject | SchemaObject;
676
+ };
677
+ allOf?: (ReferenceObject | SchemaObject)[];
678
+ oneOf?: (ReferenceObject | SchemaObject)[];
679
+ anyOf?: (ReferenceObject | SchemaObject)[];
680
+ not?: ReferenceObject | SchemaObject;
681
+ discriminator?: DiscriminatorObject;
682
+ externalDocs?: ExternalDocumentationObject;
683
+ xml?: XMLObject;
684
+ const?: any;
685
+ }>;
686
+ export type DiscriminatorObject = OpenAPIV3.DiscriminatorObject;
687
+ export type XMLObject = OpenAPIV3.XMLObject;
688
+ export type ReferenceObject = Modify<OpenAPIV3.ReferenceObject, {
689
+ summary?: string;
690
+ description?: string;
691
+ }>;
692
+ export type ExampleObject = OpenAPIV3.ExampleObject;
693
+ export type MediaTypeObject = Modify<OpenAPIV3.MediaTypeObject, {
694
+ schema?: SchemaObject | ReferenceObject;
695
+ examples?: Record<string, ReferenceObject | ExampleObject>;
696
+ }>;
697
+ export type EncodingObject = OpenAPIV3.EncodingObject;
698
+ export type RequestBodyObject = Modify<OpenAPIV3.RequestBodyObject, {
699
+ content: {
700
+ [media: string]: MediaTypeObject;
701
+ };
702
+ }>;
703
+ export type ResponsesObject = Record<string, ReferenceObject | ResponseObject>;
704
+ export type ResponseObject = Modify<OpenAPIV3.ResponseObject, {
705
+ headers?: {
706
+ [header: string]: ReferenceObject | HeaderObject;
707
+ };
708
+ content?: {
709
+ [media: string]: MediaTypeObject;
710
+ };
711
+ links?: {
712
+ [link: string]: ReferenceObject | LinkObject;
713
+ };
714
+ }>;
715
+ export type LinkObject = Modify<OpenAPIV3.LinkObject, {
716
+ server?: ServerObject;
717
+ }>;
718
+ export type CallbackObject = Record<string, PathItemObject | ReferenceObject>;
719
+ export type SecurityRequirementObject = OpenAPIV3.SecurityRequirementObject;
720
+ export type ComponentsObject = Modify<OpenAPIV3.ComponentsObject, {
721
+ schemas?: Record<string, SchemaObject>;
722
+ responses?: Record<string, ReferenceObject | ResponseObject>;
723
+ parameters?: Record<string, ReferenceObject | ParameterObject>;
724
+ examples?: Record<string, ReferenceObject | ExampleObject>;
725
+ requestBodies?: Record<string, ReferenceObject | RequestBodyObject>;
726
+ headers?: Record<string, ReferenceObject | HeaderObject>;
727
+ securitySchemes?: Record<string, ReferenceObject | SecuritySchemeObject>;
728
+ links?: Record<string, ReferenceObject | LinkObject>;
729
+ callbacks?: Record<string, ReferenceObject | CallbackObject>;
730
+ pathItems?: Record<string, ReferenceObject | PathItemObject>;
731
+ }>;
732
+ export type SecuritySchemeObject = OpenAPIV3.SecuritySchemeObject;
733
+ export type HttpSecurityScheme = OpenAPIV3.HttpSecurityScheme;
734
+ export type ApiKeySecurityScheme = OpenAPIV3.ApiKeySecurityScheme;
735
+ export type OAuth2SecurityScheme = OpenAPIV3.OAuth2SecurityScheme;
736
+ export type OpenIdSecurityScheme = OpenAPIV3.OpenIdSecurityScheme;
737
+ export type TagObject = OpenAPIV3.TagObject;
738
+ export {};
739
+ }
7
740
  declare namespace OpenAPIV3 {
8
741
  interface Document<T extends {} = {}> {
9
742
  openapi: string;
@@ -323,6 +1056,19 @@ declare namespace OpenAPIV3 {
323
1056
  }
324
1057
  }
325
1058
  //#endregion
1059
+ //#region src/operation.d.ts
1060
+ /**
1061
+ * A single OpenAPI operation: its URL path, HTTP method, and the raw operation object.
1062
+ *
1063
+ * `schema` is a live reference into the document, so any in-place `$ref` resolution the resolvers
1064
+ * perform is visible here too.
1065
+ */
1066
+ type Operation = {
1067
+ path: string;
1068
+ method: string;
1069
+ schema: OperationObject$1;
1070
+ };
1071
+ //#endregion
326
1072
  //#region src/types.d.ts
327
1073
  /**
328
1074
  * Content-type string for selecting request/response schemas from an OpenAPI spec.
@@ -347,7 +1093,18 @@ type ContentType = 'application/json' | (string & {});
347
1093
  * }
348
1094
  * ```
349
1095
  */
350
- type SchemaObject$1 = SchemaObject$2 & {
1096
+ type SchemaObject$1 = {
1097
+ externalDocs?: unknown;
1098
+ xml?: unknown;
1099
+ $schema?: string;
1100
+ deprecated?: boolean;
1101
+ example?: unknown;
1102
+ examples?: Array<unknown>;
1103
+ nullable?: boolean;
1104
+ readOnly?: boolean;
1105
+ writeOnly?: boolean;
1106
+ discriminator?: DiscriminatorObject$1;
1107
+ 'x-readme-ref-name'?: string;
351
1108
  /**
352
1109
  * OAS 3.0 vendor extension: marks a schema as nullable without using `type: ['null', ...]`.
353
1110
  */
@@ -377,7 +1134,7 @@ type SchemaObject$1 = SchemaObject$2 & {
377
1134
  * Enum values for this schema (narrowed from `unknown[]`).
378
1135
  */
379
1136
  enum?: Array<string | number | boolean | null>;
380
- };
1137
+ } & (OpenAPIV3.SchemaObject | OpenAPIV3_1.SchemaObject | JSONSchema4 | JSONSchema6 | JSONSchema7);
381
1138
  /**
382
1139
  * HTTP method as a lowercase string (`'get' | 'post' | ...`).
383
1140
  */
@@ -385,15 +1142,15 @@ type HttpMethod = Lowercase<ast.HttpMethod>;
385
1142
  /**
386
1143
  * Normalized OpenAPI document after parsing.
387
1144
  */
388
- type Document = OASDocument;
1145
+ type Document = (OpenAPIV3.Document | OpenAPIV3_1.Document) & Record<string, unknown>;
389
1146
  /**
390
- * API operation extracted from an OpenAPI document.
1147
+ * Single operation object (the `get`/`post`/… entry on a path item) plus any vendor extensions.
391
1148
  */
392
- type Operation = Operation$1;
1149
+ type OperationObject$1 = (OpenAPIV3.OperationObject | OpenAPIV3_1.OperationObject) & Record<string, unknown>;
393
1150
  /**
394
1151
  * Discriminator object for `oneOf`/`anyOf` schemas in OpenAPI.
395
1152
  */
396
- type DiscriminatorObject$1 = DiscriminatorObject$2;
1153
+ type DiscriminatorObject$1 = OpenAPIV3.DiscriminatorObject | OpenAPIV3_1.DiscriminatorObject;
397
1154
  /**
398
1155
  * OpenAPI reference object pointing to a schema definition via `$ref`.
399
1156
  */
@@ -401,11 +1158,11 @@ type ReferenceObject$1 = OpenAPIV3.ReferenceObject;
401
1158
  /**
402
1159
  * OpenAPI response object from a spec that contains schema, status code, and headers.
403
1160
  */
404
- type ResponseObject$1 = ResponseObject$2;
1161
+ type ResponseObject$1 = OpenAPIV3.ResponseObject | OpenAPIV3_1.ResponseObject;
405
1162
  /**
406
1163
  * OpenAPI media type object that maps a content-type string to its schema.
407
1164
  */
408
- type MediaTypeObject$1 = MediaTypeObject$2;
1165
+ type MediaTypeObject$1 = OpenAPIV3.MediaTypeObject | OpenAPIV3_1.MediaTypeObject;
409
1166
  /**
410
1167
  * Configuration options for the OpenAPI adapter. Controls spec validation,
411
1168
  * content-type selection, server URL resolution, and how types are derived