@kubb/adapter-oas 5.0.0-beta.9 → 5.0.0-beta.93

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,10 +1,743 @@
1
- import { t as __name } from "./chunk--u3MIqq1.js";
2
- import * as _$_kubb_core0 from "@kubb/core";
3
- import { AdapterFactoryOptions, ast } from "@kubb/core";
4
- import { DiscriminatorObject as DiscriminatorObject$2, MediaTypeObject as MediaTypeObject$2, OASDocument, ResponseObject as ResponseObject$2, SchemaObject as SchemaObject$2 } from "oas/types";
5
- import { Operation as Operation$1 } from "oas/operation";
1
+ import { t as __name } from "./rolldown-runtime-C0LytTxp.js";
2
+ import { ast } from "@kubb/ast";
3
+ import { AdapterFactoryOptions } from "@kubb/core";
6
4
 
5
+ //#region ../../node_modules/.pnpm/@types+json-schema@7.0.15/node_modules/@types/json-schema/index.d.ts
6
+ // ==================================================================================================
7
+ // JSON Schema Draft 04
8
+ // ==================================================================================================
9
+ /**
10
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1
11
+ */
12
+ type JSONSchema4TypeName = "string" //
13
+ | "number" | "integer" | "boolean" | "object" | "array" | "null" | "any";
14
+ /**
15
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-3.5
16
+ */
17
+ type JSONSchema4Type = string //
18
+ | number | boolean | JSONSchema4Object | JSONSchema4Array | null;
19
+ // Workaround for infinite type recursion
20
+ interface JSONSchema4Object {
21
+ [key: string]: JSONSchema4Type;
22
+ }
23
+ // Workaround for infinite type recursion
24
+ // https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540
25
+ interface JSONSchema4Array extends Array<JSONSchema4Type> {}
26
+ /**
27
+ * Meta schema
28
+ *
29
+ * Recommended values:
30
+ * - 'http://json-schema.org/schema#'
31
+ * - 'http://json-schema.org/hyper-schema#'
32
+ * - 'http://json-schema.org/draft-04/schema#'
33
+ * - 'http://json-schema.org/draft-04/hyper-schema#'
34
+ * - 'http://json-schema.org/draft-03/schema#'
35
+ * - 'http://json-schema.org/draft-03/hyper-schema#'
36
+ *
37
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
38
+ */
39
+ type JSONSchema4Version = string;
40
+ /**
41
+ * JSON Schema V4
42
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-04
43
+ */
44
+ interface JSONSchema4 {
45
+ id?: string | undefined;
46
+ $ref?: string | undefined;
47
+ $schema?: JSONSchema4Version | undefined;
48
+ /**
49
+ * This attribute is a string that provides a short description of the
50
+ * instance property.
51
+ *
52
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.21
53
+ */
54
+ title?: string | undefined;
55
+ /**
56
+ * This attribute is a string that provides a full description of the of
57
+ * purpose the instance property.
58
+ *
59
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.22
60
+ */
61
+ description?: string | undefined;
62
+ default?: JSONSchema4Type | undefined;
63
+ multipleOf?: number | undefined;
64
+ maximum?: number | undefined;
65
+ exclusiveMaximum?: boolean | undefined;
66
+ minimum?: number | undefined;
67
+ exclusiveMinimum?: boolean | undefined;
68
+ maxLength?: number | undefined;
69
+ minLength?: number | undefined;
70
+ pattern?: string | undefined;
71
+ /**
72
+ * May only be defined when "items" is defined, and is a tuple of JSONSchemas.
73
+ *
74
+ * This provides a definition for additional items in an array instance
75
+ * when tuple definitions of the items is provided. This can be false
76
+ * to indicate additional items in the array are not allowed, or it can
77
+ * be a schema that defines the schema of the additional items.
78
+ *
79
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.6
80
+ */
81
+ additionalItems?: boolean | JSONSchema4 | undefined;
82
+ /**
83
+ * This attribute defines the allowed items in an instance array, and
84
+ * MUST be a schema or an array of schemas. The default value is an
85
+ * empty schema which allows any value for items in the instance array.
86
+ *
87
+ * When this attribute value is a schema and the instance value is an
88
+ * array, then all the items in the array MUST be valid according to the
89
+ * schema.
90
+ *
91
+ * When this attribute value is an array of schemas and the instance
92
+ * value is an array, each position in the instance array MUST conform
93
+ * to the schema in the corresponding position for this array. This
94
+ * called tuple typing. When tuple typing is used, additional items are
95
+ * allowed, disallowed, or constrained by the "additionalItems"
96
+ * (Section 5.6) attribute using the same rules as
97
+ * "additionalProperties" (Section 5.4) for objects.
98
+ *
99
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.5
100
+ */
101
+ items?: JSONSchema4 | JSONSchema4[] | undefined;
102
+ maxItems?: number | undefined;
103
+ minItems?: number | undefined;
104
+ uniqueItems?: boolean | undefined;
105
+ maxProperties?: number | undefined;
106
+ minProperties?: number | undefined;
107
+ /**
108
+ * This attribute indicates if the instance must have a value, and not
109
+ * be undefined. This is false by default, making the instance
110
+ * optional.
111
+ *
112
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.7
113
+ */
114
+ required?: boolean | string[] | undefined;
115
+ /**
116
+ * This attribute defines a schema for all properties that are not
117
+ * explicitly defined in an object type definition. If specified, the
118
+ * value MUST be a schema or a boolean. If false is provided, no
119
+ * additional properties are allowed beyond the properties defined in
120
+ * the schema. The default value is an empty schema which allows any
121
+ * value for additional properties.
122
+ *
123
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.4
124
+ */
125
+ additionalProperties?: boolean | JSONSchema4 | undefined;
126
+ definitions?: {
127
+ [k: string]: JSONSchema4;
128
+ } | undefined;
129
+ /**
130
+ * This attribute is an object with property definitions that define the
131
+ * valid values of instance object property values. When the instance
132
+ * value is an object, the property values of the instance object MUST
133
+ * conform to the property definitions in this object. In this object,
134
+ * each property definition's value MUST be a schema, and the property's
135
+ * name MUST be the name of the instance property that it defines. The
136
+ * instance property value MUST be valid according to the schema from
137
+ * the property definition. Properties are considered unordered, the
138
+ * order of the instance properties MAY be in any order.
139
+ *
140
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.2
141
+ */
142
+ properties?: {
143
+ [k: string]: JSONSchema4;
144
+ } | undefined;
145
+ /**
146
+ * This attribute is an object that defines the schema for a set of
147
+ * property names of an object instance. The name of each property of
148
+ * this attribute's object is a regular expression pattern in the ECMA
149
+ * 262/Perl 5 format, while the value is a schema. If the pattern
150
+ * matches the name of a property on the instance object, the value of
151
+ * the instance's property MUST be valid against the pattern name's
152
+ * schema value.
153
+ *
154
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.3
155
+ */
156
+ patternProperties?: {
157
+ [k: string]: JSONSchema4;
158
+ } | undefined;
159
+ dependencies?: {
160
+ [k: string]: JSONSchema4 | string[];
161
+ } | undefined;
162
+ /**
163
+ * This provides an enumeration of all possible values that are valid
164
+ * for the instance property. This MUST be an array, and each item in
165
+ * the array represents a possible value for the instance value. If
166
+ * this attribute is defined, the instance value MUST be one of the
167
+ * values in the array in order for the schema to be valid.
168
+ *
169
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.19
170
+ */
171
+ enum?: JSONSchema4Type[] | undefined;
172
+ /**
173
+ * A single type, or a union of simple types
174
+ */
175
+ type?: JSONSchema4TypeName | JSONSchema4TypeName[] | undefined;
176
+ allOf?: JSONSchema4[] | undefined;
177
+ anyOf?: JSONSchema4[] | undefined;
178
+ oneOf?: JSONSchema4[] | undefined;
179
+ not?: JSONSchema4 | undefined;
180
+ /**
181
+ * The value of this property MUST be another schema which will provide
182
+ * a base schema which the current schema will inherit from. The
183
+ * inheritance rules are such that any instance that is valid according
184
+ * to the current schema MUST be valid according to the referenced
185
+ * schema. This MAY also be an array, in which case, the instance MUST
186
+ * be valid for all the schemas in the array. A schema that extends
187
+ * another schema MAY define additional attributes, constrain existing
188
+ * attributes, or add other constraints.
189
+ *
190
+ * Conceptually, the behavior of extends can be seen as validating an
191
+ * instance against all constraints in the extending schema as well as
192
+ * the extended schema(s).
193
+ *
194
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.26
195
+ */
196
+ extends?: string | string[] | undefined;
197
+ /**
198
+ * @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-5.6
199
+ */
200
+ [k: string]: any;
201
+ format?: string | undefined;
202
+ }
203
+ // ==================================================================================================
204
+ // JSON Schema Draft 06
205
+ // ==================================================================================================
206
+ type JSONSchema6TypeName = "string" //
207
+ | "number" | "integer" | "boolean" | "object" | "array" | "null" | "any";
208
+ type JSONSchema6Type = string //
209
+ | number | boolean | JSONSchema6Object | JSONSchema6Array | null;
210
+ // Workaround for infinite type recursion
211
+ interface JSONSchema6Object {
212
+ [key: string]: JSONSchema6Type;
213
+ }
214
+ // Workaround for infinite type recursion
215
+ // https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540
216
+ interface JSONSchema6Array extends Array<JSONSchema6Type> {}
217
+ /**
218
+ * Meta schema
219
+ *
220
+ * Recommended values:
221
+ * - 'http://json-schema.org/schema#'
222
+ * - 'http://json-schema.org/hyper-schema#'
223
+ * - 'http://json-schema.org/draft-06/schema#'
224
+ * - 'http://json-schema.org/draft-06/hyper-schema#'
225
+ *
226
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
227
+ */
228
+ type JSONSchema6Version = string;
229
+ /**
230
+ * JSON Schema V6
231
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01
232
+ */
233
+ type JSONSchema6Definition = JSONSchema6 | boolean;
234
+ interface JSONSchema6 {
235
+ $id?: string | undefined;
236
+ $ref?: string | undefined;
237
+ $schema?: JSONSchema6Version | undefined;
238
+ /**
239
+ * Must be strictly greater than 0.
240
+ * A numeric instance is valid only if division by this keyword's value results in an integer.
241
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.1
242
+ */
243
+ multipleOf?: number | undefined;
244
+ /**
245
+ * Representing an inclusive upper limit for a numeric instance.
246
+ * This keyword validates only if the instance is less than or exactly equal to "maximum".
247
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.2
248
+ */
249
+ maximum?: number | undefined;
250
+ /**
251
+ * Representing an exclusive upper limit for a numeric instance.
252
+ * This keyword validates only if the instance is strictly less than (not equal to) to "exclusiveMaximum".
253
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.3
254
+ */
255
+ exclusiveMaximum?: number | undefined;
256
+ /**
257
+ * Representing an inclusive lower limit for a numeric instance.
258
+ * This keyword validates only if the instance is greater than or exactly equal to "minimum".
259
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.4
260
+ */
261
+ minimum?: number | undefined;
262
+ /**
263
+ * Representing an exclusive lower limit for a numeric instance.
264
+ * This keyword validates only if the instance is strictly greater than (not equal to) to "exclusiveMinimum".
265
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.5
266
+ */
267
+ exclusiveMinimum?: number | undefined;
268
+ /**
269
+ * Must be a non-negative integer.
270
+ * A string instance is valid against this keyword if its length is less than, or equal to, the value of this keyword.
271
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.6
272
+ */
273
+ maxLength?: number | undefined;
274
+ /**
275
+ * Must be a non-negative integer.
276
+ * A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword.
277
+ * Omitting this keyword has the same behavior as a value of 0.
278
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.7
279
+ */
280
+ minLength?: number | undefined;
281
+ /**
282
+ * Should be a valid regular expression, according to the ECMA 262 regular expression dialect.
283
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.8
284
+ */
285
+ pattern?: string | undefined;
286
+ /**
287
+ * This keyword determines how child instances validate for arrays, and does not directly validate the immediate instance itself.
288
+ * Omitting this keyword has the same behavior as an empty schema.
289
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.9
290
+ */
291
+ items?: JSONSchema6Definition | JSONSchema6Definition[] | undefined;
292
+ /**
293
+ * This keyword determines how child instances validate for arrays, and does not directly validate the immediate instance itself.
294
+ * If "items" is an array of schemas, validation succeeds if every instance element
295
+ * at a position greater than the size of "items" validates against "additionalItems".
296
+ * Otherwise, "additionalItems" MUST be ignored, as the "items" schema
297
+ * (possibly the default value of an empty schema) is applied to all elements.
298
+ * Omitting this keyword has the same behavior as an empty schema.
299
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.10
300
+ */
301
+ additionalItems?: JSONSchema6Definition | undefined;
302
+ /**
303
+ * Must be a non-negative integer.
304
+ * An array instance is valid against "maxItems" if its size is less than, or equal to, the value of this keyword.
305
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.11
306
+ */
307
+ maxItems?: number | undefined;
308
+ /**
309
+ * Must be a non-negative integer.
310
+ * An array instance is valid against "maxItems" if its size is greater than, or equal to, the value of this keyword.
311
+ * Omitting this keyword has the same behavior as a value of 0.
312
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.12
313
+ */
314
+ minItems?: number | undefined;
315
+ /**
316
+ * If this keyword has boolean value false, the instance validates successfully.
317
+ * If it has boolean value true, the instance validates successfully if all of its elements are unique.
318
+ * Omitting this keyword has the same behavior as a value of false.
319
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.13
320
+ */
321
+ uniqueItems?: boolean | undefined;
322
+ /**
323
+ * An array instance is valid against "contains" if at least one of its elements is valid against the given schema.
324
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.14
325
+ */
326
+ contains?: JSONSchema6Definition | undefined;
327
+ /**
328
+ * Must be a non-negative integer.
329
+ * An object instance is valid against "maxProperties" if its number of properties is less than, or equal to, the value of this keyword.
330
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.15
331
+ */
332
+ maxProperties?: number | undefined;
333
+ /**
334
+ * Must be a non-negative integer.
335
+ * An object instance is valid against "maxProperties" if its number of properties is greater than,
336
+ * or equal to, the value of this keyword.
337
+ * Omitting this keyword has the same behavior as a value of 0.
338
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.16
339
+ */
340
+ minProperties?: number | undefined;
341
+ /**
342
+ * Elements of this array must be unique.
343
+ * An object instance is valid against this keyword if every item in the array is the name of a property in the instance.
344
+ * Omitting this keyword has the same behavior as an empty array.
345
+ *
346
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.17
347
+ */
348
+ required?: string[] | undefined;
349
+ /**
350
+ * This keyword determines how child instances validate for objects, and does not directly validate the immediate instance itself.
351
+ * Validation succeeds if, for each name that appears in both the instance and as a name within this keyword's value,
352
+ * the child instance for that name successfully validates against the corresponding schema.
353
+ * Omitting this keyword has the same behavior as an empty object.
354
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.18
355
+ */
356
+ properties?: {
357
+ [k: string]: JSONSchema6Definition;
358
+ } | undefined;
359
+ /**
360
+ * This attribute is an object that defines the schema for a set of property names of an object instance.
361
+ * 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.
362
+ * If the pattern matches the name of a property on the instance object, the value of the instance's property
363
+ * MUST be valid against the pattern name's schema value.
364
+ * Omitting this keyword has the same behavior as an empty object.
365
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.19
366
+ */
367
+ patternProperties?: {
368
+ [k: string]: JSONSchema6Definition;
369
+ } | undefined;
370
+ /**
371
+ * This attribute defines a schema for all properties that are not explicitly defined in an object type definition.
372
+ * If specified, the value MUST be a schema or a boolean.
373
+ * If false is provided, no additional properties are allowed beyond the properties defined in the schema.
374
+ * The default value is an empty schema which allows any value for additional properties.
375
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.20
376
+ */
377
+ additionalProperties?: JSONSchema6Definition | undefined;
378
+ /**
379
+ * This keyword specifies rules that are evaluated if the instance is an object and contains a certain property.
380
+ * Each property specifies a dependency.
381
+ * If the dependency value is an array, each element in the array must be unique.
382
+ * Omitting this keyword has the same behavior as an empty object.
383
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.21
384
+ */
385
+ dependencies?: {
386
+ [k: string]: JSONSchema6Definition | string[];
387
+ } | undefined;
388
+ /**
389
+ * Takes a schema which validates the names of all properties rather than their values.
390
+ * Note the property name that the schema is testing will always be a string.
391
+ * Omitting this keyword has the same behavior as an empty schema.
392
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.22
393
+ */
394
+ propertyNames?: JSONSchema6Definition | undefined;
395
+ /**
396
+ * This provides an enumeration of all possible values that are valid
397
+ * for the instance property. This MUST be an array, and each item in
398
+ * the array represents a possible value for the instance value. If
399
+ * this attribute is defined, the instance value MUST be one of the
400
+ * values in the array in order for the schema to be valid.
401
+ *
402
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.23
403
+ */
404
+ enum?: JSONSchema6Type[] | undefined;
405
+ /**
406
+ * More readable form of a one-element "enum"
407
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.24
408
+ */
409
+ const?: JSONSchema6Type | undefined;
410
+ /**
411
+ * A single type, or a union of simple types
412
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.25
413
+ */
414
+ type?: JSONSchema6TypeName | JSONSchema6TypeName[] | undefined;
415
+ /**
416
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26
417
+ */
418
+ allOf?: JSONSchema6Definition[] | undefined;
419
+ /**
420
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27
421
+ */
422
+ anyOf?: JSONSchema6Definition[] | undefined;
423
+ /**
424
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28
425
+ */
426
+ oneOf?: JSONSchema6Definition[] | undefined;
427
+ /**
428
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.29
429
+ */
430
+ not?: JSONSchema6Definition | undefined;
431
+ /**
432
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.1
433
+ */
434
+ definitions?: {
435
+ [k: string]: JSONSchema6Definition;
436
+ } | undefined;
437
+ /**
438
+ * This attribute is a string that provides a short description of the instance property.
439
+ *
440
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.2
441
+ */
442
+ title?: string | undefined;
443
+ /**
444
+ * This attribute is a string that provides a full description of the of purpose the instance property.
445
+ *
446
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.2
447
+ */
448
+ description?: string | undefined;
449
+ /**
450
+ * This keyword can be used to supply a default JSON value associated with a particular schema.
451
+ * It is RECOMMENDED that a default value be valid against the associated schema.
452
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.3
453
+ */
454
+ default?: JSONSchema6Type | undefined;
455
+ /**
456
+ * Array of examples with no validation effect the value of "default" is usable as an example without repeating it under this keyword
457
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.4
458
+ */
459
+ examples?: JSONSchema6Type[] | undefined;
460
+ /**
461
+ * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-8
462
+ */
463
+ format?: string | undefined;
464
+ }
465
+ // ==================================================================================================
466
+ // JSON Schema Draft 07
467
+ // ==================================================================================================
468
+ // https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
469
+ // --------------------------------------------------------------------------------------------------
470
+ /**
471
+ * Primitive type
472
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1
473
+ */
474
+ type JSONSchema7TypeName = "string" //
475
+ | "number" | "integer" | "boolean" | "object" | "array" | "null";
476
+ /**
477
+ * Primitive type
478
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1
479
+ */
480
+ type JSONSchema7Type = string //
481
+ | number | boolean | JSONSchema7Object | JSONSchema7Array | null;
482
+ // Workaround for infinite type recursion
483
+ interface JSONSchema7Object {
484
+ [key: string]: JSONSchema7Type;
485
+ }
486
+ // Workaround for infinite type recursion
487
+ // https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540
488
+ interface JSONSchema7Array extends Array<JSONSchema7Type> {}
489
+ /**
490
+ * Meta schema
491
+ *
492
+ * Recommended values:
493
+ * - 'http://json-schema.org/schema#'
494
+ * - 'http://json-schema.org/hyper-schema#'
495
+ * - 'http://json-schema.org/draft-07/schema#'
496
+ * - 'http://json-schema.org/draft-07/hyper-schema#'
497
+ *
498
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
499
+ */
500
+ type JSONSchema7Version = string;
501
+ /**
502
+ * JSON Schema v7
503
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
504
+ */
505
+ type JSONSchema7Definition = JSONSchema7 | boolean;
506
+ interface JSONSchema7 {
507
+ $id?: string | undefined;
508
+ $ref?: string | undefined;
509
+ $schema?: JSONSchema7Version | undefined;
510
+ $comment?: string | undefined;
511
+ /**
512
+ * @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-00#section-8.2.4
513
+ * @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00#appendix-A
514
+ */
515
+ $defs?: {
516
+ [key: string]: JSONSchema7Definition;
517
+ } | undefined;
518
+ /**
519
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1
520
+ */
521
+ type?: JSONSchema7TypeName | JSONSchema7TypeName[] | undefined;
522
+ enum?: JSONSchema7Type[] | undefined;
523
+ const?: JSONSchema7Type | undefined;
524
+ /**
525
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.2
526
+ */
527
+ multipleOf?: number | undefined;
528
+ maximum?: number | undefined;
529
+ exclusiveMaximum?: number | undefined;
530
+ minimum?: number | undefined;
531
+ exclusiveMinimum?: number | undefined;
532
+ /**
533
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.3
534
+ */
535
+ maxLength?: number | undefined;
536
+ minLength?: number | undefined;
537
+ pattern?: string | undefined;
538
+ /**
539
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.4
540
+ */
541
+ items?: JSONSchema7Definition | JSONSchema7Definition[] | undefined;
542
+ additionalItems?: JSONSchema7Definition | undefined;
543
+ maxItems?: number | undefined;
544
+ minItems?: number | undefined;
545
+ uniqueItems?: boolean | undefined;
546
+ contains?: JSONSchema7Definition | undefined;
547
+ /**
548
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.5
549
+ */
550
+ maxProperties?: number | undefined;
551
+ minProperties?: number | undefined;
552
+ required?: string[] | undefined;
553
+ properties?: {
554
+ [key: string]: JSONSchema7Definition;
555
+ } | undefined;
556
+ patternProperties?: {
557
+ [key: string]: JSONSchema7Definition;
558
+ } | undefined;
559
+ additionalProperties?: JSONSchema7Definition | undefined;
560
+ dependencies?: {
561
+ [key: string]: JSONSchema7Definition | string[];
562
+ } | undefined;
563
+ propertyNames?: JSONSchema7Definition | undefined;
564
+ /**
565
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.6
566
+ */
567
+ if?: JSONSchema7Definition | undefined;
568
+ then?: JSONSchema7Definition | undefined;
569
+ else?: JSONSchema7Definition | undefined;
570
+ /**
571
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.7
572
+ */
573
+ allOf?: JSONSchema7Definition[] | undefined;
574
+ anyOf?: JSONSchema7Definition[] | undefined;
575
+ oneOf?: JSONSchema7Definition[] | undefined;
576
+ not?: JSONSchema7Definition | undefined;
577
+ /**
578
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-7
579
+ */
580
+ format?: string | undefined;
581
+ /**
582
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-8
583
+ */
584
+ contentMediaType?: string | undefined;
585
+ contentEncoding?: string | undefined;
586
+ /**
587
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-9
588
+ */
589
+ definitions?: {
590
+ [key: string]: JSONSchema7Definition;
591
+ } | undefined;
592
+ /**
593
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-10
594
+ */
595
+ title?: string | undefined;
596
+ description?: string | undefined;
597
+ default?: JSONSchema7Type | undefined;
598
+ readOnly?: boolean | undefined;
599
+ writeOnly?: boolean | undefined;
600
+ examples?: JSONSchema7Type | undefined;
601
+ }
602
+ //#endregion
7
603
  //#region ../../node_modules/.pnpm/openapi-types@12.1.3/node_modules/openapi-types/dist/index.d.ts
