@hey-api/openapi-ts 0.53.11 → 0.54.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.
package/dist/index.d.cts CHANGED
@@ -1,722 +1,471 @@
1
- interface Dictionary<T = unknown> {
2
- [key: string]: T;
3
- }
1
+ type PluginNames =
2
+ | '@hey-api/schemas'
3
+ | '@hey-api/services'
4
+ | '@hey-api/transformers'
5
+ | '@hey-api/types'
6
+ | '@tanstack/react-query'
7
+ | '@tanstack/solid-query'
8
+ | '@tanstack/svelte-query'
9
+ | '@tanstack/vue-query'
10
+ | 'zod';
4
11
 
5
- /**
6
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#reference-object
7
- */
8
- interface OpenApiReference$1 {
9
- $ref?: string;
12
+ interface PluginName<Name extends PluginNames> {
13
+ name: Name;
10
14
  }
11
15
 
12
- /**
13
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#example-object
14
- */
15
- interface OpenApiExample extends OpenApiReference$1 {
16
- description?: string;
17
- externalValue?: string;
18
- summary?: string;
19
- value?: unknown;
16
+ interface CommonConfig {
17
+ name: PluginNames;
18
+ output?: string;
20
19
  }
21
20
 
22
- interface WithEnumExtension {
23
- 'x-enum-descriptions'?: ReadonlyArray<string>;
24
- 'x-enum-varnames'?: ReadonlyArray<string>;
25
- 'x-enumNames'?: ReadonlyArray<string>;
26
- }
21
+ type UserConfig$1<Config extends CommonConfig> = Omit<Config, 'output'>;
27
22
 
28
- /**
29
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#discriminator-object
30
- */
31
- interface OpenApiDiscriminator {
32
- mapping?: Dictionary<string>;
33
- propertyName: string;
23
+ interface EnumExtensions {
24
+ /**
25
+ * `x-enum-descriptions` are {@link https://stackoverflow.com/a/66471626 supported} by OpenAPI Generator.
26
+ */
27
+ 'x-enum-descriptions'?: ReadonlyArray<string>;
28
+ /**
29
+ * `x-enum-varnames` are {@link https://stackoverflow.com/a/66471626 supported} by OpenAPI Generator.
30
+ */
31
+ 'x-enum-varnames'?: ReadonlyArray<string>;
32
+ /**
33
+ * {@link https://github.com/RicoSuter/NSwag NSwag} generates `x-enumNames` field containing custom enum names.
34
+ */
35
+ 'x-enumNames'?: ReadonlyArray<string>;
34
36
  }
35
37
 
36
- /**
37
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#external-documentation-object
38
- */
39
- interface OpenApiExternalDocs$1 {
40
- description?: string;
41
- url: string;
38
+ interface OpenApiSchemaExtensions {
39
+ /**
40
+ * Adds support for polymorphism. The discriminator is an object name that is used to differentiate between other schemas which may satisfy the payload description. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#composition-and-inheritance-polymorphism Composition and Inheritance} for more details.
41
+ */
42
+ discriminator?: DiscriminatorObject;
43
+ /**
44
+ * A free-form property to include an example of an instance for this schema. To represent examples that cannot be naturally represented in JSON or YAML, a string value can be used to contain the example with escaping where necessary.
45
+ *
46
+ * **Deprecated**: The `example` property has been deprecated in favor of the JSON Schema `examples` keyword. Use of `example` is discouraged, and later versions of this specification may remove it.
47
+ */
48
+ example?: unknown;
49
+ /**
50
+ * Additional external documentation for this schema.
51
+ */
52
+ externalDocs?: ExternalDocumentationObject;
53
+ /**
54
+ * This MAY be used only on properties schemas. It has no effect on root schemas. Adds additional metadata to describe the XML representation of this property.
55
+ */
56
+ xml?: XMLObject;
42
57
  }
43
58
 
44
- /**
45
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#xml-object
46
- */
47
- interface OpenApiXml$1 {
48
- attribute?: boolean;
49
- name?: string;
50
- namespace?: string;
51
- prefix?: string;
52
- wrapped?: boolean;
59
+ // TODO: left out some keywords related to structuring a complex schema and declaring a dialect
60
+ interface JsonSchemaDraft2020_12
61
+ extends ArrayKeywords,
62
+ NumberKeywords,
63
+ ObjectKeywords,
64
+ StringKeywords,
65
+ EnumExtensions,
66
+ OpenApiSchemaExtensions {
67
+ /**
68
+ * The `$comment` {@link https://json-schema.org/learn/glossary#keyword keyword} is strictly intended for adding comments to a schema. Its value must always be a string. Unlike the annotations `title`, `description`, and `examples`, JSON schema {@link https://json-schema.org/learn/glossary#implementation implementations} aren't allowed to attach any meaning or behavior to it whatsoever, and may even strip them at any time. Therefore, they are useful for leaving notes to future editors of a JSON schema, but should not be used to communicate to users of the schema.
69
+ */
70
+ $comment?: string;
71
+ /**
72
+ * A schema can reference another schema using the `$ref` keyword. The value of `$ref` is a URI-reference that is resolved against the schema's {@link https://json-schema.org/understanding-json-schema/structuring#base-uri Base URI}. When evaluating a `$ref`, an implementation uses the resolved identifier to retrieve the referenced schema and applies that schema to the {@link https://json-schema.org/learn/glossary#instance instance}.
73
+ *
74
+ * The `$ref` keyword may be used to create recursive schemas that refer to themselves.
75
+ */
76
+ $ref?: string;
77
+ /**
78
+ * `allOf`: (AND) Must be valid against _all_ of the {@link https://json-schema.org/learn/glossary#subschema subschemas}
79
+ *
80
+ * To validate against `allOf`, the given data must be valid against all of the given subschemas.
81
+ *
82
+ * {@link https://json-schema.org/understanding-json-schema/reference/combining#allof allOf} can not be used to "extend" a schema to add more details to it in the sense of object-oriented inheritance. {@link https://json-schema.org/learn/glossary#instance Instances} must independently be valid against "all of" the schemas in the `allOf`. See the section on {@link https://json-schema.org/understanding-json-schema/reference/object#extending Extending Closed Schemas} for more information.
83
+ */
84
+ allOf?: ReadonlyArray<JsonSchemaDraft2020_12>;
85
+ /**
86
+ * `anyOf`: (OR) Must be valid against _any_ of the subschemas
87
+ *
88
+ * To validate against `anyOf`, the given data must be valid against any (one or more) of the given subschemas.
89
+ */
90
+ anyOf?: ReadonlyArray<JsonSchemaDraft2020_12>;
91
+ /**
92
+ * The `const` keyword is used to restrict a value to a single value.
93
+ */
94
+ const?: unknown;
95
+ /**
96
+ * The `contentEncoding` keyword specifies the encoding used to store the contents, as specified in {@link https://tools.ietf.org/html/rfc2045 RFC 2054, part 6.1} and {@link https://datatracker.ietf.org/doc/html/rfc4648 RFC 4648}.
97
+ *
98
+ * The acceptable values are `quoted-printable`, `base16`, `base32`, and `base64`. If not specified, the encoding is the same as the containing JSON document.
99
+ *
100
+ * Without getting into the low-level details of each of these encodings, there are really only two options useful for modern usage:
101
+ * - If the content is encoded in the same encoding as the enclosing JSON document (which for practical purposes, is almost always UTF-8), leave `contentEncoding` unspecified, and include the content in a string as-is. This includes text-based content types, such as `text/html` or `application/xml`.
102
+ * - If the content is binary data, set `contentEncoding` to `base64` and encode the contents using {@link https://tools.ietf.org/html/rfc4648 Base64}. This would include many image types, such as `image/png` or audio types, such as `audio/mpeg`.
103
+ */
104
+ contentEncoding?: 'base16' | 'base32' | 'base64' | 'quoted-printable';
105
+ /**
106
+ * The `contentMediaType` keyword specifies the MIME type of the contents of a string, as described in {@link https://tools.ietf.org/html/rfc2046 RFC 2046}. There is a list of {@link http://www.iana.org/assignments/media-types/media-types.xhtml MIME types officially registered by the IANA}, but the set of types supported will be application and operating system dependent. Mozilla Developer Network also maintains a {@link https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types shorter list of MIME types that are important for the web}
107
+ */
108
+ contentMediaType?: string;
109
+ /**
110
+ * The `default` keyword specifies a default value. This value is not used to fill in missing values during the validation process. Non-validation tools such as documentation generators or form generators may use this value to give hints to users about how to use a value. However, `default` is typically used to express that if a value is missing, then the value is semantically the same as if the value was present with the default value. The value of `default` should validate against the schema in which it resides, but that isn't required.
111
+ */
112
+ default?: unknown;
113
+ /**
114
+ * The `dependentRequired` {@link https://json-schema.org/learn/glossary#keyword keyword} conditionally requires that certain properties must be present if a given property is present in an object. For example, suppose we have a {@link https://json-schema.org/learn/glossary#schema schema} representing a customer. If you have their credit card number, you also want to ensure you have a billing address. If you don't have their credit card number, a billing address would not be required. We represent this dependency of one property on another using the `dependentRequired` keyword. The value of the `dependentRequired` keyword is an object. Each entry in the object maps from the name of a property, _p_, to an array of strings listing properties that are required if _p_ is present.
115
+ */
116
+ dependentRequired?: Record<string, ReadonlyArray<string>>;
117
+ /**
118
+ * The `dependentSchemas` keyword conditionally applies a {@link https://json-schema.org/learn/glossary#subschema subschema} when a given property is present. This schema is applied in the same way {@link https://json-schema.org/understanding-json-schema/reference/combining#allof allOf} applies schemas. Nothing is merged or extended. Both schemas apply independently.
119
+ */
120
+ dependentSchemas?: Record<string, JsonSchemaDraft2020_12>;
121
+ /**
122
+ * The `deprecated` keyword is a boolean that indicates that the {@link https://json-schema.org/learn/glossary#instance instance} value the keyword applies to should not be used and may be removed in the future.
123
+ */
124
+ deprecated?: boolean;
125
+ /**
126
+ * The `title` and `description` keywords must be strings. A "title" will preferably be short, whereas a "description" will provide a more lengthy explanation about the purpose of the data described by the schema.
127
+ */
128
+ description?: string;
129
+ /**
130
+ * The `if`, `then` and `else` keywords allow the application of a subschema based on the outcome of another schema, much like the `if`/`then`/`else` constructs you've probably seen in traditional programming languages.
131
+ *
132
+ * If `if` is valid, `then` must also be valid (and `else` is ignored.) If `if` is invalid, `else` must also be valid (and `then` is ignored).
133
+ *
134
+ * If `then` or `else` is not defined, `if` behaves as if they have a value of `true`.
135
+ *
136
+ * If `then` and/or `else` appear in a schema without `if`, `then` and `else` are ignored.
137
+ */
138
+ else?: JsonSchemaDraft2020_12;
139
+ /**
140
+ * The `enum` {@link https://json-schema.org/learn/glossary#keyword keyword} is used to restrict a value to a fixed set of values. It must be an array with at least one element, where each element is unique.
141
+ *
142
+ * You can use `enum` even without a type, to accept values of different types.
143
+ */
144
+ enum?: ReadonlyArray<unknown>;
145
+ /**
146
+ * The `examples` keyword is a place to provide an array of examples that validate against the schema. This isn't used for validation, but may help with explaining the effect and purpose of the schema to a reader. Each entry should validate against the schema in which it resides, but that isn't strictly required. There is no need to duplicate the `default` value in the `examples` array, since `default` will be treated as another example.
147
+ */
148
+ examples?: ReadonlyArray<unknown>;
149
+ /**
150
+ * The `format` keyword allows for basic semantic identification of certain kinds of string values that are commonly used. For example, because JSON doesn't have a "DateTime" type, dates need to be encoded as strings. `format` allows the schema author to indicate that the string value should be interpreted as a date. By default, `format` is just an annotation and does not effect validation.
151
+ *
152
+ * Optionally, validator {@link https://json-schema.org/learn/glossary#implementation implementations} can provide a configuration option to enable `format` to function as an assertion rather than just an annotation. That means that validation will fail if, for example, a value with a `date` format isn't in a form that can be parsed as a date. This can allow values to be constrained beyond what the other tools in JSON Schema, including {@link https://json-schema.org/understanding-json-schema/reference/regular_expressions Regular Expressions} can do.
153
+ *
154
+ * There is a bias toward networking-related formats in the JSON Schema specification, most likely due to its heritage in web technologies. However, custom formats may also be used, as long as the parties exchanging the JSON documents also exchange information about the custom format types. A JSON Schema validator will ignore any format type that it does not understand.
155
+ */
156
+ format?: JsonSchemaFormats;
157
+ /**
158
+ * The `if`, `then` and `else` keywords allow the application of a subschema based on the outcome of another schema, much like the `if`/`then`/`else` constructs you've probably seen in traditional programming languages.
159
+ *
160
+ * If `if` is valid, `then` must also be valid (and `else` is ignored.) If `if` is invalid, `else` must also be valid (and `then` is ignored).
161
+ *
162
+ * If `then` or `else` is not defined, `if` behaves as if they have a value of `true`.
163
+ *
164
+ * If `then` and/or `else` appear in a schema without `if`, `then` and `else` are ignored.
165
+ */
166
+ if?: JsonSchemaDraft2020_12;
167
+ /**
168
+ * `not`: (NOT) Must _not_ be valid against the given schema
169
+ *
170
+ * The `not` keyword declares that an instance validates if it doesn't validate against the given subschema.
171
+ */
172
+ not?: JsonSchemaDraft2020_12;
173
+ /**
174
+ * `oneOf`: (XOR) Must be valid against _exactly one_ of the subschemas
175
+ *
176
+ * To validate against `oneOf`, the given data must be valid against exactly one of the given subschemas.
177
+ *
178
+ * Careful consideration should be taken when using `oneOf` entries as the nature of it requires verification of _every_ sub-schema which can lead to increased processing times. Prefer `anyOf` where possible.
179
+ */
180
+ oneOf?: ReadonlyArray<JsonSchemaDraft2020_12>;
181
+ /**
182
+ * The boolean keywords `readOnly` and `writeOnly` are typically used in an API context. `readOnly` indicates that a value should not be modified. It could be used to indicate that a `PUT` request that changes a value would result in a `400 Bad Request` response. `writeOnly` indicates that a value may be set, but will remain hidden. In could be used to indicate you can set a value with a `PUT` request, but it would not be included when retrieving that record with a `GET` request.
183
+ */
184
+ readOnly?: boolean;
185
+ /**
186
+ * The `if`, `then` and `else` keywords allow the application of a subschema based on the outcome of another schema, much like the `if`/`then`/`else` constructs you've probably seen in traditional programming languages.
187
+ *
188
+ * If `if` is valid, `then` must also be valid (and `else` is ignored.) If `if` is invalid, `else` must also be valid (and `then` is ignored).
189
+ *
190
+ * If `then` or `else` is not defined, `if` behaves as if they have a value of `true`.
191
+ *
192
+ * If `then` and/or `else` appear in a schema without `if`, `then` and `else` are ignored.
193
+ */
194
+ then?: JsonSchemaDraft2020_12;
195
+ /**
196
+ * The `title` and `description` keywords must be strings. A "title" will preferably be short, whereas a "description" will provide a more lengthy explanation about the purpose of the data described by the schema.
197
+ */
198
+ title?: string;
199
+ /**
200
+ * If it is an array, it must be an array of strings, where each string is the name of one of the basic types, and each element is unique. In this case, the JSON snippet is valid if it matches any of the given types.
201
+ */
202
+ type?: JsonSchemaTypes | ReadonlyArray<JsonSchemaTypes>;
203
+ /**
204
+ * The boolean keywords `readOnly` and `writeOnly` are typically used in an API context. `readOnly` indicates that a value should not be modified. It could be used to indicate that a `PUT` request that changes a value would result in a `400 Bad Request` response. `writeOnly` indicates that a value may be set, but will remain hidden. In could be used to indicate you can set a value with a `PUT` request, but it would not be included when retrieving that record with a `GET` request.
205
+ */
206
+ writeOnly?: boolean;
53
207
  }
54
208
 
55
- /**
56
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#schema-object
57
- */
58
- interface OpenApiSchema$1 extends OpenApiReference$1, WithEnumExtension {
59
- additionalProperties?: boolean | OpenApiSchema$1;
60
- allOf?: OpenApiSchema$1[];
61
- anyOf?: OpenApiSchema$1[];
62
- const?: string | number | boolean | null;
63
- default?: unknown;
64
- deprecated?: boolean;
65
- description?: string;
66
- discriminator?: OpenApiDiscriminator;
67
- enum?: (string | number)[];
68
- example?: unknown;
69
- exclusiveMaximum?: boolean;
70
- exclusiveMinimum?: boolean;
71
- externalDocs?: OpenApiExternalDocs$1;
72
- format?: 'binary' | 'boolean' | 'byte' | 'date-time' | 'date' | 'double' | 'float' | 'int32' | 'int64' | 'password' | 'string';
73
- items?: OpenApiSchema$1;
74
- maxItems?: number;
75
- maxLength?: number;
76
- maxProperties?: number;
77
- maximum?: number;
78
- minItems?: number;
79
- minLength?: number;
80
- minProperties?: number;
81
- minimum?: number;
82
- multipleOf?: number;
83
- not?: OpenApiSchema$1[];
84
- nullable?: boolean;
85
- oneOf?: OpenApiSchema$1[];
86
- pattern?: string;
87
- prefixItems?: OpenApiSchema$1[];
88
- properties?: Dictionary<OpenApiSchema$1>;
89
- readOnly?: boolean;
90
- required?: string[];
91
- title?: string;
92
- type?: string | string[];
93
- uniqueItems?: boolean;
94
- writeOnly?: boolean;
95
- xml?: OpenApiXml$1;
209
+ interface ArrayKeywords {
210
+ /**
211
+ * While the `items` schema must be valid for every item in the array, the `contains` schema only needs to validate against one or more items in the array.
212
+ */
213
+ contains?: JsonSchemaDraft2020_12;
214
+ /**
215
+ * List validation is useful for arrays of arbitrary length where each item matches the same schema. For this kind of array, set the `items` {@link https://json-schema.org/learn/glossary#keyword keyword} to a single schema that will be used to validate all of the items in the array.
216
+ *
217
+ * The `items` keyword can be used to control whether it's valid to have additional items in a tuple beyond what is defined in `prefixItems`. The value of the `items` keyword is a schema that all additional items must pass in order for the keyword to validate.
218
+ *
219
+ * Note that `items` doesn't "see inside" any {@link https://json-schema.org/learn/glossary#instance instances} of `allOf`, `anyOf`, or `oneOf` in the same {@link https://json-schema.org/learn/glossary#subschema subschema}.
220
+ */
221
+ items?: JsonSchemaDraft2020_12 | false;
222
+ /**
223
+ * `minContains` and `maxContains` can be used with `contains` to further specify how many times a schema matches a `contains` constraint. These keywords can be any non-negative number including zero.
224
+ */
225
+ maxContains?: number;
226
+ /**
227
+ * The length of the array can be specified using the `minItems` and `maxItems` keywords. The value of each keyword must be a non-negative number. These keywords work whether doing {@link https://json-schema.org/understanding-json-schema/reference/array#items list validation} or {@link https://json-schema.org/understanding-json-schema/reference/array#tupleValidation tuple-validation}.
228
+ */
229
+ maxItems?: number;
230
+ /**
231
+ * `minContains` and `maxContains` can be used with `contains` to further specify how many times a schema matches a `contains` constraint. These keywords can be any non-negative number including zero.
232
+ */
233
+ minContains?: number;
234
+ /**
235
+ * The length of the array can be specified using the `minItems` and `maxItems` keywords. The value of each keyword must be a non-negative number. These keywords work whether doing {@link https://json-schema.org/understanding-json-schema/reference/array#items list validation} or {@link https://json-schema.org/understanding-json-schema/reference/array#tupleValidation tuple-validation}.
236
+ */
237
+ minItems?: number;
238
+ /**
239
+ * `prefixItems` is an array, where each item is a schema that corresponds to each index of the document's array. That is, an array where the first element validates the first element of the input array, the second element validates the second element of the input array, etc.
240
+ */
241
+ prefixItems?: ReadonlyArray<JsonSchemaDraft2020_12>;
242
+ /**
243
+ * The `unevaluatedItems` keyword is useful mainly when you want to add or disallow extra items to an array.
244
+ *
245
+ * `unevaluatedItems` applies to any values not evaluated by an `items`, `prefixItems`, or `contains` keyword. Just as `unevaluatedProperties` affects only properties in an object, `unevaluatedItems` affects only items in an array.
246
+ *
247
+ * Watch out! The word "unevaluated" _does not mean_ "not evaluated by `items`, `prefixItems`, or `contains`." "Unevaluated" means "not successfully evaluated", or "does not evaluate to true".
248
+ *
249
+ * Like with `items`, if you set `unevaluatedItems` to false, you can disallow extra items in the array.
250
+ */
251
+ unevaluatedItems?: JsonSchemaDraft2020_12 | false;
252
+ /**
253
+ * A schema can ensure that each of the items in an array is unique. Simply set the `uniqueItems` keyword to `true`.
254
+ */
255
+ uniqueItems?: boolean;
96
256
  }
97
257
 
98
- /**
99
- * add only one type for now as that's needed to resolve the reported issue,
100
- * more types should be added though
101
- * {@link https://github.com/hey-api/openapi-ts/issues/612}
102
- */
103
- type MediaType = 'application/json';
104
- /**
105
- * encoding interface should be added, not adding it for now as it's not needed
106
- * to resolve the issue reported
107
- * {@link https://github.com/hey-api/openapi-ts/issues/612}
108
- */
109
- interface MediaTypeObject$1 {
110
- example?: unknown;
111
- examples?: Dictionary<OpenApiExample>;
112
- schema: OpenApiSchema$1;
113
- }
114
- /**
115
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameter-object
116
- */
117
- interface OpenApiParameter extends OpenApiReference$1 {
118
- allowEmptyValue?: boolean;
119
- allowReserved?: boolean;
120
- content?: Record<MediaType, MediaTypeObject$1>;
121
- deprecated?: boolean;
122
- description?: string;
123
- example?: unknown;
124
- examples?: Dictionary<OpenApiExample>;
125
- explode?: boolean;
126
- in: 'cookie' | 'formData' | 'header' | 'path' | 'query';
127
- name: string;
128
- nullable?: boolean;
129
- required?: boolean;
130
- schema?: OpenApiSchema$1;
131
- style?: string;
258
+ interface NumberKeywords {
259
+ /**
260
+ * Ranges of numbers are specified using a combination of the `minimum` and `maximum` keywords, (or `exclusiveMinimum` and `exclusiveMaximum` for expressing exclusive range).
261
+ *
262
+ * If _x_ is the value being validated, the following must hold true:
263
+ *
264
+ * ```
265
+ * x minimum
266
+ * x > exclusiveMinimum
267
+ * x ≤ maximum
268
+ * x < exclusiveMaximum
269
+ * ```
270
+ *
271
+ * While you can specify both of `minimum` and `exclusiveMinimum` or both of `maximum` and `exclusiveMaximum`, it doesn't really make sense to do so.
272
+ */
273
+ exclusiveMaximum?: number;
274
+ /**
275
+ * Ranges of numbers are specified using a combination of the `minimum` and `maximum` keywords, (or `exclusiveMinimum` and `exclusiveMaximum` for expressing exclusive range).
276
+ *
277
+ * If _x_ is the value being validated, the following must hold true:
278
+ *
279
+ * ```
280
+ * x ≥ minimum
281
+ * x > exclusiveMinimum
282
+ * x ≤ maximum
283
+ * x < exclusiveMaximum
284
+ * ```
285
+ *
286
+ * While you can specify both of `minimum` and `exclusiveMinimum` or both of `maximum` and `exclusiveMaximum`, it doesn't really make sense to do so.
287
+ */
288
+ exclusiveMinimum?: number;
289
+ /**
290
+ * Ranges of numbers are specified using a combination of the `minimum` and `maximum` keywords, (or `exclusiveMinimum` and `exclusiveMaximum` for expressing exclusive range).
291
+ *
292
+ * If _x_ is the value being validated, the following must hold true:
293
+ *
294
+ * ```
295
+ * x ≥ minimum
296
+ * x > exclusiveMinimum
297
+ * x ≤ maximum
298
+ * x < exclusiveMaximum
299
+ * ```
300
+ *
301
+ * While you can specify both of `minimum` and `exclusiveMinimum` or both of `maximum` and `exclusiveMaximum`, it doesn't really make sense to do so.
302
+ */
303
+ maximum?: number;
304
+ /**
305
+ * Ranges of numbers are specified using a combination of the `minimum` and `maximum` keywords, (or `exclusiveMinimum` and `exclusiveMaximum` for expressing exclusive range).
306
+ *
307
+ * If _x_ is the value being validated, the following must hold true:
308
+ *
309
+ * ```
310
+ * x ≥ minimum
311
+ * x > exclusiveMinimum
312
+ * x ≤ maximum
313
+ * x < exclusiveMaximum
314
+ * ```
315
+ *
316
+ * While you can specify both of `minimum` and `exclusiveMinimum` or both of `maximum` and `exclusiveMaximum`, it doesn't really make sense to do so.
317
+ */
318
+ minimum?: number;
319
+ /**
320
+ * Numbers can be restricted to a multiple of a given number, using the `multipleOf` keyword. It may be set to any positive number. The multiple can be a floating point number.
321
+ */
322
+ multipleOf?: number;
132
323
  }
133
324
 
134
- interface Enum {
135
- customDescription?: string;
136
- customName?: string;
137
- description?: string;
138
- value: string | number;
139
- }
140
- interface OperationParameter extends Model {
141
- in: 'body' | 'cookie' | 'formData' | 'header' | 'path' | 'query';
142
- mediaType: string | null;
143
- prop: string;
144
- }
145
- interface OperationParameters extends Pick<Model, '$refs' | 'imports'> {
146
- parameters: OperationParameter[];
147
- parametersBody: OperationParameter | null;
148
- parametersCookie: OperationParameter[];
149
- parametersForm: OperationParameter[];
150
- parametersHeader: OperationParameter[];
151
- parametersPath: OperationParameter[];
152
- parametersQuery: OperationParameter[];
153
- }
154
- interface OperationResponse extends Model {
155
- code: number | 'default' | '1XX' | '2XX' | '3XX' | '4XX' | '5XX';
156
- in: 'header' | 'response';
157
- responseTypes: Array<'error' | 'success'>;
158
- }
159
- type Method = 'CONNECT' | 'DELETE' | 'GET' | 'HEAD' | 'OPTIONS' | 'PATCH' | 'POST' | 'PUT' | 'TRACE';
160
- interface Operation$1 extends OperationParameters {
161
- deprecated: boolean;
162
- description: string | null;
163
- /**
164
- * The operationId from OpenAPI specification.
165
- */
166
- id: string | null;
167
- method: Method;
168
- name: string;
169
- path: string;
170
- responseHeader: string | null;
171
- /**
172
- * All operation responses defined in OpenAPI specification.
173
- * Sorted by status code.
174
- */
175
- responses: OperationResponse[];
176
- summary: string | null;
177
- tags: string[] | null;
178
- }
179
- interface Schema {
180
- default?: unknown;
181
- exclusiveMaximum?: boolean;
182
- exclusiveMinimum?: boolean;
183
- format?: 'binary' | 'boolean' | 'byte' | 'date-time' | 'date' | 'double' | 'float' | 'int32' | 'int64' | 'password' | 'string';
184
- isDefinition: boolean;
185
- isNullable: boolean;
186
- isReadOnly: boolean;
187
- isRequired: boolean;
188
- maxItems?: number;
189
- maxLength?: number;
190
- maxProperties?: number;
191
- maximum?: number;
192
- minItems?: number;
193
- minLength?: number;
194
- minProperties?: number;
195
- minimum?: number;
196
- multipleOf?: number;
197
- pattern?: string;
198
- uniqueItems?: boolean;
199
- }
200
- interface ModelMeta {
201
- /**
202
- * Ref to the type in OpenAPI specification.
203
- */
204
- $ref: string;
205
- /**
206
- * Name passed to the initial `getModel()` call.
207
- */
208
- name: string;
209
- }
210
- interface Model extends Schema {
211
- /**
212
- * **Experimental.** Contains list of original refs so they can be used
213
- * to access the schema from anywhere instead of relying on string name.
214
- * This allows us to do things like detect type of ref.
215
- */
216
- $refs: string[];
217
- base: string;
218
- deprecated?: boolean;
219
- description: string | null;
220
- enum: Enum[];
221
- enums: Model[];
222
- export: 'all-of' | 'any-of' | 'array' | 'const' | 'dictionary' | 'enum' | 'generic' | 'interface' | 'one-of' | 'reference';
223
- imports: string[];
224
- in: OperationParameter['in'] | OpenApiParameter['in'] | OperationResponse['in'] | '';
225
- link: Model | Model[] | null;
226
- meta?: ModelMeta;
227
- /**
228
- * @deprecated use `meta.name` instead
229
- */
230
- name: string;
231
- properties: Model[];
232
- template: string | null;
233
- type: string;
234
- }
235
- interface Client$2 {
236
- models: Model[];
237
- operations: Operation$1[];
238
- server: string;
239
- /**
240
- * Map of generated types where type names are keys. This is used to track
241
- * uniquely generated types as we may want to deduplicate if there are
242
- * multiple definitions with the same name but different value, or if we
243
- * want to transform names.
244
- */
245
- types: Record<string, ModelMeta>;
246
- version: string;
325
+ interface ObjectKeywords {
326
+ /**
327
+ * The `additionalProperties` keyword is used to control the handling of extra stuff, that is, properties whose names are not listed in the `properties` keyword or match any of the regular expressions in the `patternProperties` keyword. By default any additional properties are allowed.
328
+ *
329
+ * The value of the `additionalProperties` keyword is a schema that will be used to validate any properties in the {@link https://json-schema.org/learn/glossary#instance instance} that are not matched by `properties` or `patternProperties`. Setting the `additionalProperties` schema to `false` means no additional properties will be allowed.
330
+ *
331
+ * It's important to note that `additionalProperties` only recognizes properties declared in the same {@link https://json-schema.org/learn/glossary#subschema subschema} as itself. So, `additionalProperties` can restrict you from "extending" a schema using {@link https://json-schema.org/understanding-json-schema/reference/combining combining} keywords such as {@link https://json-schema.org/understanding-json-schema/reference/combining#allof allOf}.
332
+ */
333
+ additionalProperties?: JsonSchemaDraft2020_12 | false;
334
+ /**
335
+ * The number of properties on an object can be restricted using the `minProperties` and `maxProperties` keywords. Each of these must be a non-negative integer.
336
+ */
337
+ maxProperties?: number;
338
+ /**
339
+ * The number of properties on an object can be restricted using the `minProperties` and `maxProperties` keywords. Each of these must be a non-negative integer.
340
+ */
341
+ minProperties?: number;
342
+ /**
343
+ * Sometimes you want to say that, given a particular kind of property name, the value should match a particular schema. That's where `patternProperties` comes in: it maps regular expressions to schemas. If a property name matches the given regular expression, the property value must validate against the corresponding schema.
344
+ */
345
+ patternProperties?: Record<string, JsonSchemaDraft2020_12>;
346
+ /**
347
+ * The properties (key-value pairs) on an object are defined using the `properties` {@link https://json-schema.org/learn/glossary#keyword keyword}. The value of `properties` is an object, where each key is the name of a property and each value is a {@link https://json-schema.org/learn/glossary#schema schema} used to validate that property. Any property that doesn't match any of the property names in the `properties` keyword is ignored by this keyword.
348
+ */
349
+ properties?: Record<string, JsonSchemaDraft2020_12 | true>;
350
+ /**
351
+ * The names of properties can be validated against a schema, irrespective of their values. This can be useful if you don't want to enforce specific properties, but you want to make sure that the names of those properties follow a specific convention. You might, for example, want to enforce that all names are valid ASCII tokens so they can be used as attributes in a particular programming language.
352
+ *
353
+ * Since object keys must always be strings anyway, it is implied that the schema given to `propertyNames` is always at least:
354
+ *
355
+ * ```json
356
+ * { "type": "string" }
357
+ * ```
358
+ */
359
+ propertyNames?: JsonSchemaDraft2020_12;
360
+ /**
361
+ * By default, the properties defined by the `properties` keyword are not required. However, one can provide a list of required properties using the `required` keyword.
362
+ *
363
+ * The `required` keyword takes an array of zero or more strings. Each of these strings must be unique.
364
+ */
365
+ required?: ReadonlyArray<string>;
366
+ /**
367
+ * The `unevaluatedProperties` keyword is similar to `additionalProperties` except that it can recognize properties declared in subschemas. So, the example from the previous section can be rewritten without the need to redeclare properties.
368
+ *
369
+ * `unevaluatedProperties` works by collecting any properties that are successfully validated when processing the schemas and using those as the allowed list of properties. This allows you to do more complex things like conditionally adding properties.
370
+ */
371
+ unevaluatedProperties?: JsonSchemaDraft2020_12 | false;
247
372
  }
248
373
 
249
- /**
250
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#external-documentation-object
251
- */
252
- interface OpenApiExternalDocs {
253
- description?: string;
254
- url: string;
374
+ interface StringKeywords {
375
+ /**
376
+ * The length of a string can be constrained using the `minLength` and `maxLength` {@link https://json-schema.org/learn/glossary#keyword keywords}. For both keywords, the value must be a non-negative number.
377
+ */
378
+ maxLength?: number;
379
+ /**
380
+ * The length of a string can be constrained using the `minLength` and `maxLength` {@link https://json-schema.org/learn/glossary#keyword keywords}. For both keywords, the value must be a non-negative number.
381
+ */
382
+ minLength?: number;
383
+ /**
384
+ * The `pattern` keyword is used to restrict a string to a particular regular expression. The regular expression syntax is the one defined in JavaScript ({@link https://www.ecma-international.org/publications-and-standards/standards/ecma-262/ ECMA 262} specifically) with Unicode support. See {@link https://json-schema.org/understanding-json-schema/reference/regular_expressions Regular Expressions} for more information.
385
+ */
386
+ pattern?: string;
255
387
  }
256
388
 
257
- interface WithNullableExtension {
258
- 'x-nullable'?: boolean;
259
- }
389
+ type JsonSchemaFormats =
390
+ | 'date'
391
+ | 'date-time'
392
+ | 'duration'
393
+ | 'email'
394
+ | 'hostname'
395
+ | 'idn-email'
396
+ | 'idn-hostname'
397
+ | 'ipv4'
398
+ | 'ipv6'
399
+ | 'iri'
400
+ | 'iri-reference'
401
+ | 'json-pointer'
402
+ | 'regex'
403
+ | 'relative-json-pointer'
404
+ | 'time'
405
+ | 'uri'
406
+ | 'uri-reference'
407
+ | 'uri-template'
408
+ | 'uuid'
409
+ // eslint-disable-next-line @typescript-eslint/ban-types
410
+ | (string & {});
260
411
 
261
- /**
262
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#reference-object
263
- */
264
- interface OpenApiReference {
265
- $ref?: string;
266
- }
412
+ type JsonSchemaTypes =
413
+ | 'array'
414
+ | 'boolean'
415
+ | 'integer'
416
+ | 'null'
417
+ | 'number'
418
+ | 'object'
419
+ | 'string';
267
420
 
268
421
  /**
269
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#xml-object
422
+ * This is the root object of the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#openapi-document OpenAPI document}.
423
+ *
424
+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.
270
425
  */
271
- interface OpenApiXml {
272
- attribute?: boolean;
273
- name?: string;
274
- namespace?: string;
275
- prefix?: string;
276
- wrapped?: boolean;
426
+ interface OpenApiV3_1_0 {
427
+ /**
428
+ * An element to hold various schemas for the document.
429
+ */
430
+ components?: ComponentsObject;
431
+ /**
432
+ * Additional external documentation.
433
+ */
434
+ externalDocs?: ExternalDocumentationObject;
435
+ /**
436
+ * **REQUIRED**. Provides metadata about the API. The metadata MAY be used by tooling as required.
437
+ */
438
+ info: InfoObject;
439
+ /**
440
+ * The default value for the `$schema` keyword within {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#schema-object Schema Objects} contained within this OAS document. This MUST be in the form of a URI.
441
+ */
442
+ jsonSchemaDialect?: string;
443
+ /**
444
+ * **REQUIRED**. This string MUST be the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#versions version number} of the OpenAPI Specification that the OpenAPI document uses. The `openapi` field SHOULD be used by tooling to interpret the OpenAPI document. This is _not_ related to the API {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#infoVersion `info.version`} string.
445
+ */
446
+ openapi: '3.1.0';
447
+ /**
448
+ * The available paths and operations for the API.
449
+ */
450
+ paths?: PathsObject;
451
+ /**
452
+ * A declaration of which security mechanisms can be used across the API. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. Individual operations can override this definition. To make security optional, an empty security requirement (`{}`) can be included in the array.
453
+ */
454
+ security?: ReadonlyArray<SecurityRequirementObject>;
455
+ /**
456
+ * An array of Server Objects, which provide connectivity information to a target server. If the `servers` property is not provided, or is an empty array, the default value would be a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#server-object Server Object} with a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#serverUrl url} value of `/`.
457
+ */
458
+ servers?: ReadonlyArray<ServerObject>;
459
+ /**
460
+ * A list of tags used by the document with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#operation-object Operation Object} must be declared. The tags that are not declared MAY be organized randomly or based on the tools' logic. Each tag name in the list MUST be unique.
461
+ */
462
+ tags?: ReadonlyArray<TagObject>;
463
+ /**
464
+ * The incoming webhooks that MAY be received as part of this API and that the API consumer MAY choose to implement. Closely related to the `callbacks` feature, this section describes requests initiated other than by an API call, for example by an out of band registration. The key name is a unique string to refer to each webhook, while the (optionally referenced) Path Item Object describes a request that may be initiated by the API provider and the expected responses. An {@link https://github.com/OAI/OpenAPI-Specification/blob/main/examples/v3.1/webhook-example.yaml example} is available.
465
+ */
466
+ webhooks?: Record<string, PathItemObject | ReferenceObject>;
277
467
  }
278
468
 
279
- /**
280
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#schema-object
281
- */
282
- interface OpenApiSchema extends OpenApiReference, WithEnumExtension, WithNullableExtension {
283
- additionalProperties?: boolean | OpenApiSchema;
284
- allOf?: OpenApiSchema[];
285
- default?: unknown;
286
- description?: string;
287
- discriminator?: string;
288
- enum?: (string | number)[];
289
- example?: unknown;
290
- exclusiveMaximum?: boolean;
291
- exclusiveMinimum?: boolean;
292
- externalDocs?: OpenApiExternalDocs;
293
- format?: 'int32' | 'int64' | 'float' | 'double' | 'string' | 'boolean' | 'byte' | 'binary' | 'date' | 'date-time' | 'password';
294
- items?: OpenApiSchema;
295
- maxItems?: number;
296
- maxLength?: number;
297
- maxProperties?: number;
298
- maximum?: number;
299
- minItems?: number;
300
- minLength?: number;
301
- minProperties?: number;
302
- minimum?: number;
303
- multipleOf?: number;
304
- pattern?: string;
305
- properties?: Dictionary<OpenApiSchema>;
306
- readOnly?: boolean;
307
- required?: string[];
308
- title?: string;
309
- type?: string;
310
- uniqueItems?: boolean;
311
- xml?: OpenApiXml;
312
- }
313
-
314
- interface Operation extends Omit<Operation$1, 'tags'> {
315
- service: string;
316
- }
317
- interface Service extends Pick<Model, '$refs' | 'imports' | 'name'> {
318
- operations: Operation[];
319
- }
320
- interface Client$1 extends Omit<Client$2, 'operations'> {
321
- services: Service[];
322
- }
323
-
324
- interface Config$3 {
325
- /**
326
- * Generate {@link https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions `infiniteQueryOptions()`} helpers? These will be generated from GET and POST requests where a pagination parameter is detected.
327
- * @default true
328
- */
329
- infiniteQueryOptions?: boolean;
330
- /**
331
- * Generate {@link https://tanstack.com/query/v5/docs/framework/react/reference/useMutation `useMutation()`} helpers? These will be generated from DELETE, PATCH, POST, and PUT requests.
332
- * @default true
333
- */
334
- mutationOptions?: boolean;
335
- /**
336
- * Generate TanStack React Query output from the provided input.
337
- */
338
- name: '@tanstack/react-query';
339
- /**
340
- * Name of the generated file.
341
- * @default '@tanstack/react-query'
342
- */
343
- output?: string;
344
- /**
345
- * Generate {@link https://tanstack.com/query/v5/docs/framework/react/reference/queryOptions `queryOptions()`} helpers?
346
- * These will be generated from all requests.
347
- * @default true
348
- */
349
- queryOptions?: boolean;
350
- }
351
- interface UserConfig$4 extends Omit<Config$3, 'output'> {
352
- }
353
-
354
- interface Config$2 {
355
- /**
356
- * Generate `createInfiniteQuery()` helpers? These will be generated from GET and POST requests where a pagination parameter is detected.
357
- * @default true
358
- */
359
- infiniteQueryOptions?: boolean;
360
- /**
361
- * Generate `createMutation()` helpers? These will be generated from DELETE, PATCH, POST, and PUT requests.
362
- * @default true
363
- */
364
- mutationOptions?: boolean;
365
- /**
366
- * Generate TanStack Solid Query output from the provided input.
367
- */
368
- name: '@tanstack/solid-query';
369
- /**
370
- * Name of the generated file.
371
- * @default '@tanstack/solid-query'
372
- */
373
- output?: string;
374
- /**
375
- * Generate {@link https://tanstack.com/query/v5/docs/framework/solid/reference/createQuery `createQuery()`} helpers?
376
- * These will be generated from all requests.
377
- * @default true
378
- */
379
- queryOptions?: boolean;
380
- }
381
- interface UserConfig$3 extends Omit<Config$2, 'output'> {
382
- }
383
-
384
- interface Config$1 {
385
- /**
386
- * Generate `createInfiniteQuery()` helpers? These will be generated from GET and POST requests where a pagination parameter is detected.
387
- * @default true
388
- */
389
- infiniteQueryOptions?: boolean;
390
- /**
391
- * Generate {@link https://tanstack.com/query/v5/docs/framework/svelte/reference/functions/createmutation `createMutation()`} helpers? These will be generated from DELETE, PATCH, POST, and PUT requests.
392
- * @default true
393
- */
394
- mutationOptions?: boolean;
395
- /**
396
- * Generate TanStack Svelte Query output from the provided input.
397
- */
398
- name: '@tanstack/svelte-query';
399
- /**
400
- * Name of the generated file.
401
- * @default '@tanstack/svelte-query'
402
- */
403
- output?: string;
404
- /**
405
- * Generate {@link https://tanstack.com/query/v5/docs/framework/svelte/reference/functions/createquery `createQuery()`} helpers?
406
- * These will be generated from all requests.
407
- * @default true
408
- */
409
- queryOptions?: boolean;
410
- }
411
- interface UserConfig$2 extends Omit<Config$1, 'output'> {
412
- }
413
-
414
- interface Config {
415
- /**
416
- * Generate {@link https://tanstack.com/query/v5/docs/framework/vue/reference/infiniteQueryOptions `infiniteQueryOptions()`} helpers? These will be generated from GET and POST requests where a pagination parameter is detected.
417
- * @default true
418
- */
419
- infiniteQueryOptions?: boolean;
420
- /**
421
- * Generate {@link https://tanstack.com/query/v5/docs/framework/vue/reference/useMutation `useMutation()`} helpers? These will be generated from DELETE, PATCH, POST, and PUT requests.
422
- * @default true
423
- */
424
- mutationOptions?: boolean;
425
- /**
426
- * Generate TanStack Vue Query output from the provided input.
427
- */
428
- name: '@tanstack/vue-query';
429
- /**
430
- * Name of the generated file.
431
- * @default '@tanstack/vue-query'
432
- */
433
- output?: string;
434
- /**
435
- * Generate {@link https://tanstack.com/query/v5/docs/framework/vue/guides/query-options `queryOptions()`} helpers?
436
- * These will be generated from all requests.
437
- * @default true
438
- */
439
- queryOptions?: boolean;
440
- }
441
- interface UserConfig$1 extends Omit<Config, 'output'> {
442
- }
443
-
444
- /**
445
- * User-facing plugin types.
446
- */
447
- type UserPlugins = UserConfig$4 | UserConfig$3 | UserConfig$2 | UserConfig$1;
448
-
449
- declare const CLIENTS: readonly ["@hey-api/client-axios", "@hey-api/client-fetch", "legacy/angular", "legacy/axios", "legacy/fetch", "legacy/node", "legacy/xhr"];
450
- type Client = (typeof CLIENTS)[number];
451
- interface ClientConfig {
452
- /**
453
- * Manually set base in OpenAPI config instead of inferring from server value
454
- * @deprecated
455
- */
456
- base?: string;
457
- /**
458
- * HTTP client to generate
459
- */
460
- client?: Client | false | {
461
- /**
462
- * Bundle the client module? Set this to true if you're using a standalone
463
- * client package and don't want to declare it as a separate dependency.
464
- * When true, the client module will be generated from the standalone
465
- * package and bundled with the rest of the generated output. This is
466
- * useful if you're repackaging the output, publishing it to other users,
467
- * and you don't want them to install any dependencies.
468
- * @default false
469
- */
470
- bundle?: boolean;
471
- /**
472
- * HTTP client to generate
473
- */
474
- name: Client;
475
- };
476
- /**
477
- * Path to the config file. Set this value if you don't use the default
478
- * config file name, or it's not located in the project root.
479
- */
480
- configFile?: string;
481
- /**
482
- * Run in debug mode?
483
- * @default false
484
- */
485
- debug?: boolean;
486
- /**
487
- * Skip writing files to disk?
488
- * @default false
489
- */
490
- dryRun?: boolean;
491
- /**
492
- * Use the experimental parser?
493
- * @default false
494
- */
495
- experimental_parser?: boolean;
496
- /**
497
- * Generate core client classes?
498
- * @default true
499
- */
500
- exportCore?: boolean;
501
- /**
502
- * The relative location of the OpenAPI spec
503
- */
504
- input: string | Record<string, unknown>;
505
- /**
506
- * Custom client class name
507
- * @deprecated
508
- */
509
- name?: string;
510
- /**
511
- * The relative location of the output directory
512
- */
513
- output: string | {
514
- /**
515
- * Process output folder with formatter?
516
- * @default false
517
- */
518
- format?: 'biome' | 'prettier' | false;
519
- /**
520
- * Process output folder with linter?
521
- * @default false
522
- */
523
- lint?: 'biome' | 'eslint' | false;
524
- /**
525
- * The relative location of the output directory
526
- */
527
- path: string;
528
- };
529
- /**
530
- * Plugins are used to generate additional output files from provided input.
531
- */
532
- plugins?: ReadonlyArray<UserPlugins['name'] | UserPlugins>;
533
- /**
534
- * Path to custom request file
535
- * @deprecated
536
- */
537
- request?: string;
538
- /**
539
- * Generate JSON schemas?
540
- * @default true
541
- */
542
- schemas?: boolean | {
543
- /**
544
- * Generate JSON schemas?
545
- * @default true
546
- */
547
- export?: boolean;
548
- /**
549
- * Customise the schema name. By default, `{{name}}Schema` is used. `name` is a
550
- * valid JavaScript/TypeScript identifier, e.g. if your schema name is
551
- * "Foo-Bar", `name` value would be "FooBar".
552
- */
553
- name?: (name: string, schema: OpenApiSchema | OpenApiSchema$1) => string;
554
- /**
555
- * Choose schema type to generate. Select 'form' if you don't want
556
- * descriptions to reduce bundle size and you plan to use schemas
557
- * for form validation
558
- * @default 'json'
559
- */
560
- type?: 'form' | 'json';
561
- };
562
- /**
563
- * Generate services?
564
- * @default true
565
- */
566
- services?: boolean | string | {
567
- /**
568
- * Group operation methods into service classes? When enabled, you can
569
- * select which classes to export with `services.include` and/or
570
- * transform their names with `services.name`.
571
- *
572
- * Note that by enabling this option, your services will **NOT**
573
- * support {@link https://developer.mozilla.org/docs/Glossary/Tree_shaking tree-shaking}.
574
- * For this reason, it is disabled by default.
575
- * @default false
576
- */
577
- asClass?: boolean;
578
- /**
579
- * Generate services?
580
- * @default true
581
- */
582
- export?: boolean;
583
- /**
584
- * Filter endpoints to be included in the generated services.
585
- * The provided string should be a regular expression where matched
586
- * results will be included in the output. The input pattern this
587
- * string will be tested against is `{method} {path}`. For example,
588
- * you can match `POST /api/v1/foo` with `^POST /api/v1/foo$`.
589
- */
590
- filter?: string;
591
- /**
592
- * Include only service classes with names matching regular expression
593
- *
594
- * This option has no effect if `services.asClass` is `false`.
595
- */
596
- include?: string;
597
- /**
598
- * Customise the name of methods within the service. By default, {@link Operation.name} is used.
599
- */
600
- methodNameBuilder?: (operation: Operation) => string;
601
- /**
602
- * Customize the generated service class names. The name variable is
603
- * obtained from your OpenAPI specification tags.
604
- *
605
- * This option has no effect if `services.asClass` is `false`.
606
- * @default '{{name}}Service'
607
- */
608
- name?: string;
609
- /**
610
- * Use operation ID to generate operation names?
611
- * @default true
612
- */
613
- operationId?: boolean;
614
- /**
615
- * Define shape of returned value from service calls
616
- * @default 'body'
617
- * @deprecated
618
- */
619
- response?: 'body' | 'response';
620
- };
621
- /**
622
- * Generate types?
623
- * @default true
624
- */
625
- types?: boolean | string | {
626
- /**
627
- * Output Date type and possibly runtime transform instead of string for format "date-time"
628
- * @default false
629
- */
630
- dates?: boolean | 'types+transform' | 'types';
631
- /**
632
- * Generate enum definitions?
633
- * @default false
634
- */
635
- enums?: 'javascript' | 'typescript' | 'typescript+namespace' | false;
636
- /**
637
- * Generate types?
638
- * @default true
639
- */
640
- export?: boolean;
641
- /**
642
- * Include only types matching regular expression
643
- */
644
- include?: string;
645
- /**
646
- * Use your preferred naming pattern
647
- * @default 'preserve'
648
- */
649
- name?: 'PascalCase' | 'preserve';
650
- /**
651
- * Generate a tree of types containing all operations? It will be named
652
- * $OpenApiTs and is generated by default only when not using services.
653
- */
654
- tree?: boolean;
655
- };
656
- /**
657
- * Use options or arguments functions
658
- * @deprecated
659
- * @default true
660
- */
661
- useOptions?: boolean;
662
- }
663
- interface UserConfig extends ClientConfig {
664
- }
665
-
666
- interface OpenApiV3_0_3 {
667
- /**
668
- * **REQUIRED**. This string MUST be the {@link https://semver.org/spec/v2.0.0.html semantic version number} of the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#versions OpenAPI Specification version} that the OpenAPI document uses. The `openapi` field SHOULD be used by tooling specifications and clients to interpret the OpenAPI document. This is _not_ related to the API {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#infoVersion `info.version`} string.
669
- */
670
- openapi: '3.0.3';
671
- }
672
-
673
- /**
674
- * This is the root object of the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#openapi-document OpenAPI document}.
675
- *
676
- * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.
677
- */
678
- interface OpenApiV3_1 {
679
- /**
680
- * An element to hold various schemas for the document.
681
- */
682
- components?: ComponentsObject;
683
- /**
684
- * Additional external documentation.
685
- */
686
- externalDocs?: ExternalDocumentationObject;
687
- /**
688
- * **REQUIRED**. Provides metadata about the API. The metadata MAY be used by tooling as required.
689
- */
690
- info: InfoObject;
691
- /**
692
- * The default value for the `$schema` keyword within {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#schema-object Schema Objects} contained within this OAS document. This MUST be in the form of a URI.
693
- */
694
- jsonSchemaDialect?: string;
695
- /**
696
- * **REQUIRED**. This string MUST be the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#versions version number} of the OpenAPI Specification that the OpenAPI document uses. The `openapi` field SHOULD be used by tooling to interpret the OpenAPI document. This is _not_ related to the API {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#infoVersion `info.version`} string.
697
- */
698
- openapi: '3.1.0';
699
- /**
700
- * The available paths and operations for the API.
701
- */
702
- paths?: PathsObject;
703
- /**
704
- * A declaration of which security mechanisms can be used across the API. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. Individual operations can override this definition. To make security optional, an empty security requirement (`{}`) can be included in the array.
705
- */
706
- security?: ReadonlyArray<SecurityRequirementObject>;
707
- /**
708
- * An array of Server Objects, which provide connectivity information to a target server. If the `servers` property is not provided, or is an empty array, the default value would be a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#server-object Server Object} with a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#serverUrl url} value of `/`.
709
- */
710
- servers?: ReadonlyArray<ServerObject>;
711
- /**
712
- * A list of tags used by the document with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#operation-object Operation Object} must be declared. The tags that are not declared MAY be organized randomly or based on the tools' logic. Each tag name in the list MUST be unique.
713
- */
714
- tags?: ReadonlyArray<TagObject>;
715
- /**
716
- * The incoming webhooks that MAY be received as part of this API and that the API consumer MAY choose to implement. Closely related to the `callbacks` feature, this section describes requests initiated other than by an API call, for example by an out of band registration. The key name is a unique string to refer to each webhook, while the (optionally referenced) Path Item Object describes a request that may be initiated by the API provider and the expected responses. An {@link https://github.com/OAI/OpenAPI-Specification/blob/main/examples/v3.1/webhook-example.yaml example} is available.
717
- */
718
- webhooks?: Record<string, PathItemObject | ReferenceObject>;
719
- }
720
469
  /**
721
470
  * A map of possible out-of band callbacks related to the parent operation. Each value in the map is a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#path-item-object Path Item Object} that describes a set of requests that may be initiated by the API provider and the expected responses. The key value used to identify the path item object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.
722
471
  *
@@ -799,11 +548,12 @@ interface OpenApiV3_1 {
799
548
  * ```
800
549
  */
801
550
  interface CallbackObject {
802
- /**
803
- * A Path Item Object, or a reference to one, used to define a callback request and expected responses. A {@link https://github.com/OAI/OpenAPI-Specification/blob/main/examples/v3.0/callback-example.yaml complete example} is available.
804
- */
805
- [expression: string]: PathItemObject | ReferenceObject;
551
+ /**
552
+ * A Path Item Object, or a reference to one, used to define a callback request and expected responses. A {@link https://github.com/OAI/OpenAPI-Specification/blob/main/examples/v3.0/callback-example.yaml complete example} is available.
553
+ */
554
+ [expression: string]: PathItemObject | ReferenceObject;
806
555
  }
556
+
807
557
  /**
808
558
  * Holds a set of reusable objects for different aspects of the OAS. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.
809
559
  *
@@ -883,58 +633,59 @@ interface CallbackObject {
883
633
  * type: apiKey
884
634
  * name: api_key
885
635
  * in: header
886
- * petstore_auth:
887
- * type: oauth2
888
- * flows:
889
- * implicit:
890
- * authorizationUrl: https://example.org/api/oauth/dialog
891
- * scopes:
892
- * write:pets: modify pets in your account
893
- * read:pets: read your pets
894
- * ```
895
- */
896
- interface ComponentsObject {
897
- /**
898
- * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#callback-object Callback Objects}.
899
- */
900
- callbacks?: Record<string, CallbackObject | ReferenceObject>;
901
- /**
902
- * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#example-object Example Objects}.
903
- */
904
- examples?: Record<string, ExampleObject | ReferenceObject>;
905
- /**
906
- * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#header-object Header Objects}.
907
- */
908
- headers?: Record<string, HeaderObject | ReferenceObject>;
909
- /**
910
- * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#link-object Link Objects}.
911
- */
912
- links?: Record<string, LinkObject | ReferenceObject>;
913
- /**
914
- * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameter-object Parameter Objects}.
915
- */
916
- parameters?: Record<string, ParameterObject | ReferenceObject>;
917
- /**
918
- * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#path-item-object Path Item Object}.
919
- */
920
- pathItems?: Record<string, PathItemObject | ReferenceObject>;
921
- /**
922
- * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#request-body-object Request Body Objects}.
923
- */
924
- requestBodies?: Record<string, RequestBodyObject | ReferenceObject>;
925
- /**
926
- * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#response-object Response Objects}.
927
- */
928
- responses?: Record<string, ResponseObject | ReferenceObject>;
929
- /**
930
- * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#schema-object Schema Objects}.
931
- */
932
- schemas?: Record<string, SchemaObject>;
933
- /**
934
- * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#security-scheme-object Security Scheme Objects}.
935
- */
936
- securitySchemes?: Record<string, SecuritySchemeObject | ReferenceObject>;
636
+ * petstore_auth:
637
+ * type: oauth2
638
+ * flows:
639
+ * implicit:
640
+ * authorizationUrl: https://example.org/api/oauth/dialog
641
+ * scopes:
642
+ * write:pets: modify pets in your account
643
+ * read:pets: read your pets
644
+ * ```
645
+ */
646
+ interface ComponentsObject {
647
+ /**
648
+ * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#callback-object Callback Objects}.
649
+ */
650
+ callbacks?: Record<string, CallbackObject | ReferenceObject>;
651
+ /**
652
+ * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#example-object Example Objects}.
653
+ */
654
+ examples?: Record<string, ExampleObject | ReferenceObject>;
655
+ /**
656
+ * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#header-object Header Objects}.
657
+ */
658
+ headers?: Record<string, HeaderObject | ReferenceObject>;
659
+ /**
660
+ * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#link-object Link Objects}.
661
+ */
662
+ links?: Record<string, LinkObject | ReferenceObject>;
663
+ /**
664
+ * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameter-object Parameter Objects}.
665
+ */
666
+ parameters?: Record<string, ParameterObject | ReferenceObject>;
667
+ /**
668
+ * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#path-item-object Path Item Object}.
669
+ */
670
+ pathItems?: Record<string, PathItemObject | ReferenceObject>;
671
+ /**
672
+ * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#request-body-object Request Body Objects}.
673
+ */
674
+ requestBodies?: Record<string, RequestBodyObject | ReferenceObject>;
675
+ /**
676
+ * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#response-object Response Objects}.
677
+ */
678
+ responses?: Record<string, ResponseObject | ReferenceObject>;
679
+ /**
680
+ * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#schema-object Schema Objects}.
681
+ */
682
+ schemas?: Record<string, SchemaObject>;
683
+ /**
684
+ * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#security-scheme-object Security Scheme Objects}.
685
+ */
686
+ securitySchemes?: Record<string, SecuritySchemeObject | ReferenceObject>;
937
687
  }
688
+
938
689
  /**
939
690
  * Contact information for the exposed API.
940
691
  *
@@ -948,19 +699,20 @@ interface ComponentsObject {
948
699
  * ```
949
700
  */
950
701
  interface ContactObject {
951
- /**
952
- * The email address of the contact person/organization. This MUST be in the form of an email address.
953
- */
954
- email?: string;
955
- /**
956
- * The identifying name of the contact person/organization.
957
- */
958
- name?: string;
959
- /**
960
- * The URL pointing to the contact information. This MUST be in the form of a URL.
961
- */
962
- url?: string;
702
+ /**
703
+ * The email address of the contact person/organization. This MUST be in the form of an email address.
704
+ */
705
+ email?: string;
706
+ /**
707
+ * The identifying name of the contact person/organization.
708
+ */
709
+ name?: string;
710
+ /**
711
+ * The URL pointing to the contact information. This MUST be in the form of a URL.
712
+ */
713
+ url?: string;
963
714
  }
715
+
964
716
  /**
965
717
  * When request bodies or response payloads may be one of a number of different schemas, a `discriminator` object can be used to aid in serialization, deserialization, and validation. The discriminator is a specific object in a schema which is used to inform the consumer of the document of an alternative schema based on the value associated with it.
966
718
  *
@@ -1088,15 +840,16 @@ interface ContactObject {
1088
840
  * will map to `Dog` because of the definition in the `mapping` element.
1089
841
  */
1090
842
  interface DiscriminatorObject {
1091
- /**
1092
- * An object to hold mappings between payload values and schema names or references.
1093
- */
1094
- mapping?: Record<string, string>;
1095
- /**
1096
- * **REQUIRED**. The name of the property in the payload that will hold the discriminator value.
1097
- */
1098
- propertyName: string;
843
+ /**
844
+ * An object to hold mappings between payload values and schema names or references.
845
+ */
846
+ mapping?: Record<string, string>;
847
+ /**
848
+ * **REQUIRED**. The name of the property in the payload that will hold the discriminator value.
849
+ */
850
+ propertyName: string;
1099
851
  }
852
+
1100
853
  /**
1101
854
  * A single encoding definition applied to a single schema property.
1102
855
  *
@@ -1139,27 +892,28 @@ interface DiscriminatorObject {
1139
892
  * ```
1140
893
  */
1141
894
  interface EncodingObject {
1142
- /**
1143
- * Determines whether the parameter value SHOULD allow reserved characters, as defined by {@link https://tools.ietf.org/html/rfc3986#section-2.2 RFC3986} `:/?#[]@!$&'()*+,;=` to be included without percent-encoding. The default value is `false`. This property SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded` or `multipart/form-data`. If a value is explicitly defined, then the value of {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#encodingContentType `contentType`} (implicit or explicit) SHALL be ignored.
1144
- */
1145
- allowReserved?: boolean;
1146
- /**
1147
- * The Content-Type for encoding a specific property. Default value depends on the property type: for `object` - `application/json`; for `array` – the default is defined based on the inner type; for all other cases the default is `application/octet-stream`. The value can be a specific media type (e.g. `application/json`), a wildcard media type (e.g. `image/*`), or a comma-separated list of the two types.
1148
- */
1149
- contentType?: string;
1150
- /**
1151
- * When this is true, property values of type `array` or `object` generate separate parameters for each value of the array, or key-value-pair of the map. For other types of properties this property has no effect. When {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#encodingStyle `style`} is `form`, the default value is `true`. For all other styles, the default value is `false`. This property SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded` or `multipart/form-data`. If a value is explicitly defined, then the value of {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#encodingContentType `contentType`} (implicit or explicit) SHALL be ignored.
1152
- */
1153
- explode?: boolean;
1154
- /**
1155
- * A map allowing additional information to be provided as headers, for example `Content-Disposition`. `Content-Type` is described separately and SHALL be ignored in this section. This property SHALL be ignored if the request body media type is not a `multipart`.
1156
- */
1157
- headers?: Record<string, HeaderObject | ReferenceObject>;
1158
- /**
1159
- * Describes how a specific property value will be serialized depending on its type. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameter-object Parameter Object} for details on the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterStyle `style`} property. The behavior follows the same values as `query` parameters, including default values. This property SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded` or `multipart/form-data`. If a value is explicitly defined, then the value of {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#encodingContentType `contentType`} (implicit or explicit) SHALL be ignored.
1160
- */
1161
- style?: string;
895
+ /**
896
+ * Determines whether the parameter value SHOULD allow reserved characters, as defined by {@link https://tools.ietf.org/html/rfc3986#section-2.2 RFC3986} `:/?#[]@!$&'()*+,;=` to be included without percent-encoding. The default value is `false`. This property SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded` or `multipart/form-data`. If a value is explicitly defined, then the value of {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#encodingContentType `contentType`} (implicit or explicit) SHALL be ignored.
897
+ */
898
+ allowReserved?: boolean;
899
+ /**
900
+ * The Content-Type for encoding a specific property. Default value depends on the property type: for `object` - `application/json`; for `array` – the default is defined based on the inner type; for all other cases the default is `application/octet-stream`. The value can be a specific media type (e.g. `application/json`), a wildcard media type (e.g. `image/*`), or a comma-separated list of the two types.
901
+ */
902
+ contentType?: string;
903
+ /**
904
+ * When this is true, property values of type `array` or `object` generate separate parameters for each value of the array, or key-value-pair of the map. For other types of properties this property has no effect. When {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#encodingStyle `style`} is `form`, the default value is `true`. For all other styles, the default value is `false`. This property SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded` or `multipart/form-data`. If a value is explicitly defined, then the value of {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#encodingContentType `contentType`} (implicit or explicit) SHALL be ignored.
905
+ */
906
+ explode?: boolean;
907
+ /**
908
+ * A map allowing additional information to be provided as headers, for example `Content-Disposition`. `Content-Type` is described separately and SHALL be ignored in this section. This property SHALL be ignored if the request body media type is not a `multipart`.
909
+ */
910
+ headers?: Record<string, HeaderObject | ReferenceObject>;
911
+ /**
912
+ * Describes how a specific property value will be serialized depending on its type. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameter-object Parameter Object} for details on the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterStyle `style`} property. The behavior follows the same values as `query` parameters, including default values. This property SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded` or `multipart/form-data`. If a value is explicitly defined, then the value of {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#encodingContentType `contentType`} (implicit or explicit) SHALL be ignored.
913
+ */
914
+ style?: string;
1162
915
  }
916
+
1163
917
  /**
1164
918
  * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.
1165
919
  *
@@ -1227,23 +981,24 @@ interface EncodingObject {
1227
981
  * ```
1228
982
  */
1229
983
  interface ExampleObject {
1230
- /**
1231
- * Long description for the example. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
1232
- */
1233
- description?: string;
1234
- /**
1235
- * A URI that points to the literal example. This provides the capability to reference examples that cannot easily be included in JSON or YAML documents. The `value` field and `externalValue` field are mutually exclusive. See the rules for resolving {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#relative-references-in-uris Relative References}.
1236
- */
1237
- externalValue?: string;
1238
- /**
1239
- * Short description for the example.
1240
- */
1241
- summary?: string;
1242
- /**
1243
- * Embedded literal example. The `value` field and `externalValue` field are mutually exclusive. To represent examples of media types that cannot naturally represented in JSON or YAML, use a string value to contain the example, escaping where necessary.
1244
- */
1245
- value?: unknown;
984
+ /**
985
+ * Long description for the example. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
986
+ */
987
+ description?: string;
988
+ /**
989
+ * A URI that points to the literal example. This provides the capability to reference examples that cannot easily be included in JSON or YAML documents. The `value` field and `externalValue` field are mutually exclusive. See the rules for resolving {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#relative-references-in-uris Relative References}.
990
+ */
991
+ externalValue?: string;
992
+ /**
993
+ * Short description for the example.
994
+ */
995
+ summary?: string;
996
+ /**
997
+ * Embedded literal example. The `value` field and `externalValue` field are mutually exclusive. To represent examples of media types that cannot naturally represented in JSON or YAML, use a string value to contain the example, escaping where necessary.
998
+ */
999
+ value?: unknown;
1246
1000
  }
1001
+
1247
1002
  /**
1248
1003
  * Allows referencing an external resource for extended documentation.
1249
1004
  *
@@ -1256,15 +1011,16 @@ interface ExampleObject {
1256
1011
  * ```
1257
1012
  */
1258
1013
  interface ExternalDocumentationObject {
1259
- /**
1260
- * A description of the target documentation. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
1261
- */
1262
- description?: string;
1263
- /**
1264
- * **REQUIRED**. The URL for the target documentation. This MUST be in the form of a URL.
1265
- */
1266
- url: string;
1014
+ /**
1015
+ * A description of the target documentation. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
1016
+ */
1017
+ description?: string;
1018
+ /**
1019
+ * **REQUIRED**. The URL for the target documentation. This MUST be in the form of a URL.
1020
+ */
1021
+ url: string;
1267
1022
  }
1023
+
1268
1024
  /**
1269
1025
  * The Header Object follows the structure of the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameter-object Parameter Object} with the following changes:
1270
1026
  *
@@ -1279,8 +1035,8 @@ interface ExternalDocumentationObject {
1279
1035
  * type: integer
1280
1036
  * ```
1281
1037
  */
1282
- interface HeaderObject extends Omit<ParameterObject, 'in' | 'name'> {
1283
- }
1038
+ interface HeaderObject extends Omit<ParameterObject, 'in' | 'name'> {}
1039
+
1284
1040
  /**
1285
1041
  * The object provides metadata about the API. The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience.
1286
1042
  *
@@ -1303,35 +1059,36 @@ interface HeaderObject extends Omit<ParameterObject, 'in' | 'name'> {
1303
1059
  * ```
1304
1060
  */
1305
1061
  interface InfoObject {
1306
- /**
1307
- * The contact information for the exposed API.
1308
- */
1309
- contact?: ContactObject;
1310
- /**
1311
- * A description of the API. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
1312
- */
1313
- description?: string;
1314
- /**
1315
- * The license information for the exposed API.
1316
- */
1317
- license?: LicenseObject;
1318
- /**
1319
- * A short summary of the API.
1320
- */
1321
- summary?: string;
1322
- /**
1323
- * A URL to the Terms of Service for the API. This MUST be in the form of a URL.
1324
- */
1325
- termsOfService?: string;
1326
- /**
1327
- * **REQUIRED**. The title of the API.
1328
- */
1329
- title: string;
1330
- /**
1331
- * **REQUIRED**. The version of the OpenAPI document (which is distinct from the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#oasVersion OpenAPI Specification version} or the API implementation version).
1332
- */
1333
- version: string;
1062
+ /**
1063
+ * The contact information for the exposed API.
1064
+ */
1065
+ contact?: ContactObject;
1066
+ /**
1067
+ * A description of the API. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
1068
+ */
1069
+ description?: string;
1070
+ /**
1071
+ * The license information for the exposed API.
1072
+ */
1073
+ license?: LicenseObject;
1074
+ /**
1075
+ * A short summary of the API.
1076
+ */
1077
+ summary?: string;
1078
+ /**
1079
+ * A URL to the Terms of Service for the API. This MUST be in the form of a URL.
1080
+ */
1081
+ termsOfService?: string;
1082
+ /**
1083
+ * **REQUIRED**. The title of the API.
1084
+ */
1085
+ title: string;
1086
+ /**
1087
+ * **REQUIRED**. The version of the OpenAPI document (which is distinct from the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#oasVersion OpenAPI Specification version} or the API implementation version).
1088
+ */
1089
+ version: string;
1334
1090
  }
1091
+
1335
1092
  /**
1336
1093
  * License information for the exposed API.
1337
1094
  *
@@ -1344,19 +1101,20 @@ interface InfoObject {
1344
1101
  * ```
1345
1102
  */
1346
1103
  interface LicenseObject {
1347
- /**
1348
- * An {@link https://spdx.org/licenses/ SPDX} license expression for the API. The `identifier` field is mutually exclusive of the `url` field.
1349
- */
1350
- identifier?: string;
1351
- /**
1352
- * **REQUIRED**. The license name used for the API.
1353
- */
1354
- name: string;
1355
- /**
1356
- * A URL to the license used for the API. This MUST be in the form of a URL. The `url` field is mutually exclusive of the `identifier` field.
1357
- */
1358
- url?: string;
1104
+ /**
1105
+ * An {@link https://spdx.org/licenses/ SPDX} license expression for the API. The `identifier` field is mutually exclusive of the `url` field.
1106
+ */
1107
+ identifier?: string;
1108
+ /**
1109
+ * **REQUIRED**. The license name used for the API.
1110
+ */
1111
+ name: string;
1112
+ /**
1113
+ * A URL to the license used for the API. This MUST be in the form of a URL. The `url` field is mutually exclusive of the `identifier` field.
1114
+ */
1115
+ url?: string;
1359
1116
  }
1117
+
1360
1118
  /**
1361
1119
  * The `Link object` represents a possible design-time link for a response. The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations.
1362
1120
  *
@@ -1505,31 +1263,32 @@ interface LicenseObject {
1505
1263
  * Runtime expressions preserve the type of the referenced value. Expressions can be embedded into string values by surrounding the expression with `{}` curly braces.
1506
1264
  */
1507
1265
  interface LinkObject {
1508
- /**
1509
- * A description of the link. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
1510
- */
1511
- description?: string;
1512
- /**
1513
- * The name of an _existing_, resolvable OAS operation, as defined with a unique `operationId`. This field is mutually exclusive of the `operationRef` field.
1514
- */
1515
- operationId?: string;
1516
- /**
1517
- * A relative or absolute URI reference to an OAS operation. This field is mutually exclusive of the `operationId` field, and MUST point to an {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#operation-object Operation Object}. Relative `operationRef` values MAY be used to locate an existing {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#operation-object Operation Object} in the OpenAPI definition. See the rules for resolving {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#relative-references-in-uris Relative References}.
1518
- */
1519
- operationRef?: string;
1520
- /**
1521
- * A map representing parameters to pass to an operation as specified with `operationId` or identified via `operationRef`. The key is the parameter name to be used, whereas the value can be a constant or an expression to be evaluated and passed to the linked operation. The parameter name can be qualified using the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn parameter location} `[{in}.]{name}` for operations that use the same parameter name in different locations (e.g. path.id).
1522
- */
1523
- parameters?: Record<string, unknown | string>;
1524
- /**
1525
- * A literal value or {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#runtime-expressions {expression}} to use as a request body when calling the target operation.
1526
- */
1527
- requestBody?: unknown | string;
1528
- /**
1529
- * A server object to be used by the target operation.
1530
- */
1531
- server?: ServerObject;
1266
+ /**
1267
+ * A description of the link. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
1268
+ */
1269
+ description?: string;
1270
+ /**
1271
+ * The name of an _existing_, resolvable OAS operation, as defined with a unique `operationId`. This field is mutually exclusive of the `operationRef` field.
1272
+ */
1273
+ operationId?: string;
1274
+ /**
1275
+ * A relative or absolute URI reference to an OAS operation. This field is mutually exclusive of the `operationId` field, and MUST point to an {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#operation-object Operation Object}. Relative `operationRef` values MAY be used to locate an existing {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#operation-object Operation Object} in the OpenAPI definition. See the rules for resolving {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#relative-references-in-uris Relative References}.
1276
+ */
1277
+ operationRef?: string;
1278
+ /**
1279
+ * A map representing parameters to pass to an operation as specified with `operationId` or identified via `operationRef`. The key is the parameter name to be used, whereas the value can be a constant or an expression to be evaluated and passed to the linked operation. The parameter name can be qualified using the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn parameter location} `[{in}.]{name}` for operations that use the same parameter name in different locations (e.g. path.id).
1280
+ */
1281
+ parameters?: Record<string, unknown | string>;
1282
+ /**
1283
+ * A literal value or {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#runtime-expressions {expression}} to use as a request body when calling the target operation.
1284
+ */
1285
+ requestBody?: unknown | string;
1286
+ /**
1287
+ * A server object to be used by the target operation.
1288
+ */
1289
+ server?: ServerObject;
1532
1290
  }
1291
+
1533
1292
  /**
1534
1293
  * Each Media Type Object provides schema and examples for the media type identified by its key.
1535
1294
  *
@@ -1563,24 +1322,25 @@ interface LinkObject {
1563
1322
  * $ref: "#/components/examples/frog-example"
1564
1323
  * ```
1565
1324
  */
1566
- interface MediaTypeObject {
1567
- /**
1568
- * A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. The encoding object SHALL only apply to `requestBody` objects when the media type is `multipart` or `application/x-www-form-urlencoded`.
1569
- */
1570
- encoding?: Record<string, EncodingObject>;
1571
- /**
1572
- * Example of the media type. The example object SHOULD be in the correct format as specified by the media type. The `example` field is mutually exclusive of the `examples` field. Furthermore, if referencing a `schema` which contains an example, the `example` value SHALL _override_ the example provided by the schema.
1573
- */
1574
- example?: unknown;
1575
- /**
1576
- * Examples of the media type. Each example object SHOULD match the media type and specified schema if present. The `examples` field is mutually exclusive of the `example` field. Furthermore, if referencing a `schema` which contains an example, the `examples` value SHALL _override_ the example provided by the schema.
1577
- */
1578
- examples?: Record<string, ExampleObject | ReferenceObject>;
1579
- /**
1580
- * The schema defining the content of the request, response, or parameter.
1581
- */
1582
- schema?: SchemaObject;
1325
+ interface MediaTypeObject$1 {
1326
+ /**
1327
+ * A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. The encoding object SHALL only apply to `requestBody` objects when the media type is `multipart` or `application/x-www-form-urlencoded`.
1328
+ */
1329
+ encoding?: Record<string, EncodingObject>;
1330
+ /**
1331
+ * Example of the media type. The example object SHOULD be in the correct format as specified by the media type. The `example` field is mutually exclusive of the `examples` field. Furthermore, if referencing a `schema` which contains an example, the `example` value SHALL _override_ the example provided by the schema.
1332
+ */
1333
+ example?: unknown;
1334
+ /**
1335
+ * Examples of the media type. Each example object SHOULD match the media type and specified schema if present. The `examples` field is mutually exclusive of the `example` field. Furthermore, if referencing a `schema` which contains an example, the `examples` value SHALL _override_ the example provided by the schema.
1336
+ */
1337
+ examples?: Record<string, ExampleObject | ReferenceObject>;
1338
+ /**
1339
+ * The schema defining the content of the request, response, or parameter.
1340
+ */
1341
+ schema?: SchemaObject;
1583
1342
  }
1343
+
1584
1344
  /**
1585
1345
  * Configuration details for a supported OAuth Flow
1586
1346
  *
@@ -1605,46 +1365,48 @@ interface MediaTypeObject {
1605
1365
  * ```
1606
1366
  */
1607
1367
  interface OAuthFlowObject {
1608
- /**
1609
- * **REQUIRED**. The authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS.
1610
- */
1611
- authorizationUrl: string;
1612
- /**
1613
- * The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS.
1614
- */
1615
- refreshUrl?: string;
1616
- /**
1617
- * **REQUIRED**. The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it. The map MAY be empty.
1618
- */
1619
- scopes: Record<string, string>;
1620
- /**
1621
- * **REQUIRED**. The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS.
1622
- */
1623
- tokenUrl: string;
1368
+ /**
1369
+ * **REQUIRED**. The authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS.
1370
+ */
1371
+ authorizationUrl: string;
1372
+ /**
1373
+ * The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS.
1374
+ */
1375
+ refreshUrl?: string;
1376
+ /**
1377
+ * **REQUIRED**. The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it. The map MAY be empty.
1378
+ */
1379
+ scopes: Record<string, string>;
1380
+ /**
1381
+ * **REQUIRED**. The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS.
1382
+ */
1383
+ tokenUrl: string;
1624
1384
  }
1385
+
1625
1386
  /**
1626
1387
  * Allows configuration of the supported OAuth Flows.
1627
1388
  *
1628
1389
  * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.
1629
1390
  */
1630
1391
  interface OAuthFlowsObject {
1631
- /**
1632
- * Configuration for the OAuth Authorization Code flow. Previously called `accessCode` in OpenAPI 2.0.
1633
- */
1634
- authorizationCode?: OAuthFlowObject;
1635
- /**
1636
- * Configuration for the OAuth Client Credentials flow. Previously called `application` in OpenAPI 2.0.
1637
- */
1638
- clientCredentials?: OAuthFlowObject;
1639
- /**
1640
- * Configuration for the OAuth Implicit flow
1641
- */
1642
- implicit?: OAuthFlowObject;
1643
- /**
1644
- * Configuration for the OAuth Resource Owner Password flow
1645
- */
1646
- password?: OAuthFlowObject;
1392
+ /**
1393
+ * Configuration for the OAuth Authorization Code flow. Previously called `accessCode` in OpenAPI 2.0.
1394
+ */
1395
+ authorizationCode?: OAuthFlowObject;
1396
+ /**
1397
+ * Configuration for the OAuth Client Credentials flow. Previously called `application` in OpenAPI 2.0.
1398
+ */
1399
+ clientCredentials?: OAuthFlowObject;
1400
+ /**
1401
+ * Configuration for the OAuth Implicit flow
1402
+ */
1403
+ implicit?: OAuthFlowObject;
1404
+ /**
1405
+ * Configuration for the OAuth Resource Owner Password flow
1406
+ */
1407
+ password?: OAuthFlowObject;
1647
1408
  }
1409
+
1648
1410
  /**
1649
1411
  * Describes a single API operation on a path.
1650
1412
  *
@@ -1695,55 +1457,56 @@ interface OAuthFlowsObject {
1695
1457
  * ```
1696
1458
  */
1697
1459
  interface OperationObject {
1698
- /**
1699
- * A map of possible out-of band callbacks related to the parent operation. The key is a unique identifier for the Callback Object. Each value in the map is a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#callback-object Callback Object} that describes a request that may be initiated by the API provider and the expected responses.
1700
- */
1701
- callbacks?: Record<string, CallbackObject | ReferenceObject>;
1702
- /**
1703
- * Declares this operation to be deprecated. Consumers SHOULD refrain from usage of the declared operation. Default value is `false`.
1704
- */
1705
- deprecated?: boolean;
1706
- /**
1707
- * A verbose explanation of the operation behavior. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
1708
- */
1709
- description?: string;
1710
- /**
1711
- * Additional external documentation for this operation.
1712
- */
1713
- externalDocs?: ExternalDocumentationObject;
1714
- /**
1715
- * Unique string used to identify the operation. The id MUST be unique among all operations described in the API. The operationId value is **case-sensitive**. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is RECOMMENDED to follow common programming naming conventions.
1716
- */
1717
- operationId?: string;
1718
- /**
1719
- * A list of parameters that are applicable for this operation. If a parameter is already defined at the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#pathItemParameters Path Item}, the new definition will override it but can never remove it. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterName name} and {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn location}. The list can use the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#reference-object Reference Object} to link to parameters that are defined at the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#componentsParameters OpenAPI Object's components/parameters}.
1720
- */
1721
- parameters?: ReadonlyArray<ParameterObject | ReferenceObject>;
1722
- /**
1723
- * The request body applicable for this operation. The `requestBody` is fully supported in HTTP methods where the HTTP 1.1 specification {@link https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.1 RFC7231} has explicitly defined semantics for request bodies. In other cases where the HTTP spec is vague (such as {@link https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.1 GET}, {@link https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.2 HEAD} and {@link https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.5 DELETE}), `requestBody` is permitted but does not have well-defined semantics and SHOULD be avoided if possible.
1724
- */
1725
- requestBody?: RequestBodyObject | ReferenceObject;
1726
- /**
1727
- * The list of possible responses as they are returned from executing this operation.
1728
- */
1729
- responses?: ResponsesObject;
1730
- /**
1731
- * A declaration of which security mechanisms can be used for this operation. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. To make security optional, an empty security requirement (`{}`) can be included in the array. This definition overrides any declared top-level {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#oasSecurity `security`}. To remove a top-level security declaration, an empty array can be used.
1732
- */
1733
- security?: ReadonlyArray<SecurityRequirementObject>;
1734
- /**
1735
- * An alternative `server` array to service this operation. If an alternative `server` object is specified at the Path Item Object or Root level, it will be overridden by this value.
1736
- */
1737
- servers?: ReadonlyArray<ServerObject>;
1738
- /**
1739
- * A short summary of what the operation does.
1740
- */
1741
- summary?: string;
1742
- /**
1743
- * A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier.
1744
- */
1745
- tags?: ReadonlyArray<string>;
1460
+ /**
1461
+ * A map of possible out-of band callbacks related to the parent operation. The key is a unique identifier for the Callback Object. Each value in the map is a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#callback-object Callback Object} that describes a request that may be initiated by the API provider and the expected responses.
1462
+ */
1463
+ callbacks?: Record<string, CallbackObject | ReferenceObject>;
1464
+ /**
1465
+ * Declares this operation to be deprecated. Consumers SHOULD refrain from usage of the declared operation. Default value is `false`.
1466
+ */
1467
+ deprecated?: boolean;
1468
+ /**
1469
+ * A verbose explanation of the operation behavior. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
1470
+ */
1471
+ description?: string;
1472
+ /**
1473
+ * Additional external documentation for this operation.
1474
+ */
1475
+ externalDocs?: ExternalDocumentationObject;
1476
+ /**
1477
+ * Unique string used to identify the operation. The id MUST be unique among all operations described in the API. The operationId value is **case-sensitive**. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is RECOMMENDED to follow common programming naming conventions.
1478
+ */
1479
+ operationId?: string;
1480
+ /**
1481
+ * A list of parameters that are applicable for this operation. If a parameter is already defined at the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#pathItemParameters Path Item}, the new definition will override it but can never remove it. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterName name} and {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn location}. The list can use the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#reference-object Reference Object} to link to parameters that are defined at the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#componentsParameters OpenAPI Object's components/parameters}.
1482
+ */
1483
+ parameters?: ReadonlyArray<ParameterObject | ReferenceObject>;
1484
+ /**
1485
+ * The request body applicable for this operation. The `requestBody` is fully supported in HTTP methods where the HTTP 1.1 specification {@link https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.1 RFC7231} has explicitly defined semantics for request bodies. In other cases where the HTTP spec is vague (such as {@link https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.1 GET}, {@link https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.2 HEAD} and {@link https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.5 DELETE}), `requestBody` is permitted but does not have well-defined semantics and SHOULD be avoided if possible.
1486
+ */
1487
+ requestBody?: RequestBodyObject | ReferenceObject;
1488
+ /**
1489
+ * The list of possible responses as they are returned from executing this operation.
1490
+ */
1491
+ responses?: ResponsesObject;
1492
+ /**
1493
+ * A declaration of which security mechanisms can be used for this operation. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. To make security optional, an empty security requirement (`{}`) can be included in the array. This definition overrides any declared top-level {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#oasSecurity `security`}. To remove a top-level security declaration, an empty array can be used.
1494
+ */
1495
+ security?: ReadonlyArray<SecurityRequirementObject>;
1496
+ /**
1497
+ * An alternative `server` array to service this operation. If an alternative `server` object is specified at the Path Item Object or Root level, it will be overridden by this value.
1498
+ */
1499
+ servers?: ReadonlyArray<ServerObject>;
1500
+ /**
1501
+ * A short summary of what the operation does.
1502
+ */
1503
+ summary?: string;
1504
+ /**
1505
+ * A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier.
1506
+ */
1507
+ tags?: ReadonlyArray<string>;
1746
1508
  }
1509
+
1747
1510
  /**
1748
1511
  * Describes a single operation parameter.
1749
1512
  *
@@ -1842,62 +1605,70 @@ interface OperationObject {
1842
1605
  * ```
1843
1606
  */
1844
1607
  interface ParameterObject {
1845
- /**
1846
- * Sets the ability to pass empty-valued parameters. This is valid only for `query` parameters and allows sending a parameter with an empty value. Default value is `false`. If {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterStyle `style`} is used, and if behavior is `n/a` (cannot be serialized), the value of `allowEmptyValue` SHALL be ignored. Use of this property is NOT RECOMMENDED, as it is likely to be removed in a later revision.
1847
- */
1848
- allowEmptyValue?: boolean;
1849
- /**
1850
- * Determines whether the parameter value SHOULD allow reserved characters, as defined by {@link https://datatracker.ietf.org/doc/html/rfc3986#section-2.2 RFC3986} `:/?#[]@!$&'()*+,;=` to be included without percent-encoding. This property only applies to parameters with an `in` value of `query`. The default value is `false`.
1851
- */
1852
- allowReserved?: boolean;
1853
- /**
1854
- * A map containing the representations for the parameter. The key is the media type and the value describes it. The map MUST only contain one entry.
1855
- */
1856
- content?: Record<string, MediaTypeObject>;
1857
- /**
1858
- * Specifies that a parameter is deprecated and SHOULD be transitioned out of usage. Default value is `false`.
1859
- */
1860
- deprecated?: boolean;
1861
- /**
1862
- * A brief description of the parameter. This could contain examples of use. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
1863
- */
1864
- description?: string;
1865
- /**
1866
- * Example of the parameter's potential value. The example SHOULD match the specified schema and encoding properties if present. The `example` field is mutually exclusive of the `examples` field. Furthermore, if referencing a `schema` that contains an example, the `example` value SHALL _override_ the example provided by the schema. To represent examples of media types that cannot naturally be represented in JSON or YAML, a string value can contain the example with escaping where necessary.
1867
- */
1868
- example?: unknown;
1869
- /**
1870
- * Examples of the parameter's potential value. Each example SHOULD contain a value in the correct format as specified in the parameter encoding. The `examples` field is mutually exclusive of the `example` field. Furthermore, if referencing a `schema` that contains an example, the `examples` value SHALL _override_ the example provided by the schema.
1871
- */
1872
- examples?: Record<string, ExampleObject | ReferenceObject>;
1873
- /**
1874
- * When this is true, parameter values of type `array` or `object` generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters this property has no effect. When {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterStyle `style`} is `form`, the default value is `true`. For all other styles, the default value is `false`.
1875
- */
1876
- explode?: boolean;
1877
- /**
1878
- * **REQUIRED**. The location of the parameter. Possible values are `"query"`, `"header"`, `"path"` or `"cookie"`.
1879
- */
1880
- in: 'cookie' | 'header' | 'path' | 'query';
1881
- /**
1882
- * **REQUIRED**. The name of the parameter. Parameter names are _case sensitive_.
1883
- * - If {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn `in`} is `"path"`, the `name` field MUST correspond to a template expression occurring within the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#pathsPath path} field in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#paths-object Paths Object}. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#path-templating Path Templating} for further information.
1884
- * - If {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn `in`} is `"header"` and the `name` field is `"Accept"`, `"Content-Type"` or `"Authorization"`, the parameter definition SHALL be ignored.
1885
- * - For all other cases, the `name` corresponds to the parameter name used by the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn `in`} property.
1886
- */
1887
- name: string;
1888
- /**
1889
- * Determines whether this parameter is mandatory. If the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn parameter location} is `"path"`, this property is **REQUIRED** and its value MUST be `true`. Otherwise, the property MAY be included and its default value is `false`.
1890
- */
1891
- required?: boolean;
1892
- /**
1893
- * The schema defining the type used for the parameter.
1894
- */
1895
- schema?: SchemaObject;
1896
- /**
1897
- * Describes how the parameter value will be serialized depending on the type of the parameter value. Default values (based on value of `in`): for `query` - `form`; for `path` - `simple`; for `header` - `simple`; for `cookie` - `form`.
1898
- */
1899
- style?: 'deepObject' | 'form' | 'label' | 'matrix' | 'pipeDelimited' | 'simple' | 'spaceDelimited';
1608
+ /**
1609
+ * Sets the ability to pass empty-valued parameters. This is valid only for `query` parameters and allows sending a parameter with an empty value. Default value is `false`. If {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterStyle `style`} is used, and if behavior is `n/a` (cannot be serialized), the value of `allowEmptyValue` SHALL be ignored. Use of this property is NOT RECOMMENDED, as it is likely to be removed in a later revision.
1610
+ */
1611
+ allowEmptyValue?: boolean;
1612
+ /**
1613
+ * Determines whether the parameter value SHOULD allow reserved characters, as defined by {@link https://datatracker.ietf.org/doc/html/rfc3986#section-2.2 RFC3986} `:/?#[]@!$&'()*+,;=` to be included without percent-encoding. This property only applies to parameters with an `in` value of `query`. The default value is `false`.
1614
+ */
1615
+ allowReserved?: boolean;
1616
+ /**
1617
+ * A map containing the representations for the parameter. The key is the media type and the value describes it. The map MUST only contain one entry.
1618
+ */
1619
+ content?: Record<string, MediaTypeObject$1>;
1620
+ /**
1621
+ * Specifies that a parameter is deprecated and SHOULD be transitioned out of usage. Default value is `false`.
1622
+ */
1623
+ deprecated?: boolean;
1624
+ /**
1625
+ * A brief description of the parameter. This could contain examples of use. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
1626
+ */
1627
+ description?: string;
1628
+ /**
1629
+ * Example of the parameter's potential value. The example SHOULD match the specified schema and encoding properties if present. The `example` field is mutually exclusive of the `examples` field. Furthermore, if referencing a `schema` that contains an example, the `example` value SHALL _override_ the example provided by the schema. To represent examples of media types that cannot naturally be represented in JSON or YAML, a string value can contain the example with escaping where necessary.
1630
+ */
1631
+ example?: unknown;
1632
+ /**
1633
+ * Examples of the parameter's potential value. Each example SHOULD contain a value in the correct format as specified in the parameter encoding. The `examples` field is mutually exclusive of the `example` field. Furthermore, if referencing a `schema` that contains an example, the `examples` value SHALL _override_ the example provided by the schema.
1634
+ */
1635
+ examples?: Record<string, ExampleObject | ReferenceObject>;
1636
+ /**
1637
+ * When this is true, parameter values of type `array` or `object` generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters this property has no effect. When {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterStyle `style`} is `form`, the default value is `true`. For all other styles, the default value is `false`.
1638
+ */
1639
+ explode?: boolean;
1640
+ /**
1641
+ * **REQUIRED**. The location of the parameter. Possible values are `"query"`, `"header"`, `"path"` or `"cookie"`.
1642
+ */
1643
+ in: 'cookie' | 'header' | 'path' | 'query';
1644
+ /**
1645
+ * **REQUIRED**. The name of the parameter. Parameter names are _case sensitive_.
1646
+ * - If {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn `in`} is `"path"`, the `name` field MUST correspond to a template expression occurring within the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#pathsPath path} field in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#paths-object Paths Object}. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#path-templating Path Templating} for further information.
1647
+ * - If {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn `in`} is `"header"` and the `name` field is `"Accept"`, `"Content-Type"` or `"Authorization"`, the parameter definition SHALL be ignored.
1648
+ * - For all other cases, the `name` corresponds to the parameter name used by the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn `in`} property.
1649
+ */
1650
+ name: string;
1651
+ /**
1652
+ * Determines whether this parameter is mandatory. If the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn parameter location} is `"path"`, this property is **REQUIRED** and its value MUST be `true`. Otherwise, the property MAY be included and its default value is `false`.
1653
+ */
1654
+ required?: boolean;
1655
+ /**
1656
+ * The schema defining the type used for the parameter.
1657
+ */
1658
+ schema?: SchemaObject;
1659
+ /**
1660
+ * Describes how the parameter value will be serialized depending on the type of the parameter value. Default values (based on value of `in`): for `query` - `form`; for `path` - `simple`; for `header` - `simple`; for `cookie` - `form`.
1661
+ */
1662
+ style?:
1663
+ | 'deepObject'
1664
+ | 'form'
1665
+ | 'label'
1666
+ | 'matrix'
1667
+ | 'pipeDelimited'
1668
+ | 'simple'
1669
+ | 'spaceDelimited';
1900
1670
  }
1671
+
1901
1672
  /**
1902
1673
  * Describes the operations available on a single path. A Path Item MAY be empty, due to {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#security-filtering ACL constraints}. The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available.
1903
1674
  *
@@ -1937,59 +1708,60 @@ interface ParameterObject {
1937
1708
  * ```
1938
1709
  */
1939
1710
  interface PathItemObject {
1940
- /**
1941
- * Allows for a referenced definition of this path item. The referenced structure MUST be in the form of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#path-item-object Path Item Object}. In case a Path Item Object field appears both in the defined object and the referenced object, the behavior is undefined. See the rules for resolving {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#relative-references-in-uris Relative References}.
1942
- */
1943
- $ref?: string;
1944
- /**
1945
- * A definition of a DELETE operation on this path.
1946
- */
1947
- delete?: OperationObject;
1948
- /**
1949
- * An optional, string description, intended to apply to all operations in this path. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
1950
- */
1951
- description?: string;
1952
- /**
1953
- * A definition of a GET operation on this path.
1954
- */
1955
- get?: OperationObject;
1956
- /**
1957
- * A definition of a HEAD operation on this path.
1958
- */
1959
- head?: OperationObject;
1960
- /**
1961
- * A definition of a OPTIONS operation on this path.
1962
- */
1963
- options?: OperationObject;
1964
- /**
1965
- * A list of parameters that are applicable for all the operations described under this path. These parameters can be overridden at the operation level, but cannot be removed there. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterName name} and {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn location}. The list can use the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#reference-object Reference Object} to link to parameters that are defined at the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#componentsParameters OpenAPI Object's components/parameters}.
1966
- */
1967
- parameters?: ReadonlyArray<ParameterObject | ReferenceObject>;
1968
- /**
1969
- * A definition of a PATCH operation on this path.
1970
- */
1971
- patch?: OperationObject;
1972
- /**
1973
- * A definition of a POST operation on this path.
1974
- */
1975
- post?: OperationObject;
1976
- /**
1977
- * A definition of a PUT operation on this path.
1978
- */
1979
- put?: OperationObject;
1980
- /**
1981
- * An alternative `server` array to service all operations in this path.
1982
- */
1983
- servers?: ReadonlyArray<ServerObject>;
1984
- /**
1985
- * An optional, string summary, intended to apply to all operations in this path.
1986
- */
1987
- summary?: string;
1988
- /**
1989
- * A definition of a TRACE operation on this path.
1990
- */
1991
- trace?: OperationObject;
1711
+ /**
1712
+ * Allows for a referenced definition of this path item. The referenced structure MUST be in the form of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#path-item-object Path Item Object}. In case a Path Item Object field appears both in the defined object and the referenced object, the behavior is undefined. See the rules for resolving {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#relative-references-in-uris Relative References}.
1713
+ */
1714
+ $ref?: string;
1715
+ /**
1716
+ * A definition of a DELETE operation on this path.
1717
+ */
1718
+ delete?: OperationObject;
1719
+ /**
1720
+ * An optional, string description, intended to apply to all operations in this path. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
1721
+ */
1722
+ description?: string;
1723
+ /**
1724
+ * A definition of a GET operation on this path.
1725
+ */
1726
+ get?: OperationObject;
1727
+ /**
1728
+ * A definition of a HEAD operation on this path.
1729
+ */
1730
+ head?: OperationObject;
1731
+ /**
1732
+ * A definition of a OPTIONS operation on this path.
1733
+ */
1734
+ options?: OperationObject;
1735
+ /**
1736
+ * A list of parameters that are applicable for all the operations described under this path. These parameters can be overridden at the operation level, but cannot be removed there. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterName name} and {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn location}. The list can use the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#reference-object Reference Object} to link to parameters that are defined at the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#componentsParameters OpenAPI Object's components/parameters}.
1737
+ */
1738
+ parameters?: ReadonlyArray<ParameterObject | ReferenceObject>;
1739
+ /**
1740
+ * A definition of a PATCH operation on this path.
1741
+ */
1742
+ patch?: OperationObject;
1743
+ /**
1744
+ * A definition of a POST operation on this path.
1745
+ */
1746
+ post?: OperationObject;
1747
+ /**
1748
+ * A definition of a PUT operation on this path.
1749
+ */
1750
+ put?: OperationObject;
1751
+ /**
1752
+ * An alternative `server` array to service all operations in this path.
1753
+ */
1754
+ servers?: ReadonlyArray<ServerObject>;
1755
+ /**
1756
+ * An optional, string summary, intended to apply to all operations in this path.
1757
+ */
1758
+ summary?: string;
1759
+ /**
1760
+ * A definition of a TRACE operation on this path.
1761
+ */
1762
+ trace?: OperationObject;
1992
1763
  }
1764
+
1993
1765
  /**
1994
1766
  * Holds the relative paths to the individual endpoints and their operations. The path is appended to the URL from the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#server-object `Server Object`} in order to construct the full URL. The Paths MAY be empty, due to {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#security-filtering Access Control List (ACL) constraints}.
1995
1767
  *
@@ -2036,11 +1808,12 @@ interface PathItemObject {
2036
1808
  * ```
2037
1809
  */
2038
1810
  interface PathsObject {
2039
- /**
2040
- * A relative path to an individual endpoint. The field name MUST begin with a forward slash (`/`). The path is **appended** (no relative URL resolution) to the expanded URL from the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#server-object `Server Object`}'s `url` field in order to construct the full URL. {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#path-templating Path templating} is allowed. When matching URLs, concrete (non-templated) paths would be matched before their templated counterparts. Templated paths with the same hierarchy but different templated names MUST NOT exist as they are identical. In case of ambiguous matching, it's up to the tooling to decide which one to use.
2041
- */
2042
- [path: `/${string}`]: PathItemObject;
1811
+ /**
1812
+ * A relative path to an individual endpoint. The field name MUST begin with a forward slash (`/`). The path is **appended** (no relative URL resolution) to the expanded URL from the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#server-object `Server Object`}'s `url` field in order to construct the full URL. {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#path-templating Path templating} is allowed. When matching URLs, concrete (non-templated) paths would be matched before their templated counterparts. Templated paths with the same hierarchy but different templated names MUST NOT exist as they are identical. In case of ambiguous matching, it's up to the tooling to decide which one to use.
1813
+ */
1814
+ [path: `/${string}`]: PathItemObject;
2043
1815
  }
1816
+
2044
1817
  /**
2045
1818
  * A simple object to allow referencing other components in the OpenAPI document, internally and externally.
2046
1819
  *
@@ -2074,19 +1847,20 @@ interface PathsObject {
2074
1847
  * ```
2075
1848
  */
2076
1849
  interface ReferenceObject {
2077
- /**
2078
- * **REQUIRED**. The reference identifier. This MUST be in the form of a URI.
2079
- */
2080
- $ref: string;
2081
- /**
2082
- * A description which by default SHOULD override that of the referenced component. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation. If the referenced object-type does not allow a `description` field, then this field has no effect.
2083
- */
2084
- description?: string;
2085
- /**
2086
- * A short summary which by default SHOULD override that of the referenced component. If the referenced object-type does not allow a `summary` field, then this field has no effect.
2087
- */
2088
- summary?: string;
1850
+ /**
1851
+ * **REQUIRED**. The reference identifier. This MUST be in the form of a URI.
1852
+ */
1853
+ $ref: string;
1854
+ /**
1855
+ * A description which by default SHOULD override that of the referenced component. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation. If the referenced object-type does not allow a `description` field, then this field has no effect.
1856
+ */
1857
+ description?: string;
1858
+ /**
1859
+ * A short summary which by default SHOULD override that of the referenced component. If the referenced object-type does not allow a `summary` field, then this field has no effect.
1860
+ */
1861
+ summary?: string;
2089
1862
  }
1863
+
2090
1864
  /**
2091
1865
  * Describes a single request body.
2092
1866
  *
@@ -2139,19 +1913,20 @@ interface ReferenceObject {
2139
1913
  * ```
2140
1914
  */
2141
1915
  interface RequestBodyObject {
2142
- /**
2143
- * **REQUIRED**. The content of the request body. The key is a media type or {@link https://tools.ietf.org/html/rfc7231#appendix-D media type range} and the value describes it. For requests that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/*
2144
- */
2145
- content: Record<string, MediaTypeObject>;
2146
- /**
2147
- * A brief description of the request body. This could contain examples of use. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
2148
- */
2149
- description?: string;
2150
- /**
2151
- * Determines if the request body is required in the request. Defaults to `false`.
2152
- */
2153
- required?: boolean;
1916
+ /**
1917
+ * **REQUIRED**. The content of the request body. The key is a media type or {@link https://tools.ietf.org/html/rfc7231#appendix-D media type range} and the value describes it. For requests that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/*
1918
+ */
1919
+ content: Record<string, MediaTypeObject$1>;
1920
+ /**
1921
+ * A brief description of the request body. This could contain examples of use. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
1922
+ */
1923
+ description?: string;
1924
+ /**
1925
+ * Determines if the request body is required in the request. Defaults to `false`.
1926
+ */
1927
+ required?: boolean;
2154
1928
  }
1929
+
2155
1930
  /**
2156
1931
  * Describes a single response from an API Operation, including design-time, static `links` to operations based on the response.
2157
1932
  *
@@ -2213,24 +1988,25 @@ interface RequestBodyObject {
2213
1988
  * description: object created
2214
1989
  * ```
2215
1990
  */
2216
- interface ResponseObject {
2217
- /**
2218
- * A map containing descriptions of potential response payloads. The key is a media type or {@link https://datatracker.ietf.org/doc/html/rfc7231#appendix-D media type range} and the value describes it. For responses that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/*
2219
- */
2220
- content?: Record<string, MediaTypeObject>;
2221
- /**
2222
- * **REQUIRED**. A description of the response. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
2223
- */
2224
- description: string;
2225
- /**
2226
- * Maps a header name to its definition. {@link https://datatracker.ietf.org/doc/html/rfc7230#page-22 RFC7230} states header names are case insensitive. If a response header is defined with the name `"Content-Type"`, it SHALL be ignored.
2227
- */
2228
- headers?: Record<string, HeaderObject | ReferenceObject>;
2229
- /**
2230
- * A map of operations links that can be followed from the response. The key of the map is a short name for the link, following the naming constraints of the names for {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#components-object Component Objects}.
2231
- */
2232
- links?: Record<string, LinkObject | ReferenceObject>;
1991
+ interface ResponseObject {
1992
+ /**
1993
+ * A map containing descriptions of potential response payloads. The key is a media type or {@link https://datatracker.ietf.org/doc/html/rfc7231#appendix-D media type range} and the value describes it. For responses that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/*
1994
+ */
1995
+ content?: Record<string, MediaTypeObject$1>;
1996
+ /**
1997
+ * **REQUIRED**. A description of the response. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
1998
+ */
1999
+ description: string;
2000
+ /**
2001
+ * Maps a header name to its definition. {@link https://datatracker.ietf.org/doc/html/rfc7230#page-22 RFC7230} states header names are case insensitive. If a response header is defined with the name `"Content-Type"`, it SHALL be ignored.
2002
+ */
2003
+ headers?: Record<string, HeaderObject | ReferenceObject>;
2004
+ /**
2005
+ * A map of operations links that can be followed from the response. The key of the map is a short name for the link, following the naming constraints of the names for {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#components-object Component Objects}.
2006
+ */
2007
+ links?: Record<string, LinkObject | ReferenceObject>;
2233
2008
  }
2009
+
2234
2010
  /**
2235
2011
  * A container for the expected responses of an operation. The container maps a HTTP response code to the expected response.
2236
2012
  *
@@ -2261,15 +2037,16 @@ interface ResponseObject {
2261
2037
  * ```
2262
2038
  */
2263
2039
  interface ResponsesObject {
2264
- /**
2265
- * Any {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#http-status-codes HTTP status code} can be used as the property name, but only one property per code, to describe the expected response for that HTTP status code. This field MUST be enclosed in quotation marks (for example, "200") for compatibility between JSON and YAML. To define a range of response codes, this field MAY contain the uppercase wildcard character `X`. For example, `2XX` represents all response codes between `[200-299]`. Only the following range definitions are allowed: `1XX`, `2XX`, `3XX`, `4XX`, and `5XX`. If a response is defined using an explicit code, the explicit code definition takes precedence over the range definition for that code.
2266
- */
2267
- [statusCode: string]: ResponseObject | ReferenceObject | undefined;
2268
- /**
2269
- * The documentation of responses other than the ones declared for specific HTTP response codes. Use this field to cover undeclared responses.
2270
- */
2271
- default?: ResponseObject | ReferenceObject;
2040
+ /**
2041
+ * Any {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#http-status-codes HTTP status code} can be used as the property name, but only one property per code, to describe the expected response for that HTTP status code. This field MUST be enclosed in quotation marks (for example, "200") for compatibility between JSON and YAML. To define a range of response codes, this field MAY contain the uppercase wildcard character `X`. For example, `2XX` represents all response codes between `[200-299]`. Only the following range definitions are allowed: `1XX`, `2XX`, `3XX`, `4XX`, and `5XX`. If a response is defined using an explicit code, the explicit code definition takes precedence over the range definition for that code.
2042
+ */
2043
+ [statusCode: string]: ResponseObject | ReferenceObject | undefined;
2044
+ /**
2045
+ * The documentation of responses other than the ones declared for specific HTTP response codes. Use this field to cover undeclared responses.
2046
+ */
2047
+ default?: ResponseObject | ReferenceObject;
2272
2048
  }
2049
+
2273
2050
  /**
2274
2051
  * The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is a superset of the {@link https://tools.ietf.org/html/draft-bhutton-json-schema-00 JSON Schema Specification Draft 2020-12}.
2275
2052
  *
@@ -2294,26 +2071,8 @@ interface ResponsesObject {
2294
2071
  *
2295
2072
  * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}, though as noted, additional properties MAY omit the `x-` prefix within this object.
2296
2073
  */
2297
- interface SchemaObject {
2298
- /**
2299
- * Adds support for polymorphism. The discriminator is an object name that is used to differentiate between other schemas which may satisfy the payload description. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#composition-and-inheritance-polymorphism Composition and Inheritance} for more details.
2300
- */
2301
- discriminator?: DiscriminatorObject;
2302
- /**
2303
- * A free-form property to include an example of an instance for this schema. To represent examples that cannot be naturally represented in JSON or YAML, a string value can be used to contain the example with escaping where necessary.
2304
- *
2305
- * **Deprecated**: The `example` property has been deprecated in favor of the JSON Schema `examples` keyword. Use of `example` is discouraged, and later versions of this specification may remove it.
2306
- */
2307
- example?: unknown;
2308
- /**
2309
- * Additional external documentation for this schema.
2310
- */
2311
- externalDocs?: ExternalDocumentationObject;
2312
- /**
2313
- * This MAY be used only on properties schemas. It has no effect on root schemas. Adds additional metadata to describe the XML representation of this property.
2314
- */
2315
- xml?: XMLObject;
2316
- }
2074
+ interface SchemaObject extends JsonSchemaDraft2020_12 {}
2075
+
2317
2076
  /**
2318
2077
  * Lists the required security schemes to execute this operation. The name used for each property MUST correspond to a security scheme declared in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#componentsSecuritySchemes Security Schemes} under the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#components-object Components Object}.
2319
2078
  *
@@ -2349,11 +2108,12 @@ interface SchemaObject {
2349
2108
  * ```
2350
2109
  */
2351
2110
  interface SecurityRequirementObject {
2352
- /**
2353
- * Each name MUST correspond to a security scheme which is declared in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#componentsSecuritySchemes Security Schemes} under the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#components-object Components Object}. If the security scheme is of type `"oauth2"` or `"openIdConnect"`, then the value is a list of scope names required for the execution, and the list MAY be empty if authorization does not require a specified scope. For other security scheme types, the array MAY contain a list of role names which are required for the execution, but are not otherwise defined or exchanged in-band.
2354
- */
2355
- [name: string]: ReadonlyArray<string>;
2111
+ /**
2112
+ * Each name MUST correspond to a security scheme which is declared in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#componentsSecuritySchemes Security Schemes} under the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#components-object Components Object}. If the security scheme is of type `"oauth2"` or `"openIdConnect"`, then the value is a list of scope names required for the execution, and the list MAY be empty if authorization does not require a specified scope. For other security scheme types, the array MAY contain a list of role names which are required for the execution, but are not otherwise defined or exchanged in-band.
2113
+ */
2114
+ [name: string]: ReadonlyArray<string>;
2356
2115
  }
2116
+
2357
2117
  /**
2358
2118
  * Defines a security scheme that can be used by the operations.
2359
2119
  *
@@ -2399,60 +2159,67 @@ interface SecurityRequirementObject {
2399
2159
  * ```
2400
2160
  */
2401
2161
  type SecuritySchemeObject = {
2402
- /**
2403
- * A description for security scheme. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
2404
- */
2405
- description?: string;
2406
- } & ({
2407
- /**
2408
- * **REQUIRED**. The location of the API key. Valid values are "query", "header" or "cookie".
2409
- */
2410
- in: 'cookie' | 'header' | 'query';
2411
- /**
2412
- * **REQUIRED**. The name of the header, query or cookie parameter to be used.
2413
- */
2414
- name: string;
2415
- /**
2416
- * **REQUIRED**. The type of the security scheme. Valid values are `"apiKey"`, `"http"`, `"mutualTLS"`, `"oauth2"`, `"openIdConnect"`.
2417
- */
2418
- type: 'apiKey';
2419
- } | {
2420
- /**
2421
- * A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes.
2422
- */
2423
- bearerFormat?: string;
2424
- /**
2425
- * **REQUIRED**. The name of the HTTP Authorization scheme to be used in the {@link https://tools.ietf.org/html/rfc7235#section-5.1 Authorization header as defined in RFC7235}. The values used SHOULD be registered in the {@link https://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml IANA Authentication Scheme registry}.
2426
- */
2427
- scheme: string;
2428
- /**
2429
- * **REQUIRED**. The type of the security scheme. Valid values are `"apiKey"`, `"http"`, `"mutualTLS"`, `"oauth2"`, `"openIdConnect"`.
2430
- */
2431
- type: 'http';
2432
- } | {
2433
- /**
2434
- * **REQUIRED**. The type of the security scheme. Valid values are `"apiKey"`, `"http"`, `"mutualTLS"`, `"oauth2"`, `"openIdConnect"`.
2435
- */
2436
- type: 'mutualTLS';
2437
- } | {
2438
- /**
2439
- * **REQUIRED**. An object containing configuration information for the flow types supported.
2440
- */
2441
- flows: OAuthFlowsObject;
2442
- /**
2443
- * **REQUIRED**. The type of the security scheme. Valid values are `"apiKey"`, `"http"`, `"mutualTLS"`, `"oauth2"`, `"openIdConnect"`.
2444
- */
2445
- type: 'oauth2';
2446
- } | {
2447
- /**
2448
- * **REQUIRED**. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of a URL. The OpenID Connect standard requires the use of TLS.
2449
- */
2450
- openIdConnectUrl: string;
2451
- /**
2452
- * **REQUIRED**. The type of the security scheme. Valid values are `"apiKey"`, `"http"`, `"mutualTLS"`, `"oauth2"`, `"openIdConnect"`.
2453
- */
2454
- type: 'openIdConnect';
2455
- });
2162
+ /**
2163
+ * A description for security scheme. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
2164
+ */
2165
+ description?: string;
2166
+ } & (
2167
+ | {
2168
+ /**
2169
+ * **REQUIRED**. The location of the API key. Valid values are "query", "header" or "cookie".
2170
+ */
2171
+ in: 'cookie' | 'header' | 'query';
2172
+ /**
2173
+ * **REQUIRED**. The name of the header, query or cookie parameter to be used.
2174
+ */
2175
+ name: string;
2176
+ /**
2177
+ * **REQUIRED**. The type of the security scheme. Valid values are `"apiKey"`, `"http"`, `"mutualTLS"`, `"oauth2"`, `"openIdConnect"`.
2178
+ */
2179
+ type: 'apiKey';
2180
+ }
2181
+ | {
2182
+ /**
2183
+ * A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes.
2184
+ */
2185
+ bearerFormat?: string;
2186
+ /**
2187
+ * **REQUIRED**. The name of the HTTP Authorization scheme to be used in the {@link https://tools.ietf.org/html/rfc7235#section-5.1 Authorization header as defined in RFC7235}. The values used SHOULD be registered in the {@link https://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml IANA Authentication Scheme registry}.
2188
+ */
2189
+ scheme: string;
2190
+ /**
2191
+ * **REQUIRED**. The type of the security scheme. Valid values are `"apiKey"`, `"http"`, `"mutualTLS"`, `"oauth2"`, `"openIdConnect"`.
2192
+ */
2193
+ type: 'http';
2194
+ }
2195
+ | {
2196
+ /**
2197
+ * **REQUIRED**. The type of the security scheme. Valid values are `"apiKey"`, `"http"`, `"mutualTLS"`, `"oauth2"`, `"openIdConnect"`.
2198
+ */
2199
+ type: 'mutualTLS';
2200
+ }
2201
+ | {
2202
+ /**
2203
+ * **REQUIRED**. An object containing configuration information for the flow types supported.
2204
+ */
2205
+ flows: OAuthFlowsObject;
2206
+ /**
2207
+ * **REQUIRED**. The type of the security scheme. Valid values are `"apiKey"`, `"http"`, `"mutualTLS"`, `"oauth2"`, `"openIdConnect"`.
2208
+ */
2209
+ type: 'oauth2';
2210
+ }
2211
+ | {
2212
+ /**
2213
+ * **REQUIRED**. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of a URL. The OpenID Connect standard requires the use of TLS.
2214
+ */
2215
+ openIdConnectUrl: string;
2216
+ /**
2217
+ * **REQUIRED**. The type of the security scheme. Valid values are `"apiKey"`, `"http"`, `"mutualTLS"`, `"oauth2"`, `"openIdConnect"`.
2218
+ */
2219
+ type: 'openIdConnect';
2220
+ }
2221
+ );
2222
+
2456
2223
  /**
2457
2224
  * An object representing a Server.
2458
2225
  *
@@ -2465,38 +2232,40 @@ type SecuritySchemeObject = {
2465
2232
  * ```
2466
2233
  */
2467
2234
  interface ServerObject {
2468
- /**
2469
- * An optional string describing the host designated by the URL. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
2470
- */
2471
- description?: string;
2472
- /**
2473
- * **REQUIRED**. A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the OpenAPI document is being served. Variable substitutions will be made when a variable is named in `{`brackets`}`.
2474
- */
2475
- url: string;
2476
- /**
2477
- * A map between a variable name and its value. The value is used for substitution in the server's URL template.
2478
- */
2479
- variables?: Record<string, ServerVariableObject>;
2235
+ /**
2236
+ * An optional string describing the host designated by the URL. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
2237
+ */
2238
+ description?: string;
2239
+ /**
2240
+ * **REQUIRED**. A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the OpenAPI document is being served. Variable substitutions will be made when a variable is named in `{`brackets`}`.
2241
+ */
2242
+ url: string;
2243
+ /**
2244
+ * A map between a variable name and its value. The value is used for substitution in the server's URL template.
2245
+ */
2246
+ variables?: Record<string, ServerVariableObject>;
2480
2247
  }
2248
+
2481
2249
  /**
2482
2250
  * An object representing a Server Variable for server URL template substitution.
2483
2251
  *
2484
2252
  * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.
2485
2253
  */
2486
2254
  interface ServerVariableObject {
2487
- /**
2488
- * **REQUIRED**. The default value to use for substitution, which SHALL be sent if an alternate value is _not_ supplied. Note this behavior is different than the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#schema-object Schema Object's} treatment of default values, because in those cases parameter values are optional. If the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#serverVariableEnum `enum`} is defined, the value MUST exist in the enum's values.
2489
- */
2490
- default: string;
2491
- /**
2492
- * An optional description for the server variable. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
2493
- */
2494
- description?: string;
2495
- /**
2496
- * An enumeration of string values to be used if the substitution options are from a limited set. The array MUST NOT be empty.
2497
- */
2498
- enum?: ReadonlyArray<string>;
2255
+ /**
2256
+ * **REQUIRED**. The default value to use for substitution, which SHALL be sent if an alternate value is _not_ supplied. Note this behavior is different than the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#schema-object Schema Object's} treatment of default values, because in those cases parameter values are optional. If the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#serverVariableEnum `enum`} is defined, the value MUST exist in the enum's values.
2257
+ */
2258
+ default: string;
2259
+ /**
2260
+ * An optional description for the server variable. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
2261
+ */
2262
+ description?: string;
2263
+ /**
2264
+ * An enumeration of string values to be used if the substitution options are from a limited set. The array MUST NOT be empty.
2265
+ */
2266
+ enum?: ReadonlyArray<string>;
2499
2267
  }
2268
+
2500
2269
  /**
2501
2270
  * Adds metadata to a single tag that is used by the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#operation-object Operation Object}. It is not mandatory to have a Tag Object per tag defined in the Operation Object instances.
2502
2271
  *
@@ -2509,19 +2278,20 @@ interface ServerVariableObject {
2509
2278
  * ```
2510
2279
  */
2511
2280
  interface TagObject {
2512
- /**
2513
- * A description for the tag. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
2514
- */
2515
- description?: string;
2516
- /**
2517
- * Additional external documentation for this tag.
2518
- */
2519
- externalDocs?: ExternalDocumentationObject;
2520
- /**
2521
- * **REQUIRED**. The name of the tag.
2522
- */
2523
- name: string;
2281
+ /**
2282
+ * A description for the tag. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
2283
+ */
2284
+ description?: string;
2285
+ /**
2286
+ * Additional external documentation for this tag.
2287
+ */
2288
+ externalDocs?: ExternalDocumentationObject;
2289
+ /**
2290
+ * **REQUIRED**. The name of the tag.
2291
+ */
2292
+ name: string;
2524
2293
  }
2294
+
2525
2295
  /**
2526
2296
  * A metadata object that allows for more fine-tuned XML model definitions.
2527
2297
  *
@@ -2714,36 +2484,812 @@ interface TagObject {
2714
2484
  * </aliens>
2715
2485
  * ```
2716
2486
  */
2717
- interface XMLObject {
2487
+ interface XMLObject {
2488
+ /**
2489
+ * Declares whether the property definition translates to an attribute instead of an element. Default value is `false`.
2490
+ */
2491
+ attribute?: boolean;
2492
+ /**
2493
+ * Replaces the name of the element/attribute used for the described schema property. When defined within `items`, it will affect the name of the individual XML elements within the list. When defined alongside `type` being `array` (outside the `items`), it will affect the wrapping element and only if `wrapped` is `true`. If `wrapped` is `false`, it will be ignored.
2494
+ */
2495
+ name?: string;
2496
+ /**
2497
+ * The URI of the namespace definition. This MUST be in the form of an absolute URI.
2498
+ */
2499
+ namespace?: string;
2500
+ /**
2501
+ * The prefix to be used for the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#xmlName name}.
2502
+ */
2503
+ prefix?: string;
2504
+ /**
2505
+ * MAY be used only for an array definition. Signifies whether the array is wrapped (for example, `<books><book/><book/></books>`) or unwrapped (`<book/><book/>`). Default value is `false`. The definition takes effect only when defined alongside `type` being `array` (outside the `items`).
2506
+ */
2507
+ wrapped?: boolean;
2508
+ }
2509
+
2510
+ interface Config$7 extends PluginName<'@hey-api/schemas'> {
2511
+ /**
2512
+ * Customise the schema name. By default, `{{name}}Schema` is used. `name` is a
2513
+ * valid JavaScript/TypeScript identifier, e.g. if your schema name is
2514
+ * "Foo-Bar", `name` value would be "FooBar".
2515
+ */
2516
+ nameBuilder?: (
2517
+ name: string,
2518
+ schema: OpenApiSchema | OpenApiSchema$1 | SchemaObject,
2519
+ ) => string;
2520
+ /**
2521
+ * Name of the generated file.
2522
+ * @default 'schemas'
2523
+ */
2524
+ output?: string;
2525
+ /**
2526
+ * Choose schema type to generate. Select 'form' if you don't want
2527
+ * descriptions to reduce bundle size and you plan to use schemas
2528
+ * for form validation
2529
+ * @default 'json'
2530
+ */
2531
+ type?: 'form' | 'json';
2532
+ }
2533
+
2534
+ type IRMediaType = 'form-data' | 'json' | 'url-search-params';
2535
+
2536
+ interface IROperationObject {
2537
+ body?: IRBodyObject;
2538
+ deprecated?: boolean;
2539
+ description?: string;
2540
+ id: string;
2541
+ parameters?: IRParametersObject;
2542
+ responses?: IRResponsesObject;
2543
+ // TODO: parser - add more properties
2544
+ // security?: ReadonlyArray<SecurityRequirementObject>;
2545
+ // servers?: ReadonlyArray<ServerObject>;
2546
+ summary?: string;
2547
+ tags?: ReadonlyArray<string>;
2548
+ }
2549
+
2550
+ interface IRBodyObject {
2551
+ mediaType: string;
2552
+ /**
2553
+ * Does body control pagination? We handle only simple values
2554
+ * for now, up to 1 nested field.
2555
+ */
2556
+ pagination?: boolean | string;
2557
+ required?: boolean;
2558
+ schema: IRSchemaObject;
2559
+ type?: IRMediaType;
2560
+ }
2561
+
2562
+ interface IRParametersObject {
2563
+ cookie?: Record<string, IRParameterObject>;
2564
+ header?: Record<string, IRParameterObject>;
2565
+ path?: Record<string, IRParameterObject>;
2566
+ query?: Record<string, IRParameterObject>;
2567
+ }
2568
+
2569
+ interface IRParameterObject {
2570
+ /**
2571
+ * Endpoint parameters must specify their location.
2572
+ */
2573
+ location: 'cookie' | 'header' | 'path' | 'query';
2574
+ name: string;
2575
+ /**
2576
+ * Does this parameter control pagination? We handle only simple values
2577
+ * for now, up to 1 nested field.
2578
+ */
2579
+ pagination?: boolean | string;
2580
+ required?: boolean;
2581
+ schema: IRSchemaObject;
2582
+ }
2583
+
2584
+ interface IRResponsesObject {
2585
+ /**
2586
+ * Any {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#http-status-codes HTTP status code} can be used as the property name, but only one property per code, to describe the expected response for that HTTP status code. This field MUST be enclosed in quotation marks (for example, "200") for compatibility between JSON and YAML. To define a range of response codes, this field MAY contain the uppercase wildcard character `X`. For example, `2XX` represents all response codes between `[200-299]`. Only the following range definitions are allowed: `1XX`, `2XX`, `3XX`, `4XX`, and `5XX`. If a response is defined using an explicit code, the explicit code definition takes precedence over the range definition for that code.
2587
+ */
2588
+ [statusCode: string]: IRResponseObject | undefined;
2589
+ /**
2590
+ * The documentation of responses other than the ones declared for specific HTTP response codes. Use this field to cover undeclared responses.
2591
+ */
2592
+ default?: IRResponseObject;
2593
+ }
2594
+
2595
+ interface IRResponseObject {
2596
+ // TODO: parser - handle headers, links, and possibly other media types?
2597
+ schema: IRSchemaObject;
2598
+ }
2599
+
2600
+ interface IRSchemaObject
2601
+ extends Pick<
2602
+ JsonSchemaDraft2020_12,
2603
+ '$ref' | 'const' | 'deprecated' | 'description' | 'required' | 'title'
2604
+ > {
2605
+ /**
2606
+ * If the schema is intended to be used as an object property, it can be
2607
+ * marked as read-only or write-only.
2608
+ */
2609
+ accessScope?: 'read' | 'write';
2610
+ /**
2611
+ * If type is `object`, `additionalProperties` can be used to either define
2612
+ * a schema for properties not included in `properties` or disallow such
2613
+ * properties altogether.
2614
+ */
2615
+ additionalProperties?: IRSchemaObject | false;
2616
+ /**
2617
+ * Any string value is accepted as `format`.
2618
+ */
2619
+ format?: JsonSchemaDraft2020_12['format'] | 'binary' | 'integer';
2620
+ /**
2621
+ * If schema resolves into multiple items instead of a simple `type`, they
2622
+ * will be included in `items` array.
2623
+ */
2624
+ items?: ReadonlyArray<IRSchemaObject>;
2625
+ /**
2626
+ * When resolving a list of items, we need to know the relationship between
2627
+ * them. `logicalOperator` specifies this logical relationship.
2628
+ * @default 'or'
2629
+ */
2630
+ logicalOperator?: 'and' | 'or';
2631
+ /**
2632
+ * When type is `object`, `properties` will contain a map of its properties.
2633
+ */
2634
+ properties?: Record<string, IRSchemaObject>;
2635
+ /**
2636
+ * Each schema eventually resolves into `type`.
2637
+ */
2638
+ type?:
2639
+ | 'array'
2640
+ | 'boolean'
2641
+ | 'enum'
2642
+ | 'null'
2643
+ | 'number'
2644
+ | 'object'
2645
+ | 'string'
2646
+ | 'tuple'
2647
+ | 'unknown'
2648
+ | 'void';
2649
+ }
2650
+
2651
+ interface Config$6 extends PluginName<'@hey-api/services'> {
2652
+ /**
2653
+ * Group operation methods into service classes? When enabled, you can
2654
+ * select which classes to export with `services.include` and/or
2655
+ * transform their names with `services.name`.
2656
+ *
2657
+ * Note that by enabling this option, your services will **NOT**
2658
+ * support {@link https://developer.mozilla.org/docs/Glossary/Tree_shaking tree-shaking}.
2659
+ * For this reason, it is disabled by default.
2660
+ * @default false
2661
+ */
2662
+ asClass?: boolean;
2663
+ /**
2664
+ * Filter endpoints to be included in the generated services.
2665
+ * The provided string should be a regular expression where matched
2666
+ * results will be included in the output. The input pattern this
2667
+ * string will be tested against is `{method} {path}`. For example,
2668
+ * you can match `POST /api/v1/foo` with `^POST /api/v1/foo$`.
2669
+ */
2670
+ filter?: string;
2671
+ /**
2672
+ * Include only service classes with names matching regular expression
2673
+ *
2674
+ * This option has no effect if `services.asClass` is `false`.
2675
+ */
2676
+ include?: string;
2677
+ /**
2678
+ * Customise the name of methods within the service. By default, {@link IROperationObject.id} or {@link Operation.name} is used.
2679
+ */
2680
+ methodNameBuilder?: (operation: IROperationObject | Operation) => string;
2681
+ // TODO: parser - rename operationId option to something like inferId?: boolean
2682
+ /**
2683
+ * Use operation ID to generate operation names?
2684
+ * @default true
2685
+ */
2686
+ operationId?: boolean;
2687
+ /**
2688
+ * Name of the generated file.
2689
+ * @default 'services'
2690
+ */
2691
+ output?: string;
2692
+ /**
2693
+ * Define shape of returned value from service calls
2694
+ * @default 'body'
2695
+ * @deprecated
2696
+ */
2697
+ response?: 'body' | 'response';
2698
+ /**
2699
+ * Customize the generated service class names. The name variable is
2700
+ * obtained from your OpenAPI specification tags.
2701
+ *
2702
+ * This option has no effect if `services.asClass` is `false`.
2703
+ * @default '{{name}}Service'
2704
+ */
2705
+ serviceNameBuilder?: string;
2706
+ }
2707
+
2708
+ interface Config$5 extends PluginName<'@hey-api/transformers'> {
2709
+ /**
2710
+ * Convert date strings into Date objects?
2711
+ * @default false
2712
+ */
2713
+ dates?: boolean;
2714
+ /**
2715
+ * Name of the generated file.
2716
+ * @default 'transformers'
2717
+ */
2718
+ output?: string;
2719
+ }
2720
+
2721
+ interface Config$4 extends PluginName<'@hey-api/types'> {
2722
+ /**
2723
+ * Generate enum definitions?
2724
+ * @default false
2725
+ */
2726
+ enums?: 'javascript' | 'typescript' | 'typescript+namespace' | false;
2727
+ /**
2728
+ * Include only types matching regular expression
2729
+ */
2730
+ include?: string;
2731
+ /**
2732
+ * Name of the generated file.
2733
+ * @default 'types'
2734
+ */
2735
+ output?: string;
2736
+ /**
2737
+ * Use your preferred naming pattern
2738
+ * @default 'preserve'
2739
+ */
2740
+ style?: 'PascalCase' | 'preserve';
2741
+ /**
2742
+ * Generate a tree of types containing all operations? It will be named
2743
+ * $OpenApiTs.
2744
+ * @default false
2745
+ */
2746
+ tree?: boolean;
2747
+ }
2748
+
2749
+ interface Config$3 extends PluginName<'@tanstack/react-query'> {
2750
+ /**
2751
+ * Generate {@link https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions `infiniteQueryOptions()`} helpers? These will be generated from GET and POST requests where a pagination parameter is detected.
2752
+ * @default true
2753
+ */
2754
+ infiniteQueryOptions?: boolean;
2755
+ /**
2756
+ * Generate {@link https://tanstack.com/query/v5/docs/framework/react/reference/useMutation `useMutation()`} helpers? These will be generated from DELETE, PATCH, POST, and PUT requests.
2757
+ * @default true
2758
+ */
2759
+ mutationOptions?: boolean;
2760
+ /**
2761
+ * Name of the generated file.
2762
+ * @default '@tanstack/react-query'
2763
+ */
2764
+ output?: string;
2765
+ /**
2766
+ * Generate {@link https://tanstack.com/query/v5/docs/framework/react/reference/queryOptions `queryOptions()`} helpers?
2767
+ * These will be generated from all requests.
2768
+ * @default true
2769
+ */
2770
+ queryOptions?: boolean;
2771
+ }
2772
+
2773
+ interface Config$2 extends PluginName<'@tanstack/solid-query'> {
2774
+ /**
2775
+ * Generate `createInfiniteQuery()` helpers? These will be generated from GET and POST requests where a pagination parameter is detected.
2776
+ * @default true
2777
+ */
2778
+ infiniteQueryOptions?: boolean;
2779
+ /**
2780
+ * Generate `createMutation()` helpers? These will be generated from DELETE, PATCH, POST, and PUT requests.
2781
+ * @default true
2782
+ */
2783
+ mutationOptions?: boolean;
2784
+ /**
2785
+ * Name of the generated file.
2786
+ * @default '@tanstack/solid-query'
2787
+ */
2788
+ output?: string;
2789
+ /**
2790
+ * Generate {@link https://tanstack.com/query/v5/docs/framework/solid/reference/createQuery `createQuery()`} helpers?
2791
+ * These will be generated from all requests.
2792
+ * @default true
2793
+ */
2794
+ queryOptions?: boolean;
2795
+ }
2796
+
2797
+ interface Config$1 extends PluginName<'@tanstack/svelte-query'> {
2798
+ /**
2799
+ * Generate `createInfiniteQuery()` helpers? These will be generated from GET and POST requests where a pagination parameter is detected.
2800
+ * @default true
2801
+ */
2802
+ infiniteQueryOptions?: boolean;
2803
+ /**
2804
+ * Generate {@link https://tanstack.com/query/v5/docs/framework/svelte/reference/functions/createmutation `createMutation()`} helpers? These will be generated from DELETE, PATCH, POST, and PUT requests.
2805
+ * @default true
2806
+ */
2807
+ mutationOptions?: boolean;
2808
+ /**
2809
+ * Name of the generated file.
2810
+ * @default '@tanstack/svelte-query'
2811
+ */
2812
+ output?: string;
2813
+ /**
2814
+ * Generate {@link https://tanstack.com/query/v5/docs/framework/svelte/reference/functions/createquery `createQuery()`} helpers?
2815
+ * These will be generated from all requests.
2816
+ * @default true
2817
+ */
2818
+ queryOptions?: boolean;
2819
+ }
2820
+
2821
+ interface Config extends PluginName<'@tanstack/vue-query'> {
2822
+ /**
2823
+ * Generate {@link https://tanstack.com/query/v5/docs/framework/vue/reference/infiniteQueryOptions `infiniteQueryOptions()`} helpers? These will be generated from GET and POST requests where a pagination parameter is detected.
2824
+ * @default true
2825
+ */
2826
+ infiniteQueryOptions?: boolean;
2827
+ /**
2828
+ * Generate {@link https://tanstack.com/query/v5/docs/framework/vue/reference/useMutation `useMutation()`} helpers? These will be generated from DELETE, PATCH, POST, and PUT requests.
2829
+ * @default true
2830
+ */
2831
+ mutationOptions?: boolean;
2832
+ /**
2833
+ * Name of the generated file.
2834
+ * @default '@tanstack/vue-query'
2835
+ */
2836
+ output?: string;
2837
+ /**
2838
+ * Generate {@link https://tanstack.com/query/v5/docs/framework/vue/guides/query-options `queryOptions()`} helpers?
2839
+ * These will be generated from all requests.
2840
+ * @default true
2841
+ */
2842
+ queryOptions?: boolean;
2843
+ }
2844
+
2845
+ /**
2846
+ * User-facing plugin types.
2847
+ */
2848
+ type UserPlugins = UserConfig$1<Config$7> | UserConfig$1<Config$6> | UserConfig$1<Config$5> | UserConfig$1<Config$4> | UserConfig$1<Config$3> | UserConfig$1<Config$2> | UserConfig$1<Config$1> | UserConfig$1<Config>;
2849
+
2850
+ declare const CLIENTS: readonly ["@hey-api/client-axios", "@hey-api/client-fetch", "legacy/angular", "legacy/axios", "legacy/fetch", "legacy/node", "legacy/xhr"];
2851
+ type Client$2 = (typeof CLIENTS)[number];
2852
+ interface ClientConfig {
2853
+ /**
2854
+ * Manually set base in OpenAPI config instead of inferring from server value
2855
+ * @deprecated
2856
+ */
2857
+ base?: string;
2858
+ /**
2859
+ * HTTP client to generate
2860
+ */
2861
+ client?: Client$2 | false | {
2862
+ /**
2863
+ * Bundle the client module? Set this to true if you're using a client
2864
+ * package and don't want to declare it as a separate dependency.
2865
+ * When true, the client module will be generated from the client
2866
+ * package and bundled with the rest of the generated output. This is
2867
+ * useful if you're repackaging the output, publishing it to other users,
2868
+ * and you don't want them to install any dependencies.
2869
+ * @default false
2870
+ */
2871
+ bundle?: boolean;
2872
+ /**
2873
+ * HTTP client to generate
2874
+ */
2875
+ name: Client$2;
2876
+ };
2877
+ /**
2878
+ * Path to the config file. Set this value if you don't use the default
2879
+ * config file name, or it's not located in the project root.
2880
+ */
2881
+ configFile?: string;
2882
+ /**
2883
+ * Run in debug mode?
2884
+ * @default false
2885
+ */
2886
+ debug?: boolean;
2887
+ /**
2888
+ * Skip writing files to disk?
2889
+ * @default false
2890
+ */
2891
+ dryRun?: boolean;
2892
+ /**
2893
+ * Opt-in to the experimental parser?
2894
+ * @default false
2895
+ */
2896
+ experimentalParser?: boolean;
2897
+ /**
2898
+ * Generate core client classes?
2899
+ * @default true
2900
+ */
2901
+ exportCore?: boolean;
2902
+ /**
2903
+ * The relative location of the OpenAPI spec
2904
+ */
2905
+ input: string | Record<string, unknown>;
2906
+ /**
2907
+ * Custom client class name. Please note this option is deprecated and
2908
+ * will be removed in favor of clients.
2909
+ * @link https://heyapi.dev/openapi-ts/migrating.html#deprecated-name
2910
+ * @deprecated
2911
+ */
2912
+ name?: string;
2913
+ /**
2914
+ * The relative location of the output folder
2915
+ */
2916
+ output: string | {
2917
+ /**
2918
+ * Process output folder with formatter?
2919
+ * @default false
2920
+ */
2921
+ format?: 'biome' | 'prettier' | false;
2922
+ /**
2923
+ * Process output folder with linter?
2924
+ * @default false
2925
+ */
2926
+ lint?: 'biome' | 'eslint' | false;
2927
+ /**
2928
+ * The relative location of the output folder
2929
+ */
2930
+ path: string;
2931
+ };
2932
+ /**
2933
+ * Plugins are used to generate artifacts from provided input.
2934
+ */
2935
+ plugins?: ReadonlyArray<UserPlugins['name'] | UserPlugins>;
2936
+ /**
2937
+ * Path to custom request file. Please note this option is deprecated and
2938
+ * will be removed in favor of clients.
2939
+ * @link https://heyapi.dev/openapi-ts/migrating.html#deprecated-request
2940
+ * @deprecated
2941
+ */
2942
+ request?: string;
2943
+ /**
2944
+ * Use options or arguments functions. Please note this option is deprecated and
2945
+ * will be removed in favor of clients.
2946
+ * @link https://heyapi.dev/openapi-ts/migrating.html#deprecated-useoptions
2947
+ * @deprecated
2948
+ * @default true
2949
+ */
2950
+ useOptions?: boolean;
2951
+ }
2952
+ interface UserConfig extends ClientConfig {
2953
+ }
2954
+
2955
+ interface Dictionary<T = unknown> {
2956
+ [key: string]: T;
2957
+ }
2958
+
2959
+ /**
2960
+ * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#reference-object
2961
+ */
2962
+ interface OpenApiReference$1 {
2963
+ $ref?: string;
2964
+ }
2965
+
2966
+ /**
2967
+ * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#example-object
2968
+ */
2969
+ interface OpenApiExample extends OpenApiReference$1 {
2970
+ description?: string;
2971
+ externalValue?: string;
2972
+ summary?: string;
2973
+ value?: unknown;
2974
+ }
2975
+
2976
+ interface WithEnumExtension {
2977
+ 'x-enum-descriptions'?: ReadonlyArray<string>;
2978
+ 'x-enum-varnames'?: ReadonlyArray<string>;
2979
+ 'x-enumNames'?: ReadonlyArray<string>;
2980
+ }
2981
+
2982
+ /**
2983
+ * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#discriminator-object
2984
+ */
2985
+ interface OpenApiDiscriminator {
2986
+ mapping?: Dictionary<string>;
2987
+ propertyName: string;
2988
+ }
2989
+
2990
+ /**
2991
+ * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#external-documentation-object
2992
+ */
2993
+ interface OpenApiExternalDocs$1 {
2994
+ description?: string;
2995
+ url: string;
2996
+ }
2997
+
2998
+ /**
2999
+ * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#xml-object
3000
+ */
3001
+ interface OpenApiXml$1 {
3002
+ attribute?: boolean;
3003
+ name?: string;
3004
+ namespace?: string;
3005
+ prefix?: string;
3006
+ wrapped?: boolean;
3007
+ }
3008
+
3009
+ /**
3010
+ * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#schema-object
3011
+ */
3012
+ interface OpenApiSchema$1 extends OpenApiReference$1, WithEnumExtension {
3013
+ additionalProperties?: boolean | OpenApiSchema$1;
3014
+ allOf?: OpenApiSchema$1[];
3015
+ anyOf?: OpenApiSchema$1[];
3016
+ const?: string | number | boolean | null;
3017
+ default?: unknown;
3018
+ deprecated?: boolean;
3019
+ description?: string;
3020
+ discriminator?: OpenApiDiscriminator;
3021
+ enum?: (string | number)[];
3022
+ example?: unknown;
3023
+ exclusiveMaximum?: boolean;
3024
+ exclusiveMinimum?: boolean;
3025
+ externalDocs?: OpenApiExternalDocs$1;
3026
+ format?: 'binary' | 'boolean' | 'byte' | 'date-time' | 'date' | 'double' | 'float' | 'int32' | 'int64' | 'password' | 'string';
3027
+ items?: OpenApiSchema$1;
3028
+ maxItems?: number;
3029
+ maxLength?: number;
3030
+ maxProperties?: number;
3031
+ maximum?: number;
3032
+ minItems?: number;
3033
+ minLength?: number;
3034
+ minProperties?: number;
3035
+ minimum?: number;
3036
+ multipleOf?: number;
3037
+ not?: OpenApiSchema$1[];
3038
+ nullable?: boolean;
3039
+ oneOf?: OpenApiSchema$1[];
3040
+ pattern?: string;
3041
+ prefixItems?: OpenApiSchema$1[];
3042
+ properties?: Dictionary<OpenApiSchema$1>;
3043
+ readOnly?: boolean;
3044
+ required?: string[];
3045
+ title?: string;
3046
+ type?: string | string[];
3047
+ uniqueItems?: boolean;
3048
+ writeOnly?: boolean;
3049
+ xml?: OpenApiXml$1;
3050
+ }
3051
+
3052
+ /**
3053
+ * add only one type for now as that's needed to resolve the reported issue,
3054
+ * more types should be added though
3055
+ * {@link https://github.com/hey-api/openapi-ts/issues/612}
3056
+ */
3057
+ type MediaType = 'application/json';
3058
+ /**
3059
+ * encoding interface should be added, not adding it for now as it's not needed
3060
+ * to resolve the issue reported
3061
+ * {@link https://github.com/hey-api/openapi-ts/issues/612}
3062
+ */
3063
+ interface MediaTypeObject {
3064
+ example?: unknown;
3065
+ examples?: Dictionary<OpenApiExample>;
3066
+ schema: OpenApiSchema$1;
3067
+ }
3068
+ /**
3069
+ * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameter-object
3070
+ */
3071
+ interface OpenApiParameter extends OpenApiReference$1 {
3072
+ allowEmptyValue?: boolean;
3073
+ allowReserved?: boolean;
3074
+ content?: Record<MediaType, MediaTypeObject>;
3075
+ deprecated?: boolean;
3076
+ description?: string;
3077
+ example?: unknown;
3078
+ examples?: Dictionary<OpenApiExample>;
3079
+ explode?: boolean;
3080
+ in: 'cookie' | 'formData' | 'header' | 'path' | 'query';
3081
+ name: string;
3082
+ nullable?: boolean;
3083
+ required?: boolean;
3084
+ schema?: OpenApiSchema$1;
3085
+ style?: string;
3086
+ }
3087
+
3088
+ interface Enum {
3089
+ customDescription?: string;
3090
+ customName?: string;
3091
+ description?: string;
3092
+ value: string | number;
3093
+ }
3094
+ interface OperationParameter extends Model {
3095
+ in: 'body' | 'cookie' | 'formData' | 'header' | 'path' | 'query';
3096
+ mediaType: string | null;
3097
+ prop: string;
3098
+ }
3099
+ interface OperationParameters extends Pick<Model, '$refs' | 'imports'> {
3100
+ parameters: OperationParameter[];
3101
+ parametersBody: OperationParameter | null;
3102
+ parametersCookie: OperationParameter[];
3103
+ parametersForm: OperationParameter[];
3104
+ parametersHeader: OperationParameter[];
3105
+ parametersPath: OperationParameter[];
3106
+ parametersQuery: OperationParameter[];
3107
+ }
3108
+ interface OperationResponse extends Model {
3109
+ code: number | 'default' | '1XX' | '2XX' | '3XX' | '4XX' | '5XX';
3110
+ in: 'header' | 'response';
3111
+ responseTypes: Array<'error' | 'success'>;
3112
+ }
3113
+ type Method = 'CONNECT' | 'DELETE' | 'GET' | 'HEAD' | 'OPTIONS' | 'PATCH' | 'POST' | 'PUT' | 'TRACE';
3114
+ interface Operation$1 extends OperationParameters {
3115
+ deprecated: boolean;
3116
+ description: string | null;
2718
3117
  /**
2719
- * Declares whether the property definition translates to an attribute instead of an element. Default value is `false`.
3118
+ * The operationId from OpenAPI specification.
2720
3119
  */
2721
- attribute?: boolean;
3120
+ id: string | null;
3121
+ method: Method;
3122
+ name: string;
3123
+ path: string;
3124
+ responseHeader: string | null;
2722
3125
  /**
2723
- * Replaces the name of the element/attribute used for the described schema property. When defined within `items`, it will affect the name of the individual XML elements within the list. When defined alongside `type` being `array` (outside the `items`), it will affect the wrapping element and only if `wrapped` is `true`. If `wrapped` is `false`, it will be ignored.
3126
+ * All operation responses defined in OpenAPI specification.
3127
+ * Sorted by status code.
2724
3128
  */
2725
- name?: string;
3129
+ responses: OperationResponse[];
3130
+ summary: string | null;
3131
+ tags: string[] | null;
3132
+ }
3133
+ interface Schema {
3134
+ default?: unknown;
3135
+ exclusiveMaximum?: boolean;
3136
+ exclusiveMinimum?: boolean;
3137
+ format?: 'binary' | 'boolean' | 'byte' | 'date-time' | 'date' | 'double' | 'float' | 'int32' | 'int64' | 'password' | 'string';
3138
+ isDefinition: boolean;
3139
+ isNullable: boolean;
3140
+ isReadOnly: boolean;
3141
+ isRequired: boolean;
3142
+ maxItems?: number;
3143
+ maxLength?: number;
3144
+ maxProperties?: number;
3145
+ maximum?: number;
3146
+ minItems?: number;
3147
+ minLength?: number;
3148
+ minProperties?: number;
3149
+ minimum?: number;
3150
+ multipleOf?: number;
3151
+ pattern?: string;
3152
+ uniqueItems?: boolean;
3153
+ }
3154
+ interface ModelMeta {
2726
3155
  /**
2727
- * The URI of the namespace definition. This MUST be in the form of an absolute URI.
3156
+ * Ref to the type in OpenAPI specification.
2728
3157
  */
2729
- namespace?: string;
3158
+ $ref: string;
2730
3159
  /**
2731
- * The prefix to be used for the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#xmlName name}.
3160
+ * Name passed to the initial `getModel()` call.
2732
3161
  */
2733
- prefix?: string;
3162
+ name: string;
3163
+ }
3164
+ interface Model extends Schema {
3165
+ /**
3166
+ * **Experimental.** Contains list of original refs so they can be used
3167
+ * to access the schema from anywhere instead of relying on string name.
3168
+ * This allows us to do things like detect type of ref.
3169
+ */
3170
+ $refs: string[];
3171
+ base: string;
3172
+ deprecated?: boolean;
3173
+ description: string | null;
3174
+ enum: Enum[];
3175
+ enums: Model[];
3176
+ export: 'all-of' | 'any-of' | 'array' | 'const' | 'dictionary' | 'enum' | 'generic' | 'interface' | 'one-of' | 'reference';
3177
+ imports: string[];
3178
+ in: OperationParameter['in'] | OpenApiParameter['in'] | OperationResponse['in'] | '';
3179
+ link: Model | Model[] | null;
3180
+ meta?: ModelMeta;
3181
+ /**
3182
+ * @deprecated use `meta.name` instead
3183
+ */
3184
+ name: string;
3185
+ properties: Model[];
3186
+ template: string | null;
3187
+ type: string;
3188
+ }
3189
+ interface Client$1 {
3190
+ models: Model[];
3191
+ operations: Operation$1[];
3192
+ server: string;
2734
3193
  /**
2735
- * MAY be used only for an array definition. Signifies whether the array is wrapped (for example, `<books><book/><book/></books>`) or unwrapped (`<book/><book/>`). Default value is `false`. The definition takes effect only when defined alongside `type` being `array` (outside the `items`).
3194
+ * Map of generated types where type names are keys. This is used to track
3195
+ * uniquely generated types as we may want to deduplicate if there are
3196
+ * multiple definitions with the same name but different value, or if we
3197
+ * want to transform names.
2736
3198
  */
3199
+ types: Record<string, ModelMeta>;
3200
+ version: string;
3201
+ }
3202
+
3203
+ interface OpenApiV3_0_3 {
3204
+ /**
3205
+ * **REQUIRED**. This string MUST be the {@link https://semver.org/spec/v2.0.0.html semantic version number} of the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#versions OpenAPI Specification version} that the OpenAPI document uses. The `openapi` field SHOULD be used by tooling specifications and clients to interpret the OpenAPI document. This is _not_ related to the API {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#infoVersion `info.version`} string.
3206
+ */
3207
+ openapi: '3.0.3';
3208
+ // TODO
3209
+ }
3210
+
3211
+ /**
3212
+ * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#external-documentation-object
3213
+ */
3214
+ interface OpenApiExternalDocs {
3215
+ description?: string;
3216
+ url: string;
3217
+ }
3218
+
3219
+ interface WithNullableExtension {
3220
+ 'x-nullable'?: boolean;
3221
+ }
3222
+
3223
+ /**
3224
+ * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#reference-object
3225
+ */
3226
+ interface OpenApiReference {
3227
+ $ref?: string;
3228
+ }
3229
+
3230
+ /**
3231
+ * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#xml-object
3232
+ */
3233
+ interface OpenApiXml {
3234
+ attribute?: boolean;
3235
+ name?: string;
3236
+ namespace?: string;
3237
+ prefix?: string;
2737
3238
  wrapped?: boolean;
2738
3239
  }
2739
3240
 
3241
+ /**
3242
+ * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#schema-object
3243
+ */
3244
+ interface OpenApiSchema extends OpenApiReference, WithEnumExtension, WithNullableExtension {
3245
+ additionalProperties?: boolean | OpenApiSchema;
3246
+ allOf?: OpenApiSchema[];
3247
+ default?: unknown;
3248
+ description?: string;
3249
+ discriminator?: string;
3250
+ enum?: (string | number)[];
3251
+ example?: unknown;
3252
+ exclusiveMaximum?: boolean;
3253
+ exclusiveMinimum?: boolean;
3254
+ externalDocs?: OpenApiExternalDocs;
3255
+ format?: 'int32' | 'int64' | 'float' | 'double' | 'string' | 'boolean' | 'byte' | 'binary' | 'date' | 'date-time' | 'password';
3256
+ items?: OpenApiSchema;
3257
+ maxItems?: number;
3258
+ maxLength?: number;
3259
+ maxProperties?: number;
3260
+ maximum?: number;
3261
+ minItems?: number;
3262
+ minLength?: number;
3263
+ minProperties?: number;
3264
+ minimum?: number;
3265
+ multipleOf?: number;
3266
+ pattern?: string;
3267
+ properties?: Dictionary<OpenApiSchema>;
3268
+ readOnly?: boolean;
3269
+ required?: string[];
3270
+ title?: string;
3271
+ type?: string;
3272
+ uniqueItems?: boolean;
3273
+ xml?: OpenApiXml;
3274
+ }
3275
+
3276
+ interface Operation extends Omit<Operation$1, 'tags'> {
3277
+ service: string;
3278
+ }
3279
+ interface Service extends Pick<Model, '$refs' | 'imports' | 'name'> {
3280
+ operations: Operation[];
3281
+ }
3282
+ interface Client extends Omit<Client$1, 'operations'> {
3283
+ services: Service[];
3284
+ }
3285
+
2740
3286
  /**
2741
3287
  * Generate the OpenAPI client. This method will read the OpenAPI specification and based on the
2742
3288
  * given language it will generate the client, including the typed models, validation schemas,
2743
3289
  * service layer, etc.
2744
3290
  * @param userConfig {@link UserConfig} passed to the `createClient()` method
2745
3291
  */
2746
- declare function createClient(userConfig: UserConfig): Promise<ReadonlyArray<Client$1>>;
3292
+ declare function createClient(userConfig: UserConfig): Promise<ReadonlyArray<Client>>;
2747
3293
  /**
2748
3294
  * Type helper for openapi-ts.config.ts, returns {@link UserConfig} object
2749
3295
  */
@@ -2753,4 +3299,4 @@ declare const _default: {
2753
3299
  defineConfig: (config: UserConfig) => UserConfig;
2754
3300
  };
2755
3301
 
2756
- export { type OpenApiV3_0_3, type OpenApiV3_1, type UserConfig, createClient, _default as default, defineConfig };
3302
+ export { type OpenApiV3_0_3, type OpenApiV3_1_0, type UserConfig, createClient, _default as default, defineConfig };