604
+ declare namespace OpenAPIV3_1 {
605
+ type Modify<T, R> = Omit<T, keyof R> & R;
606
+ type PathsWebhooksComponents<T extends {} = {}> = {
607
+ paths: PathsObject<T>;
608
+ webhooks: Record<string, PathItemObject | ReferenceObject>;
609
+ components: ComponentsObject;
610
+ };
611
+ export type Document<T extends {} = {}> = Modify<Omit<OpenAPIV3.Document<T>, 'paths' | 'components'>, {
612
+ info: InfoObject;
613
+ jsonSchemaDialect?: string;
614
+ servers?: ServerObject[];
615
+ } & ((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'>))>;
616
+ export type InfoObject = Modify<OpenAPIV3.InfoObject, {
617
+ summary?: string;
618
+ license?: LicenseObject;
619
+ }>;
620
+ export type ContactObject = OpenAPIV3.ContactObject;
621
+ export type LicenseObject = Modify<OpenAPIV3.LicenseObject, {
622
+ identifier?: string;
623
+ }>;
624
+ export type ServerObject = Modify<OpenAPIV3.ServerObject, {
625
+ url: string;
626
+ description?: string;
627
+ variables?: Record<string, ServerVariableObject>;
628
+ }>;
629
+ export type ServerVariableObject = Modify<OpenAPIV3.ServerVariableObject, {
630
+ enum?: [string, ...string[]];
631
+ }>;
632
+ export type PathsObject<T extends {} = {}, P extends {} = {}> = Record<string, (PathItemObject<T> & P) | undefined>;
633
+ export type HttpMethods = OpenAPIV3.HttpMethods;
634
+ export type PathItemObject<T extends {} = {}> = Modify<OpenAPIV3.PathItemObject<T>, {
635
+ servers?: ServerObject[];
636
+ parameters?: (ReferenceObject | ParameterObject)[];
637
+ }> & { [method in HttpMethods]?: OperationObject<T> };
638
+ export type OperationObject<T extends {} = {}> = Modify<OpenAPIV3.OperationObject<T>, {
639
+ parameters?: (ReferenceObject | ParameterObject)[];
640
+ requestBody?: ReferenceObject | RequestBodyObject;
641
+ responses?: ResponsesObject;
642
+ callbacks?: Record<string, ReferenceObject | CallbackObject>;
643
+ servers?: ServerObject[];
644
+ }> & T;
645
+ export type ExternalDocumentationObject = OpenAPIV3.ExternalDocumentationObject;
646
+ export type ParameterObject = OpenAPIV3.ParameterObject;
647
+ export type HeaderObject = OpenAPIV3.HeaderObject;
648
+ export type ParameterBaseObject = OpenAPIV3.ParameterBaseObject;
649
+ export type NonArraySchemaObjectType = OpenAPIV3.NonArraySchemaObjectType | 'null';
650
+ export type ArraySchemaObjectType = OpenAPIV3.ArraySchemaObjectType;
651
+ /**
652
+ * There is no way to tell typescript to require items when type is either 'array' or array containing 'array' type
653
+ * 'items' will be always visible as optional
654
+ * Casting schema object to ArraySchemaObject or NonArraySchemaObject will work fine
655
+ */
656
+ export type SchemaObject = ArraySchemaObject | NonArraySchemaObject | MixedSchemaObject;
657
+ export interface ArraySchemaObject extends BaseSchemaObject {
658
+ type: ArraySchemaObjectType;
659
+ items: ReferenceObject | SchemaObject;
660
+ }
661
+ export interface NonArraySchemaObject extends BaseSchemaObject {
662
+ type?: NonArraySchemaObjectType;
663
+ }
664
+ interface MixedSchemaObject extends BaseSchemaObject {
665
+ type?: (ArraySchemaObjectType | NonArraySchemaObjectType)[];
666
+ items?: ReferenceObject | SchemaObject;
667
+ }
668
+ export type BaseSchemaObject = Modify<Omit<OpenAPIV3.BaseSchemaObject, 'nullable'>, {
669
+ examples?: OpenAPIV3.BaseSchemaObject['example'][];
670
+ exclusiveMinimum?: boolean | number;
671
+ exclusiveMaximum?: boolean | number;
672
+ contentMediaType?: string;
673
+ $schema?: string;
674
+ additionalProperties?: boolean | ReferenceObject | SchemaObject;
675
+ properties?: {
676
+ [name: string]: ReferenceObject | SchemaObject;
677
+ };
678
+ allOf?: (ReferenceObject | SchemaObject)[];
679
+ oneOf?: (ReferenceObject | SchemaObject)[];
680
+ anyOf?: (ReferenceObject | SchemaObject)[];
681
+ not?: ReferenceObject | SchemaObject;
682
+ discriminator?: DiscriminatorObject;
683
+ externalDocs?: ExternalDocumentationObject;
684
+ xml?: XMLObject;
685
+ const?: any;
686
+ }>;
687
+ export type DiscriminatorObject = OpenAPIV3.DiscriminatorObject;
688
+ export type XMLObject = OpenAPIV3.XMLObject;
689
+ export type ReferenceObject = Modify<OpenAPIV3.ReferenceObject, {
690
+ summary?: string;
691
+ description?: string;
692
+ }>;
693
+ export type ExampleObject = OpenAPIV3.ExampleObject;
694
+ export type MediaTypeObject = Modify<OpenAPIV3.MediaTypeObject, {
695
+ schema?: SchemaObject | ReferenceObject;
696
+ examples?: Record<string, ReferenceObject | ExampleObject>;
697
+ }>;
698
+ export type EncodingObject = OpenAPIV3.EncodingObject;
699
+ export type RequestBodyObject = Modify<OpenAPIV3.RequestBodyObject, {
700
+ content: {
701
+ [media: string]: MediaTypeObject;
702
+ };
703
+ }>;
704
+ export type ResponsesObject = Record<string, ReferenceObject | ResponseObject>;
705
+ export type ResponseObject = Modify<OpenAPIV3.ResponseObject, {
706
+ headers?: {
707
+ [header: string]: ReferenceObject | HeaderObject;
708
+ };
709
+ content?: {
710
+ [media: string]: MediaTypeObject;
711
+ };
712
+ links?: {
713
+ [link: string]: ReferenceObject | LinkObject;
714
+ };
715
+ }>;
716
+ export type LinkObject = Modify<OpenAPIV3.LinkObject, {
717
+ server?: ServerObject;
718
+ }>;
719
+ export type CallbackObject = Record<string, PathItemObject | ReferenceObject>;
720
+ export type SecurityRequirementObject = OpenAPIV3.SecurityRequirementObject;
721
+ export type ComponentsObject = Modify<OpenAPIV3.ComponentsObject, {
722
+ schemas?: Record<string, SchemaObject>;
723
+ responses?: Record<string, ReferenceObject | ResponseObject>;
724
+ parameters?: Record<string, ReferenceObject | ParameterObject>;
725
+ examples?: Record<string, ReferenceObject | ExampleObject>;
726
+ requestBodies?: Record<string, ReferenceObject | RequestBodyObject>;
727
+ headers?: Record<string, ReferenceObject | HeaderObject>;
728
+ securitySchemes?: Record<string, ReferenceObject | SecuritySchemeObject>;
729
+ links?: Record<string, ReferenceObject | LinkObject>;
730
+ callbacks?: Record<string, ReferenceObject | CallbackObject>;
731
+ pathItems?: Record<string, ReferenceObject | PathItemObject>;
732
+ }>;
733
+ export type SecuritySchemeObject = OpenAPIV3.SecuritySchemeObject;
734
+ export type HttpSecurityScheme = OpenAPIV3.HttpSecurityScheme;
735
+ export type ApiKeySecurityScheme = OpenAPIV3.ApiKeySecurityScheme;
736
+ export type OAuth2SecurityScheme = OpenAPIV3.OAuth2SecurityScheme;
737
+ export type OpenIdSecurityScheme = OpenAPIV3.OpenIdSecurityScheme;
738
+ export type TagObject = OpenAPIV3.TagObject;
739
+ export {};
740
+ }
8
741
  declare namespace OpenAPIV3 {
9
742
  interface Document<T extends {} = {}> {
10
743
  openapi: string;
@@ -324,10 +1057,22 @@ declare namespace OpenAPIV3 {
324
1057
  }
325
1058
  }
326
1059
  //#endregion
1060
+ //#region src/operation.d.ts
1061
+ /**
1062
+ * A single OpenAPI operation: its URL path, HTTP method, and the raw operation object.
1063
+ *
1064
+ * `schema` is a live reference into the document, so any in-place `$ref` resolution the resolvers
1065
+ * perform is visible here too.
1066
+ */
1067
+ type Operation = {
1068
+ path: string;
1069
+ method: string;
1070
+ schema: OperationObject$1;
1071
+ };
1072
+ //#endregion
327
1073
  //#region src/types.d.ts
328
1074
  /**
329
- * Content-type string for selecting request/response schemas from an OpenAPI spec.
330
- * Supports `'application/json'` or any other media type.
1075
+ * Media type used to pick a schema from an operation's request or response.
331
1076
  *
332
1077
  * @example
333
1078
  * ```ts
@@ -348,7 +1093,18 @@ type ContentType = 'application/json' | (string & {});
348
1093
  * }
349
1094
  * ```
350
1095
  */
351
- 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;
352
1108
  /**
353
1109
  * OAS 3.0 vendor extension: marks a schema as nullable without using `type: ['null', ...]`.
354
1110
  */
@@ -372,100 +1128,116 @@ type SchemaObject$1 = SchemaObject$2 & {
372
1128
  patternProperties?: Record<string, SchemaObject$1 | boolean>;
373
1129
  /**
374
1130
  * Single-schema form of `items`. Narrowed from the base type to take precedence over the tuple overload.
1131
+ *
1132
+ * Alongside `prefixItems`, the JSON Schema boolean form applies: `items: false` closes the tuple
1133
+ * (no extra elements allowed), while `items: true` is equivalent to an unconstrained rest.
375
1134
  */
376
- items?: SchemaObject$1 | ReferenceObject$1;
1135
+ items?: SchemaObject$1 | ReferenceObject$1 | boolean;
377
1136
  /**
378
- * Enum values for this schema (narrowed from `unknown[]`).
1137
+ * Allowed values for this schema.
379
1138
  */
380
1139
  enum?: Array<string | number | boolean | null>;
381
- };
382
- /**
383
- * Maps uppercase HTTP method names to lowercase for backwards compatibility.
384
- *
385
- * @example
386
- * ```ts
387
- * HttpMethods['GET'] // 'get'
388
- * HttpMethods['POST'] // 'post'
389
- * ```
390
- */
391
- declare const HttpMethods$1: Record<Uppercase<ast.HttpMethod>, Lowercase<ast.HttpMethod>>;
392
- /**
393
- * HTTP method as a lowercase string (`'get' | 'post' | ...`).
394
- */
395
- type HttpMethod = Lowercase<ast.HttpMethod>;
1140
+ } & (OpenAPIV3_1.SchemaObject | JSONSchema4 | JSONSchema6 | JSONSchema7);
396
1141
  /**
397
1142
  * Normalized OpenAPI document after parsing.
398
1143
  */
399
- type Document = OASDocument;
1144
+ type Document = OpenAPIV3_1.Document & Record<string, unknown>;
400
1145
  /**
401
- * API operation extracted from an OpenAPI document.
1146
+ * Single operation object (the `get`/`post`/… entry on a path item) plus any vendor extensions.
402
1147
  */
403
- type Operation = Operation$1;
1148
+ type OperationObject$1 = OpenAPIV3_1.OperationObject & Record<string, unknown>;
404
1149
  /**
405
1150
  * Discriminator object for `oneOf`/`anyOf` schemas in OpenAPI.
406
1151
  */
407
- type DiscriminatorObject$1 = DiscriminatorObject$2;
1152
+ type DiscriminatorObject$1 = OpenAPIV3_1.DiscriminatorObject;
408
1153
  /**
409
1154
  * OpenAPI reference object pointing to a schema definition via `$ref`.
410
1155
  */
411
- type ReferenceObject$1 = OpenAPIV3.ReferenceObject;
1156
+ type ReferenceObject$1 = OpenAPIV3_1.ReferenceObject;
412
1157
  /**
413
- * OpenAPI response object from a spec that contains schema, status code, and headers.
1158
+ * OpenAPI response object holding the content and headers for one status code.
414
1159
  */
415
- type ResponseObject$1 = ResponseObject$2;
1160
+ type ResponseObject$1 = OpenAPIV3_1.ResponseObject;
416
1161
  /**
417
1162
  * OpenAPI media type object that maps a content-type string to its schema.
418
1163
  */
419
- type MediaTypeObject$1 = MediaTypeObject$2;
1164
+ type MediaTypeObject$1 = OpenAPIV3_1.MediaTypeObject;
1165
+ /**
1166
+ * Selects which entry in the spec's `servers` array becomes the base URL and
1167
+ * supplies values for its `{variable}` placeholders.
1168
+ */
1169
+ type ServerOptions = {
1170
+ /**
1171
+ * Index into the `servers` array from your OpenAPI spec. Most projects pick
1172
+ * `0` for the primary server. Omit to leave `baseURL` undefined.
1173
+ */
1174
+ index?: number;
1175
+ /**
1176
+ * Override values for `{variable}` placeholders in the selected server URL.
1177
+ * Variables you do not provide use their `default` value from the spec.
1178
+ */
1179
+ variables?: Record<string, string>;
1180
+ };
420
1181
  /**
421
- * Configuration options for the OpenAPI adapter.
422
- * Controls spec validation, content-type selection, and server URL resolution.
1182
+ * Configuration for the OpenAPI adapter: spec validation, content-type selection,
1183
+ * server URL resolution, and how schema types are derived.
423
1184
  *
424
1185
  * @example
425
1186
  * ```ts
426
1187
  * adapterOas({
427
1188
  * validate: false,
428
1189
  * dateType: 'date',
429
- * serverIndex: 0,
430
- * serverVariables: { env: 'prod' },
1190
+ * server: { index: 0, variables: { env: 'prod' } },
431
1191
  * })
432
1192
  * ```
433
1193
  */
434
1194
  type AdapterOasOptions = {
435
1195
  /**
436
- * Validate the OpenAPI spec before parsing.
1196
+ * Validate the OpenAPI spec with `@readme/openapi-parser` before parsing.
1197
+ * Set to `false` only when you have a known-invalid spec you still want to
1198
+ * generate from.
1199
+ *
437
1200
  * @default true
438
1201
  */
439
1202
  validate?: boolean;
440
1203
  /**
441
- * Preferred content-type used when extracting request/response schemas.
442
- * Defaults to the first valid JSON media type found in the spec.
1204
+ * Preferred media type when an operation defines several. Defaults to the
1205
+ * first JSON-compatible media type found in the spec.
443
1206
  */
444
1207
  contentType?: ContentType;
445
1208
  /**
446
- * Index into `oas.api.servers` for computing `baseURL`.
447
- * `0` first server, `1` → second server. Omit to leave `baseURL` undefined.
448
- */
449
- serverIndex?: number;
450
- /**
451
- * Override values for `{variable}` placeholders in the selected server URL.
452
- * Only used when `serverIndex` is set.
1209
+ * Selects the server entry used to compute the base URL for plugins that need
1210
+ * it, and overrides its `{variable}` placeholders. Omit to leave `baseURL`
1211
+ * undefined.
453
1212
  *
454
1213
  * @example
455
1214
  * ```ts
456
1215
  * // spec server: "https://api.{env}.example.com"
457
- * serverVariables: { env: 'prod' }
1216
+ * server: { index: 0, variables: { env: 'prod' } }
458
1217
  * // → baseURL: "https://api.prod.example.com"
459
1218
  * ```
460
1219
  */
461
- serverVariables?: Record<string, string>;
1220
+ server?: ServerOptions;
1221
+ /**
1222
+ * How the `discriminator` field on `oneOf`/`anyOf` schemas is interpreted.
1223
+ * - `'preserve'` child schemas stay exactly as written. The discriminator
1224
+ * narrows types at the call site but child shapes are not modified.
1225
+ * - `'propagate'` Kubb pushes the discriminator property as a literal value
1226
+ * into each child schema, so each branch's discriminator field is precisely
1227
+ * typed.
1228
+ *
1229
+ * @default 'preserve'
1230
+ */
1231
+ discriminator?: 'preserve' | 'propagate';
462
1232
  /**
463
- * How the discriminator field is interpreted.
464
- * - `'strict'` uses `oneOf` schemas as written in the spec.
465
- * - `'inherit'` propagates discriminator values into child schemas from `discriminator.mapping`.
466
- * @default 'strict'
1233
+ * Where inline enums live.
1234
+ * - `'inline'` keeps each enum inline on the property that declares it.
1235
+ * - `'root'` lifts every inline enum to a reusable top-level schema named after its context
1236
+ * (e.g. `PetStatusEnum`) and references it everywhere it appears.
1237
+ *
1238
+ * @default 'inline'
467
1239
  */
468
- discriminator?: 'strict' | 'inherit';
1240
+ enums?: 'inline' | 'root';
469
1241
  } & Partial<ast.ParserOptions>;
470
1242
  /**
471
1243
  * Adapter options after defaults have been applied and schema name collisions resolved.
@@ -473,9 +1245,9 @@ type AdapterOasOptions = {
473
1245
  type AdapterOasResolvedOptions = {
474
1246
  validate: boolean;
475
1247
  contentType: AdapterOasOptions['contentType'];
476
- serverIndex: AdapterOasOptions['serverIndex'];
477
- serverVariables: AdapterOasOptions['serverVariables'];
1248
+ server: AdapterOasOptions['server'];
478
1249
  discriminator: NonNullable<AdapterOasOptions['discriminator']>;
1250
+ enums: NonNullable<AdapterOasOptions['enums']>;
479
1251
  dateType: NonNullable<AdapterOasOptions['dateType']>;
480
1252
  integerType: NonNullable<AdapterOasOptions['integerType']>;
481
1253
  unknownType: NonNullable<AdapterOasOptions['unknownType']>;
@@ -483,7 +1255,7 @@ type AdapterOasResolvedOptions = {
483
1255
  enumSuffix: AdapterOasOptions['enumSuffix'];
484
1256
  /**
485
1257
  * Map from original `$ref` paths to their collision-resolved schema names.
486
- * Populated after each `parse()` call.
1258
+ * Populated once the adapter resolves a spec's schemas, on the first `parse()`.
487
1259
  *
488
1260
  * @example
489
1261
  * ```ts
@@ -500,14 +1272,17 @@ type AdapterOas = AdapterFactoryOptions<'oas', AdapterOasOptions, AdapterOasReso
500
1272
  //#endregion
501
1273
  //#region src/adapter.d.ts
502
1274
  /**
503
- * Stable string identifier for the OAS adapter used in Kubb's adapter registry.
1275
+ * The `name` of `@kubb/adapter-oas`, used to identify this adapter in a Kubb config.
504
1276
  */
505
1277
  declare const adapterOasName = "oas";
506
1278
  /**
507
- * Creates the default OpenAPI / Swagger adapter for Kubb.
1279
+ * Default Kubb adapter for OpenAPI 2.0, 3.0, and 3.1 specifications. Reads the
1280
+ * spec from `input` (a file path, URL, inline content, or parsed object), validates
1281
+ * it, resolves the base URL, and converts every schema and operation into the
1282
+ * universal AST that every downstream plugin consumes.
508
1283
  *
509
- * Parses the spec, optionally validates it, resolves the base URL, and converts
510
- * everything into an `InputNode` that downstream plugins consume.
1284
+ * Configure once on `defineConfig`. The adapter's choices (date representation,
1285
+ * integer width, server URL) apply to every plugin in the build.
511
1286
  *
512
1287
  * @example
513
1288
  * ```ts
@@ -516,30 +1291,18 @@ declare const adapterOasName = "oas";
516
1291
  * import { pluginTs } from '@kubb/plugin-ts'
517
1292
  *
518
1293
  * export default defineConfig({
519
- * adapter: adapterOas({ dateType: 'date', serverIndex: 0 }),
520
- * input: { path: './openapi.yaml' },
1294
+ * input: './petStore.yaml',
1295
+ * output: { path: './src/gen' },
1296
+ * adapter: adapterOas({
1297
+ * server: { index: 0 },
1298
+ * discriminator: 'propagate',
1299
+ * dateType: 'date',
1300
+ * }),
521
1301
  * plugins: [pluginTs()],
522
1302
  * })
523
1303
  * ```
524
1304
  */
525
- declare const adapterOas: (options?: AdapterOasOptions | undefined) => _$_kubb_core0.Adapter<AdapterOas>;
526
- //#endregion
527
- //#region src/factory.d.ts
528
- type ValidateDocumentOptions = {
529
- throwOnError?: boolean;
530
- };
531
- /**
532
- * Deep-merges multiple OpenAPI documents into a single `Document`.
533
- *
534
- * Each document is parsed independently then recursively merged via `mergeDeep` from `@internals/utils`.
535
- * Throws when the input array is empty.
536
- *
537
- * @example
538
- * ```ts
539
- * const document = await mergeDocuments(['./pets.yaml', './orders.yaml'])
540
- * ```
541
- */
542
- declare function mergeDocuments(pathOrApi: Array<string | Document>): Promise<Document>;
1305
+ declare const adapterOas: (options?: AdapterOasOptions | undefined) => import("@kubb/core").Adapter<AdapterOas>;
543
1306
  //#endregion
544
- export { type AdapterOas, type AdapterOasOptions, type AdapterOasResolvedOptions, type ContentType, type DiscriminatorObject$1 as DiscriminatorObject, type Document, type HttpMethod, HttpMethods$1 as HttpMethods, type MediaTypeObject$1 as MediaTypeObject, type Operation, type ReferenceObject$1 as ReferenceObject, type ResponseObject$1 as ResponseObject, type SchemaObject$1 as SchemaObject, type ValidateDocumentOptions, adapterOas, adapterOasName, mergeDocuments };
1307
+ export { type AdapterOas, type AdapterOasOptions, type AdapterOasResolvedOptions, type ContentType, type DiscriminatorObject$1 as DiscriminatorObject, type Document, type MediaTypeObject$1 as MediaTypeObject, type Operation, type ReferenceObject$1 as ReferenceObject, type ResponseObject$1 as ResponseObject, type SchemaObject$1 as SchemaObject, adapterOas, adapterOasName };
545
1308
  //# sourceMappingURL=index.d.ts.map