@hey-api/openapi-ts 0.54.2 → 0.54.4

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
@@ -36,6 +36,1291 @@ interface EnumExtensions {
36
36
  'x-enumNames'?: ReadonlyArray<string>;
37
37
  }
38
38
 
39
+ /**
40
+ * This is the root object of the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#openapi-description OpenAPI Description}.
41
+ *
42
+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
43
+ */
44
+ interface OpenApiV3_0_X {
45
+ /**
46
+ * An element to hold various Objects for the OpenAPI Description.
47
+ */
48
+ components?: ComponentsObject$1;
49
+ /**
50
+ * Additional external documentation.
51
+ */
52
+ externalDocs?: ExternalDocumentationObject$1;
53
+ /**
54
+ * **REQUIRED**. Provides metadata about the API. The metadata MAY be used by tooling as required.
55
+ */
56
+ info: InfoObject$1;
57
+ /**
58
+ * **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.
59
+ */
60
+ openapi: '3.0.0' | '3.0.1' | '3.0.2' | '3.0.3' | '3.0.4';
61
+ /**
62
+ * **REQUIRED**. The available paths and operations for the API.
63
+ */
64
+ paths: PathsObject$1;
65
+ /**
66
+ * 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. The list can be incomplete, up to being empty or absent. To make security explicitly optional, an empty security requirement (`{}`) can be included in the array.
67
+ */
68
+ security?: ReadonlyArray<SecurityRequirementObject$1>;
69
+ /**
70
+ * An array of Server Objects, which provide connectivity information to a target server. If the `servers` field 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.0.4.md#server-object Server Object} with a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#server-url url} value of `/`.
71
+ */
72
+ servers?: ReadonlyArray<ServerObject$1>;
73
+ /**
74
+ * A list of tags used by the OpenAPI Description 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.0.4.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.
75
+ */
76
+ tags?: ReadonlyArray<TagObject$1>;
77
+ }
78
+
79
+ /**
80
+ * 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.0.4.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.
81
+ *
82
+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
83
+ *
84
+ * TODO: examples
85
+ */
86
+ interface CallbackObject$1 {
87
+ /**
88
+ * A Path Item Object used to define a callback request and expected responses. A {@link https://learn.openapis.org/examples/v3.0/callback-example.html complete example} is available.
89
+ */
90
+ [expression: string]: PathItemObject$1 | ReferenceObject$1;
91
+ }
92
+
93
+ /**
94
+ * 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 outside the Components Object.
95
+ *
96
+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
97
+ *
98
+ * All the fixed fields declared above are objects that MUST use keys that match the regular expression: `^[a-zA-Z0-9\.\-_]+$`.
99
+ *
100
+ * TODO: examples
101
+ */
102
+ interface ComponentsObject$1 {
103
+ /**
104
+ * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#callback-object Callback Objects}.
105
+ */
106
+ callbacks?: Record<string, CallbackObject$1 | ReferenceObject$1>;
107
+ /**
108
+ * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#example-object Example Objects}.
109
+ */
110
+ examples?: Record<string, ExampleObject$1 | ReferenceObject$1>;
111
+ /**
112
+ * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#header-object Header Objects}.
113
+ */
114
+ headers?: Record<string, HeaderObject$1 | ReferenceObject$1>;
115
+ /**
116
+ * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#link-object Link Objects}.
117
+ */
118
+ linkes?: Record<string, LinkObject$1 | ReferenceObject$1>;
119
+ /**
120
+ * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-object Parameter Objects}.
121
+ */
122
+ parameters?: Record<string, ParameterObject$1 | ReferenceObject$1>;
123
+ /**
124
+ * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#request-body-object Request Body Objects}.
125
+ */
126
+ requestBodies?: Record<string, RequestBodyObject$1 | ReferenceObject$1>;
127
+ /**
128
+ * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#response-object Response Objects}.
129
+ */
130
+ responses?: Record<string, ResponseObject$1 | ReferenceObject$1>;
131
+ /**
132
+ * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#schema-object Schema Objects}.
133
+ */
134
+ schemas?: Record<string, SchemaObject$1 | ReferenceObject$1>;
135
+ /**
136
+ * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#security-scheme-object Security Scheme Objects}.
137
+ */
138
+ securitySchemes?: Record<string, SecuritySchemeObject$1 | ReferenceObject$1>;
139
+ }
140
+
141
+ /**
142
+ * Contact information for the exposed API.
143
+ *
144
+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
145
+ *
146
+ * ```yaml
147
+ * name: API Support
148
+ * url: https://www.example.com/support
149
+ * email: support@example.com
150
+ * ```
151
+ */
152
+ interface ContactObject$1 {
153
+ /**
154
+ * The email address of the contact person/organization. This MUST be in the form of an email address.
155
+ */
156
+ email?: string;
157
+ /**
158
+ * The identifying name of the contact person/organization.
159
+ */
160
+ name?: string;
161
+ /**
162
+ * The URL for the contact information. This MUST be in the form of a URL.
163
+ */
164
+ url?: string;
165
+ }
166
+
167
+ /**
168
+ * When request bodies or response payloads may be one of a number of different schemas, a Discriminator Object gives a hint about the expected schema of the document. This hint can be used to aid in serialization, deserialization, and validation. The Discriminator Object does this by implicitly or explicitly associating the possible values of a named property with alternative schemas.
169
+ *
170
+ * Note that `discriminator` MUST NOT change the validation outcome of the schema.
171
+ *
172
+ * **Conditions for Using the Discriminator Object**
173
+ *
174
+ * TODO: content, examples
175
+ */
176
+ interface DiscriminatorObject$1 {
177
+ /**
178
+ * An object to hold mappings between payload values and schema names or URI references.
179
+ */
180
+ mapping?: Record<string, string>;
181
+ /**
182
+ * **REQUIRED**. The name of the property in the payload that will hold the discriminating value. This property SHOULD be required in the payload schema, as the behavior when the property is absent is undefined.
183
+ */
184
+ propertyName: string;
185
+ }
186
+
187
+ /**
188
+ * A single encoding definition applied to a single schema property. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#appendix-b-data-type-conversion Appendix B} for a discussion of converting values of various types to string representations.
189
+ *
190
+ * Properties are correlated with `multipart` parts using the {@link https://www.rfc-editor.org/rfc/rfc7578#section-4.2 `name` parameter} of `Content-Disposition: form-data`, and with `application/x-www-form-urlencoded` using the query string parameter names. In both cases, their order is implementation-defined.
191
+ *
192
+ * See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#appendix-e-percent-encoding-and-form-media-types Appendix E} for a detailed examination of percent-encoding concerns for form media types.
193
+ *
194
+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
195
+ *
196
+ * TODO: default values examples
197
+ * TODO: examples
198
+ */
199
+ interface EncodingObject$1 {
200
+ /**
201
+ * When this is true, parameter values are serialized using reserved expansion, as defined by {@link https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.3 RFC6570}, which allows {@link https://datatracker.ietf.org/doc/html/rfc3986#section-2.2 RFC3986's reserved character set}, as well as percent-encoded triples, to pass through unchanged, while still percent-encoding all other disallowed characters (including `%` outside of percent-encoded triples). Applications are still responsible for percent-encoding reserved characters that are {@link https://datatracker.ietf.org/doc/html/rfc3986#section-3.4 not allowed in the query string} (`[`, `]`, `#`), or have a special meaning in `application/x-www-form-urlencoded` (`-`, `&`, `+`); see Appendices {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#appendix-c-using-rfc6570-based-serialization C} and {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#appendix-e-percent-encoding-and-form-media-types E} for details. The default value is `false`. This field SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded`.
202
+ */
203
+ allowReserved?: boolean;
204
+ /**
205
+ * The `Content-Type` for encoding a specific property. The value is a comma-separated list, each element of which is either a specific media type (e.g. `image/png`) or a wildcard media type (e.g. `image/*`). Default value depends on the property type as shown in the table below.
206
+ */
207
+ contentType?: string;
208
+ /**
209
+ * 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 field has no effect. When {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#encoding-style `style`} is `"form"`, the default value is `true`. For all other styles, the default value is `false`. Note that despite `false` being the default for `deepObject`, the combination of `false` with `deepObject` is undefined. This field SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded`.
210
+ */
211
+ explode?: boolean;
212
+ /**
213
+ * A map allowing additional information to be provided as headers. `Content-Type` is described separately and SHALL be ignored in this section. This field SHALL be ignored if the request body media type is not a `multipart`.
214
+ */
215
+ headers?: Record<string, HeaderObject$1 | ReferenceObject$1>;
216
+ /**
217
+ * 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.0.4.md#parameter-object Parameter Object} for details on the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-style `style`} field. The behavior follows the same values as `query` parameters, including default values. Note that the initial `?` used in query strings is not used in `application/x-www-form-urlencoded` message bodies, and MUST be removed (if using an RFC6570 implementation) or simply not added (if constructing the string manually). This field SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded`.
218
+ */
219
+ style?:
220
+ | 'deepObject'
221
+ | 'form'
222
+ | 'label'
223
+ | 'matrix'
224
+ | 'pipeDelimited'
225
+ | 'simple'
226
+ | 'spaceDelimited';
227
+ }
228
+
229
+ /**
230
+ * An object grouping an internal or external example value with basic `summary` and `description` metadata. This object is typically used in fields named `examples` (plural), and is a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#reference-object referenceable} alternative to older `example` (singular) fields that do not support referencing or metadata.
231
+ *
232
+ * Examples allow demonstration of the usage of properties, parameters and objects within OpenAPI.
233
+ *
234
+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
235
+ *
236
+ * In all cases, the example value SHOULD be compatible with the schema of its associated value. Tooling implementations MAY choose to validate compatibility automatically, and reject the example value(s) if incompatible.
237
+ *
238
+ * TODO: examples
239
+ */
240
+ interface ExampleObject$1 {
241
+ /**
242
+ * Long description for the example. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
243
+ */
244
+ description?: string;
245
+ /**
246
+ * A URL 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.0.4.md#relative-references-in-urls Relative References}.
247
+ */
248
+ externalValue?: string;
249
+ /**
250
+ * Short description for the example.
251
+ */
252
+ summary?: string;
253
+ /**
254
+ * 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.
255
+ */
256
+ value?: unknown;
257
+ }
258
+
259
+ /**
260
+ * Allows referencing an external resource for extended documentation.
261
+ *
262
+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
263
+ *
264
+ * **External Documentation Object Example**
265
+ *
266
+ * ```yaml
267
+ * description: Find more info here
268
+ * url: https://example.com
269
+ * ```
270
+ */
271
+ interface ExternalDocumentationObject$1 {
272
+ /**
273
+ * A description of the target documentation. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
274
+ */
275
+ description?: string;
276
+ /**
277
+ * **REQUIRED**. The URL for the target documentation. This MUST be in the form of a URL.
278
+ */
279
+ url: string;
280
+ }
281
+
282
+ /**
283
+ * Describes a single header for {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#response-headers HTTP responses} and for {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#encoding-headers individual parts in `multipart` representations}; see the relevant {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#response-object Response Object} and {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#encoding-object Encoding Object} documentation for restrictions on which headers can be described.
284
+ *
285
+ * The Header Object follows the structure of the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-object Parameter Object}, including determining its serialization strategy based on whether `schema` or `content` is present, with the following changes:
286
+ * 1. `name` MUST NOT be specified, it is given in the corresponding `headers` map.
287
+ * 1. `in` MUST NOT be specified, it is implicitly in `header`.
288
+ * 1. All traits that are affected by the location MUST be applicable to a location of `header` (for example, {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-style `style`}). This means that `allowEmptyValue` and `allowReserved` MUST NOT be used, and `style`, if used, MUST be limited to `"simple"`.
289
+ *
290
+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
291
+ *
292
+ * TODO: examples
293
+ */
294
+ interface HeaderObject$1 extends Omit<ParameterObject$1, 'in' | 'name'> {}
295
+
296
+ /**
297
+ * 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.
298
+ *
299
+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
300
+ *
301
+ * ```yaml
302
+ * title: Example Pet Store App
303
+ * description: This is an example server for a pet store.
304
+ * termsOfService: https://example.com/terms/
305
+ * contact:
306
+ * name: API Support
307
+ * url: https://www.example.com/support
308
+ * email: support@example.com
309
+ * license:
310
+ * name: Apache 2.0
311
+ * url: https://www.apache.org/licenses/LICENSE-2.0.html
312
+ * version: 1.0.1
313
+ * ```
314
+ */
315
+ interface InfoObject$1 {
316
+ /**
317
+ * The contact information for the exposed API.
318
+ */
319
+ contact?: ContactObject$1;
320
+ /**
321
+ * A description of the API. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
322
+ */
323
+ description?: string;
324
+ /**
325
+ * The license information for the exposed API.
326
+ */
327
+ license?: LicenseObject$1;
328
+ /**
329
+ * A URL for the Terms of Service for the API. This MUST be in the form of a URL.
330
+ */
331
+ termsOfService?: string;
332
+ /**
333
+ * **REQUIRED**. The title of the API.
334
+ */
335
+ title: string;
336
+ /**
337
+ * **REQUIRED**. The version of the OpenAPI Document (which is distinct from the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#oas-version OpenAPI Specification version} or the version of the API being described or the version of the OpenAPI Description).
338
+ */
339
+ version: string;
340
+ }
341
+
342
+ /**
343
+ * License information for the exposed API.
344
+ *
345
+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
346
+ *
347
+ * ```yaml
348
+ * name: Apache 2.0
349
+ * url: https://www.apache.org/licenses/LICENSE-2.0.html
350
+ * ```
351
+ */
352
+ interface LicenseObject$1 {
353
+ /**
354
+ * **REQUIRED**. The license name used for the API.
355
+ */
356
+ name: string;
357
+ /**
358
+ * A URL for the license used for the API. This MUST be in the form of a URL.
359
+ */
360
+ url?: string;
361
+ }
362
+
363
+ /**
364
+ * 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.
365
+ *
366
+ * Unlike _dynamic links_ (i.e. links provided in the response payload), the OAS linking mechanism does not require link information in the runtime response.
367
+ *
368
+ * For computing links and providing instructions to execute them, a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#runtime-expressions runtime expression} is used for accessing values in an operation and using them as parameters while invoking the linked operation.
369
+ *
370
+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
371
+ *
372
+ * A linked operation MUST be identified using either an `operationRef` or `operationId`. The identified or reference operation MUST be unique, and in the case of an `operationId`, it MUST be resolved within the scope of the OpenAPI Description (OAD). Because of the potential for name clashes, the `operationRef` syntax is preferred for multi-document OADs. However, because use of an operation depends on its URL path template in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#paths-object Paths Object}, operations from any {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#path-item-object Path Item Object} that is referenced multiple times within the OAD cannot be resolved unambiguously. In such ambiguous cases, the resulting behavior is implementation-defined and MAY result in an error.
373
+ *
374
+ * Note that it is not possible to provide a constant value to `parameters` that matches the syntax of a runtime expression. It is possible to have ambiguous parameter names, e.g. `name: "id"`, `in: "path"` and `name: "path.id", in: "query"`; this is NOT RECOMMENDED and the behavior is implementation-defined, however implementations SHOULD prefer the qualified interpretation (`path.id` as a path parameter), as the names can always be qualified to disambiguate them (e.g. using `query.path.id` for the query parameter).
375
+ *
376
+ * TODO: examples
377
+ */
378
+ interface LinkObject$1 {
379
+ /**
380
+ * A description of the link. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
381
+ */
382
+ description?: string;
383
+ /**
384
+ * The name of an _existing_, resolvable OAS operation, as defined with a unique `operationId`. This field is mutually exclusive of the `operationRef` field.
385
+ */
386
+ operationId?: string;
387
+ /**
388
+ * A 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.0.4.md#operation-object Operation Object}.
389
+ */
390
+ operationRef?: string;
391
+ /**
392
+ * 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 (optionally qualified with the parameter location, e.g. `path.id` for an `id` parameter in the path), whereas the value can be a constant or an expression to be evaluated and passed to the linked operation.
393
+ */
394
+ parameters?: Record<string, unknown | string>;
395
+ /**
396
+ * A literal value or {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#runtime-expressions {expression}} to use as a request body when calling the target operation.
397
+ */
398
+ requestBody?: unknown | string;
399
+ /**
400
+ * A server object to be used by the target operation.
401
+ */
402
+ server?: ServerObject$1;
403
+ }
404
+
405
+ /**
406
+ * Each Media Type Object provides schema and examples for the media type identified by its key.
407
+ *
408
+ * When `example` or `examples` are provided, the example SHOULD match the specified schema and be in the correct format as specified by the media type and its encoding. The `example` and `examples` fields are mutually exclusive, and if either is present it SHALL _override_ any `example` in the schema. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#working-with-examples Working With Examples} for further guidance regarding the different ways of specifying examples, including non-JSON/YAML values.
409
+ *
410
+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
411
+ *
412
+ * TODO: examples
413
+ */
414
+ interface MediaTypeObject$2 {
415
+ /**
416
+ * 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` field SHALL only apply to {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#request-body-object Request Body Objects}, and only when the media type is `multipart` or `application/x-www-form-urlencoded`. If no Encoding Object is provided for a property, the behavior is determined by the default values documented for the Encoding Object.
417
+ */
418
+ encoding?: Record<string, EncodingObject$1>;
419
+ /**
420
+ * Example of the media type; see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#working-with-examples Working With Examples}.
421
+ */
422
+ example?: unknown;
423
+ /**
424
+ * Examples of the media type; see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#working-with-examples Working With Examples}.
425
+ */
426
+ examples?: Record<string, ExampleObject$1 | ReferenceObject$1>;
427
+ /**
428
+ * The schema defining the content of the request, response, parameter, or header.
429
+ */
430
+ schema?: SchemaObject$1 | ReferenceObject$1;
431
+ }
432
+
433
+ /**
434
+ * Configuration details for a supported OAuth Flow
435
+ *
436
+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
437
+ *
438
+ * TODO: examples
439
+ */
440
+ interface OAuthFlowObject$1 {
441
+ /**
442
+ * **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.
443
+ */
444
+ authorizationUrl: string;
445
+ /**
446
+ * 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.
447
+ */
448
+ refreshUrl?: string;
449
+ /**
450
+ * **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.
451
+ */
452
+ scopes: Record<string, string>;
453
+ /**
454
+ * **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.
455
+ */
456
+ tokenUrl: string;
457
+ }
458
+
459
+ /**
460
+ * Allows configuration of the supported OAuth Flows.
461
+ *
462
+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
463
+ */
464
+ interface OAuthFlowsObject$1 {
465
+ /**
466
+ * Configuration for the OAuth Authorization Code flow. Previously called `accessCode` in OpenAPI 2.0.
467
+ */
468
+ authorizationCode?: OAuthFlowObject$1;
469
+ /**
470
+ * Configuration for the OAuth Client Credentials flow. Previously called `application` in OpenAPI 2.0.
471
+ */
472
+ clientCredentials?: OAuthFlowObject$1;
473
+ /**
474
+ * Configuration for the OAuth Implicit flow
475
+ */
476
+ implicit?: OAuthFlowObject$1;
477
+ /**
478
+ * Configuration for the OAuth Resource Owner Password flow
479
+ */
480
+ password?: OAuthFlowObject$1;
481
+ }
482
+
483
+ /**
484
+ * Describes a single API operation on a path.
485
+ *
486
+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
487
+ *
488
+ * TODO: examples
489
+ */
490
+ interface OperationObject$1 {
491
+ /**
492
+ * 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.0.4.md#callback-object Callback Object} that describes a request that may be initiated by the API provider and the expected responses.
493
+ */
494
+ callbacks?: Record<string, CallbackObject$1 | ReferenceObject$1>;
495
+ /**
496
+ * Declares this operation to be deprecated. Consumers SHOULD refrain from usage of the declared operation. Default value is `false`.
497
+ */
498
+ deprecated?: boolean;
499
+ /**
500
+ * A verbose explanation of the operation behavior. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
501
+ */
502
+ description?: string;
503
+ /**
504
+ * Additional external documentation for this operation.
505
+ */
506
+ externalDocs?: ExternalDocumentationObject$1;
507
+ /**
508
+ * 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.
509
+ */
510
+ operationId?: string;
511
+ /**
512
+ * A list of parameters that are applicable for this operation. If a parameter is already defined in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#path-item-parameters 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.0.4.md#parameter-name name} and {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-in location}. The list can use the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#reference-object Reference Object} to link to parameters that are defined in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#components-parameters OpenAPI Object's `components.parameters`}.
513
+ */
514
+ parameters?: ReadonlyArray<ParameterObject$1 | ReferenceObject$1>;
515
+ /**
516
+ * The request body applicable for this operation. The `requestBody` is only supported in HTTP methods where the HTTP 1.1 specification {@link https://tools.ietf.org/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://tools.ietf.org/html/rfc7231#section-4.3.1 GET}, {@link https://tools.ietf.org/html/rfc7231#section-4.3.2 HEAD} and {@link https://tools.ietf.org/html/rfc7231#section-4.3.5 DELETE}), `requestBody` SHALL be ignored by consumers.
517
+ */
518
+ requestBody?: RequestBodyObject$1 | ReferenceObject$1;
519
+ /**
520
+ * **REQUIRED**. The list of possible responses as they are returned from executing this operation.
521
+ */
522
+ responses: ResponsesObject$1;
523
+ /**
524
+ * 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.0.4.md#oas-security `security`}. To remove a top-level security declaration, an empty array can be used.
525
+ */
526
+ security?: ReadonlyArray<SecurityRequirementObject$1>;
527
+ /**
528
+ * An alternative `servers` array to service this operation. If a `servers` array is specified at the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#path-item-servers Path Item Object} or {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#oas-servers OpenAPI Object} level, it will be overridden by this value.
529
+ */
530
+ servers?: ReadonlyArray<ServerObject$1>;
531
+ /**
532
+ * A short summary of what the operation does.
533
+ */
534
+ summary?: string;
535
+ /**
536
+ * A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier.
537
+ */
538
+ tags?: ReadonlyArray<string>;
539
+ }
540
+
541
+ /**
542
+ * Describes a single operation parameter.
543
+ *
544
+ * A unique parameter is defined by a combination of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-name name} and {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-in location}.
545
+ *
546
+ * See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#appendix-e-percent-encoding-and-form-media-types Appendix E} for a detailed examination of percent-encoding concerns, including interactions with the `application/x-www-form-urlencoded` query string format.
547
+ *
548
+ * **Parameter Locations**
549
+ *
550
+ * There are four possible parameter locations specified by the `in` field:
551
+ *
552
+ * - path - Used together with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#path-templating Path Templating}, where the parameter value is actually part of the operation's URL. This does not include the host or base path of the API. For example, in `/items/{itemId}`, the path parameter is `itemId`.
553
+ * - query - Parameters that are appended to the URL. For example, in `/items?id=###`, the query parameter is `id`.
554
+ * - header - Custom headers that are expected as part of the request. Note that {@link https://tools.ietf.org/html/rfc7230#section-3.2 RFC7230} states header names are case insensitive.
555
+ * - cookie - Used to pass a specific cookie value to the API.
556
+ *
557
+ * **Fixed Fields**
558
+ *
559
+ * The rules for serialization of the parameter are specified in one of two ways. Parameter Objects MUST include either a `content` field or a `schema` field, but not both. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#appendix-b-data-type-conversion Appendix B} for a discussion of converting values of various types to string representations.
560
+ *
561
+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
562
+ *
563
+ * Note that while `"Cookie"` as a `name` is not forbidden if `in` is `"header"`, the effect of defining a cookie parameter that way is undefined; use `in: "cookie"` instead.
564
+ *
565
+ * **Fixed Fields for use with schema**
566
+ *
567
+ * For simpler scenarios, a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-schema `schema`} and {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-style `style`} can describe the structure and syntax of the parameter. When `example` or `examples` are provided in conjunction with the `schema` field, the example SHOULD match the specified schema and follow the prescribed serialization strategy for the parameter. The `example` and `examples` fields are mutually exclusive, and if either is present it SHALL _override_ any `example` in the schema.
568
+ *
569
+ * Serializing with `schema` is NOT RECOMMENDED for `in: "cookie"` parameters, `in: "header"` parameters that use HTTP header parameters (name=value pairs following a `;`) in their values, or `in: "header"` parameters where values might have non-URL-safe characters; see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#appendix-d-serializing-headers-and-cookies Appendix D} for details.
570
+ *
571
+ * See also {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#appendix-c-using-rfc6570-based-serialization Appendix C: Using RFC6570-Based Serialization} for additional guidance.
572
+ *
573
+ * **Fixed Fields for use with `content`**
574
+ *
575
+ * For more complex scenarios, the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-content `content`} field can define the media type and schema of the parameter, as well as give examples of its use. Using `content` with a `text/plain` media type is RECOMMENDED for `in: "header"` and `in: "cookie"` parameters where the `schema` strategy is not appropriate.
576
+ *
577
+ * **Style Values**
578
+ *
579
+ * In order to support common ways of serializing simple parameters, a set of `style` values are defined.
580
+ *
581
+ * See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#appendix-e-percent-encoding-and-form-media-types Appendix E} for a discussion of percent-encoding, including when delimiters need to be percent-encoded and options for handling collisions with percent-encoded data.
582
+ *
583
+ * TODO: examples
584
+ */
585
+ interface ParameterObject$1 {
586
+ /**
587
+ * If `true`, clients MAY pass a zero-length string value in place of parameters that would otherwise be omitted entirely, which the server SHOULD interpret as the parameter being unused. Default value is `false`. If {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-style `style`} is used, and if {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#style-examples behavior is _n/a_ (cannot be serialized)}, the value of `allowEmptyValue` SHALL be ignored. Interactions between this field and the parameter's {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#schema-object Schema Object} are implementation-defined. This field is valid only for `query` parameters. Use of this field is NOT RECOMMENDED, and it is likely to be removed in a later revision.
588
+ */
589
+ allowEmptyValue?: boolean;
590
+ /**
591
+ * When this is true, parameter values are serialized using reserved expansion, as defined by {@link https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.3 RFC6570}, which allows {@link https://datatracker.ietf.org/doc/html/rfc3986#section-2.2 RFC3986's reserved character set}, as well as percent-encoded triples, to pass through unchanged, while still percent-encoding all other disallowed characters (including `%` outside of percent-encoded triples). Applications are still responsible for percent-encoding reserved characters that are {@link https://datatracker.ietf.org/doc/html/rfc3986#section-3.4 not allowed in the query string} (`[`, `]`, `#`), or have a special meaning in `application/x-www-form-urlencoded` (`-`, `&`, `+`); see Appendices {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#appendix-c-using-rfc6570-based-serialization C} and {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#appendix-e-percent-encoding-and-form-media-types E} for details. This field only applies to parameters with an `in` value of `query`. The default value is `false`.
592
+ */
593
+ allowReserved?: boolean;
594
+ /**
595
+ * 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.
596
+ */
597
+ content?: Record<string, MediaTypeObject$2>;
598
+ /**
599
+ * Specifies that a parameter is deprecated and SHOULD be transitioned out of usage. Default value is `false`.
600
+ */
601
+ deprecated?: boolean;
602
+ /**
603
+ * 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.
604
+ */
605
+ description?: string;
606
+ /**
607
+ * Example of the parameter's potential value; see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#working-with-examples Working With Examples}.
608
+ */
609
+ example?: unknown;
610
+ /**
611
+ * Examples of the parameter's potential value; see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#working-with-examples Working With Examples}.
612
+ */
613
+ examples?: Record<string, ExampleObject$1 | ReferenceObject$1>;
614
+ /**
615
+ * 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 field has no effect. When {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-style `style`} is `"form"`, the default value is `true`. For all other styles, the default value is `false`. Note that despite `false` being the default for `deepObject`, the combination of `false` with `deepObject` is undefined.
616
+ */
617
+ explode?: boolean;
618
+ /**
619
+ * **REQUIRED**. The location of the parameter. Possible values are `"query"`, `"header"`, `"path"` or `"cookie"`.
620
+ */
621
+ in: 'cookie' | 'header' | 'path' | 'query';
622
+ /**
623
+ * **REQUIRED**. The name of the parameter. Parameter names are _case sensitive_.
624
+ * - If {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-in `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.0.4.md#paths-path path} field in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#paths-object Paths Object}. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#path-templating Path Templating} for further information.
625
+ * - If {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-in `in`} is `"header"` and the `name` field is `"Accept"`, `"Content-Type"` or `"Authorization"`, the parameter definition SHALL be ignored.
626
+ * - 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.0.4.md#parameter-in `in`} field.
627
+ */
628
+ name: string;
629
+ /**
630
+ * Determines whether this parameter is mandatory. If the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-in parameter location} is `"path"`, this field is **REQUIRED** and its value MUST be `true`. Otherwise, the field MAY be included and its default value is `false`.
631
+ */
632
+ required?: boolean;
633
+ /**
634
+ * The schema defining the type used for the parameter.
635
+ */
636
+ schema?: SchemaObject$1 | ReferenceObject$1;
637
+ /**
638
+ * 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"`.
639
+ */
640
+ style?:
641
+ | 'deepObject'
642
+ | 'form'
643
+ | 'label'
644
+ | 'matrix'
645
+ | 'pipeDelimited'
646
+ | 'simple'
647
+ | 'spaceDelimited';
648
+ }
649
+
650
+ /**
651
+ * 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.0.4.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.
652
+ *
653
+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
654
+ *
655
+ * TODO: examples
656
+ */
657
+ interface PathItemObject$1 {
658
+ /**
659
+ * Allows for a referenced definition of this path item. The value MUST be in the form of a URL, and the referenced structure MUST be in the form of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.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.0.4.md#relative-references-in-urls Relative References}.
660
+ */
661
+ $ref?: string;
662
+ /**
663
+ * A definition of a DELETE operation on this path.
664
+ */
665
+ delete?: OperationObject$1;
666
+ /**
667
+ * 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.
668
+ */
669
+ description?: string;
670
+ /**
671
+ * A definition of a GET operation on this path.
672
+ */
673
+ get?: OperationObject$1;
674
+ /**
675
+ * A definition of a HEAD operation on this path.
676
+ */
677
+ head?: OperationObject$1;
678
+ /**
679
+ * A definition of a OPTIONS operation on this path.
680
+ */
681
+ options?: OperationObject$1;
682
+ /**
683
+ * 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.0.4.md#parameter-name name} and {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-in location}. The list can use the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#reference-object Reference Object} to link to parameters that are defined in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#components-parameters OpenAPI Object's `components.parameters`}.
684
+ */
685
+ parameters?: ReadonlyArray<ParameterObject$1 | ReferenceObject$1>;
686
+ /**
687
+ * A definition of a PATCH operation on this path.
688
+ */
689
+ patch?: OperationObject$1;
690
+ /**
691
+ * A definition of a POST operation on this path.
692
+ */
693
+ post?: OperationObject$1;
694
+ /**
695
+ * A definition of a PUT operation on this path.
696
+ */
697
+ put?: OperationObject$1;
698
+ /**
699
+ * An alternative `servers` array to service all operations in this path. If a `servers` array is specified at the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#oas-servers OpenAPI Object} level, it will be overridden by this value.
700
+ */
701
+ servers?: ReadonlyArray<ServerObject$1>;
702
+ /**
703
+ * An optional string summary, intended to apply to all operations in this path.
704
+ */
705
+ summary?: string;
706
+ /**
707
+ * A definition of a TRACE operation on this path.
708
+ */
709
+ trace?: OperationObject$1;
710
+ }
711
+
712
+ /**
713
+ * 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.0.4.md#server-object Server Object} in order to construct the full URL. The Paths Object MAY be empty, due to {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#security-filtering Access Control List (ACL) constraints}.
714
+ *
715
+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
716
+ *
717
+ * TODO: examples
718
+ */
719
+ interface PathsObject$1 {
720
+ /**
721
+ * 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.0.4.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.0.4.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.
722
+ */
723
+ [path: `/${string}`]: PathItemObject$1;
724
+ }
725
+
726
+ /**
727
+ * A simple object to allow referencing other components in the OpenAPI Description, internally and externally.
728
+ *
729
+ * The Reference Object is defined by {@link https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03 JSON Reference} and follows the same structure, behavior and rules.
730
+ *
731
+ * For this specification, reference resolution is accomplished as defined by the JSON Reference specification and not by the JSON Schema specification.
732
+ *
733
+ * This object cannot be extended with additional properties, and any properties added SHALL be ignored.
734
+ *
735
+ * **Reference Object Example**
736
+ *
737
+ * ```yaml
738
+ * $ref: '#/components/schemas/Pet'
739
+ * ```
740
+ *
741
+ * **Relative Schema Document Example**
742
+ *
743
+ * ```yaml
744
+ * $ref: Pet.yaml
745
+ * ```
746
+ *
747
+ * **Relative Documents with Embedded Schema Example**
748
+ *
749
+ * ```yaml
750
+ * $ref: definitions.yaml#/Pet
751
+ * ```
752
+ */
753
+ interface ReferenceObject$1 {
754
+ /**
755
+ * **REQUIRED**. The reference string.
756
+ */
757
+ $ref: string;
758
+ }
759
+
760
+ /**
761
+ * Describes a single request body.
762
+ *
763
+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
764
+ *
765
+ * TODO: examples
766
+ */
767
+ interface RequestBodyObject$1 {
768
+ /**
769
+ * **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/*"`
770
+ */
771
+ content: Record<string, MediaTypeObject$2>;
772
+ /**
773
+ * 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.
774
+ */
775
+ description?: string;
776
+ /**
777
+ * Determines if the request body is required in the request. Defaults to `false`.
778
+ */
779
+ required?: boolean;
780
+ }
781
+
782
+ /**
783
+ * Describes a single response from an API operation, including design-time, static `links` to operations based on the response.
784
+ *
785
+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
786
+ *
787
+ * TODO: examples
788
+ */
789
+ interface ResponseObject$1 {
790
+ /**
791
+ * A map containing descriptions of potential response payloads. 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 responses that match multiple keys, only the most specific key is applicable. e.g. `"text/plain"` overrides `"text/*"`
792
+ */
793
+ content?: Record<string, MediaTypeObject$2>;
794
+ /**
795
+ * **REQUIRED**. A description of the response. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
796
+ */
797
+ description: string;
798
+ /**
799
+ * Maps a header name to its definition. {@link https://tools.ietf.org/html/rfc7230#section-3.2 RFC7230} states header names are case insensitive. If a response header is defined with the name `"Content-Type"`, it SHALL be ignored.
800
+ */
801
+ headers?: Record<string, HeaderObject$1 | ReferenceObject$1>;
802
+ /**
803
+ * 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.0.4.md#components-object Component Objects}.
804
+ */
805
+ links?: Record<string, LinkObject$1 | ReferenceObject$1>;
806
+ }
807
+
808
+ /**
809
+ * A container for the expected responses of an operation. The container maps a HTTP response code to the expected response.
810
+ *
811
+ * The documentation is not necessarily expected to cover all possible HTTP response codes because they may not be known in advance. However, documentation is expected to cover a successful operation response and any known errors.
812
+ *
813
+ * The `default` MAY be used as a default Response Object for all HTTP codes that are not covered individually by the Responses Object.
814
+ *
815
+ * The Responses Object MUST contain at least one response code, and if only one response code is provided it SHOULD be the response for a successful operation call.
816
+ *
817
+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
818
+ *
819
+ * TODO: examples
820
+ */
821
+ interface ResponsesObject$1 {
822
+ /**
823
+ * Any {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.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. A {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#reference-object Reference Object} can link to a response that is defined in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#components-responses OpenAPI Object's `components.responses`} section. 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` and `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.
824
+ */
825
+ [httpStatusCode: string]: ResponseObject$1 | ReferenceObject$1 | undefined;
826
+ /**
827
+ * The documentation of responses other than the ones declared for specific HTTP response codes. Use this field to cover undeclared responses. A {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#reference-object Reference Object} can link to a response that the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#components-responses OpenAPI Object's `components.responses`} section defines.
828
+ */
829
+ default?: ResponseObject$1 | ReferenceObject$1;
830
+ }
831
+
832
+ /**
833
+ * 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 an extended subset of the [[JSON-Schema-05|JSON Schema Specification Draft Wright-00]].
834
+ *
835
+ * For more information about the keywords, see {@link https://tools.ietf.org/html/draft-wright-json-schema-00 JSON Schema Core} and {@link https://tools.ietf.org/html/draft-wright-json-schema-validation-00 JSON Schema Validation}. Unless stated otherwise, the keyword definitions follow those of JSON Schema and do not add any additional semantics.
836
+ *
837
+ * **JSON Schema Keywords**
838
+ *
839
+ * The following keywords are taken directly from the JSON Schema definition and follow the same specifications:
840
+ * - title
841
+ * - multipleOf
842
+ * - maximum
843
+ * - exclusiveMaximum
844
+ * - minimum
845
+ * - exclusiveMinimum
846
+ * - maxLength
847
+ * - minLength
848
+ * - pattern (This string SHOULD be a valid regular expression, according to the {@link https://www.ecma-international.org/ecma-262/5.1/#sec-15.10.1 Ecma-262 Edition 5.1 regular expression} dialect)
849
+ * - maxItems
850
+ * - minItems
851
+ * - uniqueItems
852
+ * - maxProperties
853
+ * - minProperties
854
+ * - required
855
+ * - enum
856
+ *
857
+ * The following keywords are taken from the JSON Schema definition but their definitions were adjusted to the OpenAPI Specification.
858
+ *
859
+ * - type - Value MUST be a string. Multiple types via an array are not supported.
860
+ * - allOf - Inline or referenced schema MUST be of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#schema-object Schema Object} and not a standard JSON Schema.
861
+ * - oneOf - Inline or referenced schema MUST be of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#schema-object Schema Object} and not a standard JSON Schema.
862
+ * - anyOf - Inline or referenced schema MUST be of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#schema-object Schema Object} and not a standard JSON Schema.
863
+ * - not - Inline or referenced schema MUST be of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#schema-object Schema Object} and not a standard JSON Schema.
864
+ * - items - Value MUST be an object and not an array. Inline or referenced schema MUST be of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#schema-object Schema Object} and not a standard JSON Schema. `items` MUST be present if `type` is `"array"`.
865
+ * - properties - Property definitions MUST be a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#schema-object Schema Object} and not a standard JSON Schema (inline or referenced).
866
+ * - additionalProperties - Value can be boolean or object. Inline or referenced schema MUST be of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#schema-object Schema Object} and not a standard JSON Schema. Consistent with JSON Schema, `additionalProperties` defaults to `true`.
867
+ * - description - {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
868
+ * - format - See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#data-type-format Data Type Formats} for further details. While relying on JSON Schema's defined formats, the OAS offers a few additional predefined formats.
869
+ * - default - The default value represents what would be assumed by the consumer of the input as the value of the schema if one is not provided. Unlike JSON Schema, the value MUST conform to the defined `type` for the Schema Object defined at the same level. For example, if `type` is `"string"`, then `default` can be `"foo"` but cannot be `1`.
870
+ *
871
+ * Alternatively, any time a Schema Object can be used, a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#reference-object Reference Object} can be used in its place. This allows referencing definitions instead of defining them inline.
872
+ *
873
+ * Additional keywords defined by the JSON Schema specification that are not mentioned here are strictly unsupported.
874
+ *
875
+ * Other than the JSON Schema subset fields, the following fields MAY be used for further schema documentation:
876
+ *
877
+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
878
+ *
879
+ * **Composition and Inheritance (Polymorphism)**
880
+ *
881
+ * TODO: content, examples
882
+ */
883
+ interface SchemaObject$1 extends EnumExtensions {
884
+ /**
885
+ * The value of "additionalProperties" MUST be a boolean or a schema.
886
+ *
887
+ * If "additionalProperties" is absent, it may be considered present with an empty schema as a value.
888
+ *
889
+ * If "additionalProperties" is true, validation always succeeds.
890
+ *
891
+ * If "additionalProperties" is false, validation succeeds only if the instance is an object and all properties on the instance were covered by "properties" and/or "patternProperties".
892
+ *
893
+ * If "additionalProperties" is an object, validate the value as a schema to all of the properties that weren't validated by "properties" nor "patternProperties".
894
+ *
895
+ * Value can be boolean or object. Inline or referenced schema MUST be of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#schema-object Schema Object} and not a standard JSON Schema. Consistent with JSON Schema, `additionalProperties` defaults to `true`.
896
+ */
897
+ additionalProperties?: boolean | SchemaObject$1 | ReferenceObject$1;
898
+ /**
899
+ * This keyword's value MUST be an array. This array MUST have at least one element.
900
+ *
901
+ * Elements of the array MUST be objects. Each object MUST be a valid Schema Object.
902
+ *
903
+ * An instance validates successfully against this keyword if it validates successfully against all schemas defined by this keyword's value.
904
+ */
905
+ allOf?: ReadonlyArray<SchemaObject$1 | ReferenceObject$1>;
906
+ /**
907
+ * This keyword's value MUST be an array. This array MUST have at least one element.
908
+ *
909
+ * Elements of the array MUST be objects. Each object MUST be a valid Schema Object.
910
+ *
911
+ * An instance validates successfully against this keyword if it validates successfully against at least one schema defined by this
912
+ keyword's value.
913
+ */
914
+ anyOf?: ReadonlyArray<SchemaObject$1 | ReferenceObject$1>;
915
+ /**
916
+ * The default value represents what would be assumed by the consumer of the input as the value of the schema if one is not provided. Unlike JSON Schema, the value MUST conform to the defined `type` for the Schema Object defined at the same level. For example, if `type` is `"string"`, then `default` can be `"foo"` but cannot be `1`.
917
+ */
918
+ default?: unknown;
919
+ /**
920
+ * Specifies that a schema is deprecated and SHOULD be transitioned out of usage. Default value is `false`.
921
+ */
922
+ deprecated?: boolean;
923
+ /**
924
+ * The value of both of these keywords MUST be a string.
925
+ *
926
+ * Both of these keywords can be used to decorate a user interface with information about the data produced by this user interface. A title will preferrably be short, whereas a description will provide explanation about the purpose of the instance described by this schema.
927
+ *
928
+ * Both of these keywords MAY be used in root schemas, and in any subschemas.
929
+ */
930
+ description?: string;
931
+ /**
932
+ * Adds support for polymorphism. The discriminator is used to determine which of a set of schemas a payload is expected to satisfy. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#composition-and-inheritance-polymorphism Composition and Inheritance} for more details.
933
+ */
934
+ discriminator?: DiscriminatorObject$1;
935
+ /**
936
+ * The value of this keyword MUST be an array. This array SHOULD have at least one element. Elements in the array SHOULD be unique.
937
+ *
938
+ * Elements in the array MAY be of any type, including null.
939
+ *
940
+ * An instance validates successfully against this keyword if its value is equal to one of the elements in this keyword's array value.
941
+ */
942
+ enum?: ReadonlyArray<unknown>;
943
+ /**
944
+ * A free-form field 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.
945
+ */
946
+ example?: unknown;
947
+ /**
948
+ * The value of "exclusiveMaximum" MUST be a boolean, representing whether the limit in "maximum" is exclusive or not. An undefined value is the same as false.
949
+ *
950
+ * If "exclusiveMaximum" is true, then a numeric instance SHOULD NOT be equal to the value specified in "maximum". If "exclusiveMaximum" is false (or not specified), then a numeric instance MAY be equal to the value of "maximum".
951
+ */
952
+ exclusiveMaximum?: boolean;
953
+ /**
954
+ * The value of "exclusiveMinimum" MUST be a boolean, representing whether the limit in "minimum" is exclusive or not. An undefined value is the same as false.
955
+ *
956
+ * If "exclusiveMinimum" is true, then a numeric instance SHOULD NOT be equal to the value specified in "minimum". If "exclusiveMinimum" is false (or not specified), then a numeric instance MAY be equal to the value of "minimum".
957
+ */
958
+ exclusiveMinimum?: boolean;
959
+ /**
960
+ * Additional external documentation for this schema.
961
+ */
962
+ externalDocs?: ExternalDocumentationObject$1;
963
+ /**
964
+ * While relying on JSON Schema's defined formats, the OAS offers a few additional predefined formats.
965
+ */
966
+ format?: Format;
967
+ /**
968
+ * `items` MUST be present if `type` is `"array"`.
969
+ */
970
+ items?: SchemaObject$1 | ReferenceObject$1;
971
+ /**
972
+ * The value of this keyword MUST be an integer. This integer MUST be greater than, or equal to, 0.
973
+ *
974
+ * An array instance is valid against "maxItems" if its size is less than, or equal to, the value of this keyword.
975
+ */
976
+ maxItems?: number;
977
+ /**
978
+ * The value of this keyword MUST be a non-negative integer.
979
+ *
980
+ * The value of this keyword MUST be an integer. This integer MUST be greater than, or equal to, 0.
981
+ *
982
+ * A string instance is valid against this keyword if its length is less than, or equal to, the value of this keyword.
983
+ *
984
+ * The length of a string instance is defined as the number of its characters as defined by {@link https://datatracker.ietf.org/doc/html/rfc7159 RFC 7159} [RFC7159].
985
+ */
986
+ maxLength?: number;
987
+ /**
988
+ * The value of this keyword MUST be an integer. This integer MUST be greater than, or equal to, 0.
989
+ *
990
+ * An object instance is valid against "maxProperties" if its number of properties is less than, or equal to, the value of this keyword.
991
+ */
992
+ maxProperties?: number;
993
+ /**
994
+ * The value of "maximum" MUST be a number, representing an upper limit for a numeric instance.
995
+ *
996
+ * If the instance is a number, then this keyword validates if "exclusiveMaximum" is true and instance is less than the provided value, or else if the instance is less than or exactly equal to the provided value.
997
+ */
998
+ maximum?: number;
999
+ /**
1000
+ * The value of this keyword MUST be an integer. This integer MUST be greater than, or equal to, 0.
1001
+ *
1002
+ * An array instance is valid against "minItems" if its size is greater than, or equal to, the value of this keyword.
1003
+ *
1004
+ * If this keyword is not present, it may be considered present with a value of 0.
1005
+ */
1006
+ minItems?: number;
1007
+ /**
1008
+ * A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword.
1009
+ *
1010
+ * The length of a string instance is defined as the number of its characters as defined by {@link https://datatracker.ietf.org/doc/html/rfc7159 RFC 7159} [RFC7159].
1011
+ *
1012
+ * The value of this keyword MUST be an integer. This integer MUST be greater than, or equal to, 0.
1013
+ *
1014
+ * "minLength", if absent, may be considered as being present with integer value 0.
1015
+ */
1016
+ minLength?: number;
1017
+ /**
1018
+ * The value of this keyword MUST be an integer. This integer MUST be greater than, or equal to, 0.
1019
+ *
1020
+ * An object instance is valid against "minProperties" if its number of properties is greater than, or equal to, the value of this keyword.
1021
+ *
1022
+ * If this keyword is not present, it may be considered present with a value of 0.
1023
+ */
1024
+ minProperties?: number;
1025
+ /**
1026
+ * The value of "minimum" MUST be a number, representing a lower limit for a numeric instance.
1027
+ *
1028
+ * If the instance is a number, then this keyword validates if "exclusiveMinimum" is true and instance is greater than the provided value, or else if the instance is greater than or exactly equal to the provided value.
1029
+ */
1030
+ minimum?: number;
1031
+ /**
1032
+ * The value of "multipleOf" MUST be a number, strictly greater than 0.
1033
+ *
1034
+ * A numeric instance is only valid if division by this keyword's value results in an integer.
1035
+ */
1036
+ multipleOf?: number;
1037
+ /**
1038
+ * This keyword's value MUST be an object. This object MUST be a valid Schema Object.
1039
+ *
1040
+ * An instance is valid against this keyword if it fails to validate successfully against the schema defined by this keyword.
1041
+ */
1042
+ not?: SchemaObject$1 | ReferenceObject$1;
1043
+ /**
1044
+ * This keyword only takes effect if `type` is explicitly defined within the same Schema Object. A `true` value indicates that both `null` values and values of the type specified by `type` are allowed. Other Schema Object constraints retain their defined behavior, and therefore may disallow the use of `null` as a value. A `false` value leaves the specified or default `type` unmodified. The default value is `false`.
1045
+ */
1046
+ nullable?: boolean;
1047
+ /**
1048
+ * This keyword's value MUST be an array. This array MUST have at least one element.
1049
+ *
1050
+ * Elements of the array MUST be objects. Each object MUST be a valid Schema Object.
1051
+ *
1052
+ * An instance validates successfully against this keyword if it validates successfully against exactly one schema defined by this keyword's value.
1053
+ */
1054
+ oneOf?: ReadonlyArray<SchemaObject$1 | ReferenceObject$1>;
1055
+ /**
1056
+ * The value of this keyword MUST be a string. This string SHOULD be a valid regular expression, according to the ECMA 262 regular expression dialect.
1057
+ *
1058
+ * A string instance is considered valid if the regular expression matches the instance successfully. Recall: regular expressions are not implicitly anchored.
1059
+ */
1060
+ pattern?: string;
1061
+ /**
1062
+ * The value of "properties" MUST be an object. Each value of this object MUST be an object, and each object MUST be a valid Schema Object.
1063
+ *
1064
+ * If absent, it can be considered the same as an empty object.
1065
+ */
1066
+ properties?: Record<string, SchemaObject$1 | ReferenceObject$1>;
1067
+ /**
1068
+ * Relevant only for Schema Object `properties` definitions. Declares the property as "read only". This means that it MAY be sent as part of a response but SHOULD NOT be sent as part of the request. If the property is marked as `readOnly` being `true` and is in the `required` list, the `required` will take effect on the response only. A property MUST NOT be marked as both `readOnly` and `writeOnly` being `true`. Default value is `false`.
1069
+ */
1070
+ readOnly?: boolean;
1071
+ /**
1072
+ * The value of this keyword MUST be an array. This array MUST have at least one element. Elements of this array MUST be strings, and MUST be unique.
1073
+ *
1074
+ * An object instance is valid against this keyword if its property set contains all elements in this keyword's array value.
1075
+ */
1076
+ required?: ReadonlyArray<string>;
1077
+ /**
1078
+ * The value of both of these keywords MUST be a string.
1079
+ *
1080
+ * Both of these keywords can be used to decorate a user interface with information about the data produced by this user interface. A title will preferrably be short, whereas a description will provide explanation about the purpose of the instance described by this schema.
1081
+ *
1082
+ * Both of these keywords MAY be used in root schemas, and in any subschemas.
1083
+ */
1084
+ title?: string;
1085
+ /**
1086
+ * The value of this keyword MUST be a string.
1087
+ *
1088
+ * An instance matches successfully if its primitive type is one of the types defined by keyword. Recall: "number" includes "integer".
1089
+ */
1090
+ type?: 'array' | 'boolean' | 'integer' | 'number' | 'object' | 'string';
1091
+ /**
1092
+ * The value of this keyword MUST be a boolean.
1093
+ *
1094
+ * If this keyword has boolean value false, the instance validates successfully. If it has boolean value true, the instance validates successfully if all of its elements are unique.
1095
+ *
1096
+ * If not present, this keyword may be considered present with boolean value false.
1097
+ */
1098
+ uniqueItems?: boolean;
1099
+ /**
1100
+ * Relevant only for Schema Object `properties` definitions. Declares the property as "write only". Therefore, it MAY be sent as part of a request but SHOULD NOT be sent as part of the response. If the property is marked as `writeOnly` being `true` and is in the `required` list, the `required` will take effect on the request only. A property MUST NOT be marked as both `readOnly` and `writeOnly` being `true`. Default value is `false`.
1101
+ */
1102
+ writeOnly?: boolean;
1103
+ /**
1104
+ * This MAY be used only on property schemas. It has no effect on root schemas. Adds additional metadata to describe the XML representation of this property.
1105
+ */
1106
+ xml?: XMLObject$1;
1107
+ }
1108
+
1109
+ /**
1110
+ * 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.0.4.md#security-scheme-object Security Schemes} under the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#components-object Components Object}.
1111
+ *
1112
+ * A Security Requirement Object MAY refer to multiple security schemes in which case all schemes MUST be satisfied for a request to be authorized. This enables support for scenarios where multiple query parameters or HTTP headers are required to convey security information.
1113
+ *
1114
+ * When the `security` field is defined on the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#openapi-object OpenAPI Object} or {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#operation-object Operation Object} and contains multiple Security Requirement Objects, only one of the entries in the list needs to be satisfied to authorize the request. This enables support for scenarios where the API allows multiple, independent security schemes.
1115
+ *
1116
+ * An empty Security Requirement Object (`{}`) indicates anonymous access is supported.
1117
+ *
1118
+ * TODO: examples
1119
+ */
1120
+ interface SecurityRequirementObject$1 {
1121
+ /**
1122
+ * Each name MUST correspond to a security scheme which is declared in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#security-scheme-object Security Schemes} under the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.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 MUST be empty.
1123
+ */
1124
+ [name: string]: ReadonlyArray<string>;
1125
+ }
1126
+
1127
+ /**
1128
+ * Defines a security scheme that can be used by the operations.
1129
+ *
1130
+ * Supported schemes are HTTP authentication, an API key (either as a header, a cookie parameter, or as a query parameter), OAuth2's common flows (implicit, password, client credentials, and authorization code) as defined in {@link https://tools.ietf.org/html/rfc6749 RFC6749}, and [[OpenID-Connect-Core]]. Please note that as of 2020, the implicit flow is about to be deprecated by {@link https://tools.ietf.org/html/draft-ietf-oauth-security-topics OAuth 2.0 Security Best Current Practice}. Recommended for most use cases is Authorization Code Grant flow with PKCE.
1131
+ *
1132
+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
1133
+ *
1134
+ * TODO: examples
1135
+ */
1136
+ type SecuritySchemeObject$1 = {
1137
+ /**
1138
+ * A description for security scheme. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
1139
+ */
1140
+ description?: string;
1141
+ } & (
1142
+ | {
1143
+ /**
1144
+ * **REQUIRED**. The location of the API key. Valid values are `"query"`, `"header"`, or `"cookie"`.
1145
+ */
1146
+ in: 'cookie' | 'header' | 'query';
1147
+ /**
1148
+ * **REQUIRED**. The name of the header, query or cookie parameter to be used.
1149
+ */
1150
+ name: string;
1151
+ /**
1152
+ * **REQUIRED**. The type of the security scheme. Valid values are `"apiKey"`, `"http"`, `"oauth2"`, `"openIdConnect"`.
1153
+ */
1154
+ type: 'apiKey';
1155
+ }
1156
+ | {
1157
+ /**
1158
+ * 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.
1159
+ */
1160
+ bearerFormat?: string;
1161
+ /**
1162
+ * **REQUIRED**. The name of the HTTP Authentication 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}. The value is case-insensitive, as defined in {@link https://datatracker.ietf.org/doc/html/rfc7235#section-2.1 RFC7235}.
1163
+ */
1164
+ scheme: string;
1165
+ /**
1166
+ * **REQUIRED**. The type of the security scheme. Valid values are `"apiKey"`, `"http"`, `"oauth2"`, `"openIdConnect"`.
1167
+ */
1168
+ type: 'http';
1169
+ }
1170
+ | {
1171
+ /**
1172
+ * **REQUIRED**. An object containing configuration information for the flow types supported.
1173
+ */
1174
+ flows: OAuthFlowsObject$1;
1175
+ /**
1176
+ * **REQUIRED**. The type of the security scheme. Valid values are `"apiKey"`, `"http"`, `"oauth2"`, `"openIdConnect"`.
1177
+ */
1178
+ type: 'oauth2';
1179
+ }
1180
+ | {
1181
+ /**
1182
+ * **REQUIRED**. {@link https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfig Well-known URL} to discover the [[OpenID-Connect-Discovery]] {@link https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata provider metadata}.
1183
+ */
1184
+ openIdConnectUrl: string;
1185
+ /**
1186
+ * **REQUIRED**. The type of the security scheme. Valid values are `"apiKey"`, `"http"`, `"oauth2"`, `"openIdConnect"`.
1187
+ */
1188
+ type: 'openIdConnect';
1189
+ }
1190
+ );
1191
+
1192
+ /**
1193
+ * An object representing a Server.
1194
+ *
1195
+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
1196
+ *
1197
+ * TODO: examples
1198
+ */
1199
+ interface ServerObject$1 {
1200
+ /**
1201
+ * An optional string describing the host designated by the URL. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
1202
+ */
1203
+ description?: string;
1204
+ /**
1205
+ * **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 document containing the Server Object is being served. Variable substitutions will be made when a variable is named in `{`braces`}`.
1206
+ */
1207
+ url: string;
1208
+ /**
1209
+ * A map between a variable name and its value. The value is used for substitution in the server's URL template.
1210
+ */
1211
+ variables?: Record<string, ServerVariableObject$1>;
1212
+ }
1213
+
1214
+ /**
1215
+ * An object representing a Server Variable for server URL template substitution.
1216
+ *
1217
+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
1218
+ */
1219
+ interface ServerVariableObject$1 {
1220
+ /**
1221
+ * **REQUIRED**. The default value to use for substitution, which SHALL be sent if an alternate value is _not_ supplied. If the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#server-variable-enum `enum`} is defined, the value SHOULD exist in the enum's values. Note that this behavior is different from the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#schema-object Schema Object}'s `default` keyword, which documents the receiver's behavior rather than inserting the value into the data.
1222
+ */
1223
+ default: string;
1224
+ /**
1225
+ * An optional description for the server variable. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
1226
+ */
1227
+ description?: string;
1228
+ /**
1229
+ * An enumeration of string values to be used if the substitution options are from a limited set. The array SHOULD NOT be empty.
1230
+ */
1231
+ enum?: ReadonlyArray<string>;
1232
+ }
1233
+
1234
+ /**
1235
+ * Adds metadata to a single tag that is used by the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#operation-object Operation Object}. It is not mandatory to have a Tag Object per tag defined in the Operation Object instances.
1236
+ *
1237
+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
1238
+ *
1239
+ * **Tag Object Example**
1240
+ *
1241
+ * ```yaml
1242
+ * name: pet
1243
+ * description: Pets operations
1244
+ * ```
1245
+ */
1246
+ interface TagObject$1 {
1247
+ /**
1248
+ * A description for the tag. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
1249
+ */
1250
+ description?: string;
1251
+ /**
1252
+ * Additional external documentation for this tag.
1253
+ */
1254
+ externalDocs?: ExternalDocumentationObject$1;
1255
+ /**
1256
+ * **REQUIRED**. The name of the tag.
1257
+ */
1258
+ name: string;
1259
+ }
1260
+
1261
+ /**
1262
+ * A metadata object that allows for more fine-tuned XML model definitions.
1263
+ *
1264
+ * When using arrays, XML element names are _not_ inferred (for singular/plural forms) and the `name` field SHOULD be used to add that information. See examples for expected behavior.
1265
+ *
1266
+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
1267
+ *
1268
+ * The `namespace` field is intended to match the syntax of {@link https://www.w3.org/TR/xml-names11/ XML namespaces}, although there are a few caveats:
1269
+ * - Version 3.0.3 and earlier of this specification erroneously used the term "absolute URI" instead of "non-relative URI", so authors using namespaces that include a fragment should check tooling support carefully.
1270
+ * - XML allows but discourages relative URI-references, while this specification outright forbids them.
1271
+ * - XML 1.1 allows IRIs ({@link https://datatracker.ietf.org/doc/html/rfc3987 RFC3987}) as namespaces, and specifies that namespaces are compared without any encoding or decoding, which means that IRIs encoded to meet this specification's URI syntax requirement cannot be compared to IRIs as-is.
1272
+ *
1273
+ * TODO: examples
1274
+ */
1275
+ interface XMLObject$1 {
1276
+ /**
1277
+ * Declares whether the property definition translates to an attribute instead of an element. Default value is `false`.
1278
+ */
1279
+ attribute?: boolean;
1280
+ /**
1281
+ * 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 if and only if `wrapped` is `true`. If `wrapped` is `false`, it will be ignored.
1282
+ */
1283
+ name?: string;
1284
+ /**
1285
+ * The URI of the namespace definition. Value MUST be in the form of a non-relative URI.
1286
+ */
1287
+ namespace?: string;
1288
+ /**
1289
+ * The prefix to be used for the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#xml-name name}.
1290
+ */
1291
+ prefix?: string;
1292
+ /**
1293
+ * 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`).
1294
+ */
1295
+ wrapped?: boolean;
1296
+ }
1297
+
1298
+ type JsonSchemaFormats$1 =
1299
+ | 'date-time'
1300
+ | 'email'
1301
+ | 'hostname'
1302
+ | 'ipv4'
1303
+ | 'ipv6'
1304
+ | 'uri'
1305
+ | 'uriref';
1306
+
1307
+ type OpenApiSchemaFormats =
1308
+ | 'int32'
1309
+ | 'int64'
1310
+ | 'float'
1311
+ | 'double'
1312
+ | 'byte'
1313
+ | 'binary'
1314
+ | 'date'
1315
+ | 'date-time'
1316
+ | 'password';
1317
+
1318
+ type Format =
1319
+ | JsonSchemaFormats$1
1320
+ | OpenApiSchemaFormats
1321
+ // eslint-disable-next-line @typescript-eslint/ban-types
1322
+ | (string & {});
1323
+
39
1324
  interface OpenApiSchemaExtensions {
40
1325
  /**
41
1326
  * 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.
@@ -424,11 +1709,11 @@ type JsonSchemaTypes =
424
1709
  *
425
1710
  * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.
426
1711
  */
427
- interface OpenApiV3_1_0 {
1712
+ interface OpenApiV3_1_X {
428
1713
  /**
429
1714
  * An element to hold various schemas for the document.
430
1715
  */
431
- components?: ComponentsObject$1;
1716
+ components?: ComponentsObject;
432
1717
  /**
433
1718
  * Additional external documentation.
434
1719
  */
@@ -644,7 +1929,7 @@ interface CallbackObject {
644
1929
  * read:pets: read your pets
645
1930
  * ```
646
1931
  */
647
- interface ComponentsObject$1 {
1932
+ interface ComponentsObject {
648
1933
  /**
649
1934
  * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#callback-object Callback Objects}.
650
1935
  */
@@ -912,7 +2197,14 @@ interface EncodingObject {
912
2197
  /**
913
2198
  * 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.
914
2199
  */
915
- style?: string;
2200
+ style?:
2201
+ | 'deepObject'
2202
+ | 'form'
2203
+ | 'label'
2204
+ | 'matrix'
2205
+ | 'pipeDelimited'
2206
+ | 'simple'
2207
+ | 'spaceDelimited';
916
2208
  }
917
2209
 
918
2210
  /**
@@ -2041,7 +3333,7 @@ interface ResponsesObject {
2041
3333
  /**
2042
3334
  * 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.
2043
3335
  */
2044
- [statusCode: string]: ResponseObject | ReferenceObject | undefined;
3336
+ [httpStatusCode: string]: ResponseObject | ReferenceObject | undefined;
2045
3337
  /**
2046
3338
  * The documentation of responses other than the ones declared for specific HTTP response codes. Use this field to cover undeclared responses.
2047
3339
  */
@@ -2516,7 +3808,12 @@ interface Config$8 extends PluginName<'@hey-api/schemas'> {
2516
3808
  */
2517
3809
  nameBuilder?: (
2518
3810
  name: string,
2519
- schema: OpenApiSchema | OpenApiSchema$1 | SchemaObject,
3811
+ schema:
3812
+ | OpenApiSchema
3813
+ | OpenApiSchema$1
3814
+ | ReferenceObject$1
3815
+ | SchemaObject$1
3816
+ | SchemaObject,
2520
3817
  ) => string;
2521
3818
  /**
2522
3819
  * Name of the generated file.
@@ -2640,6 +3937,7 @@ interface IRSchemaObject
2640
3937
  | 'array'
2641
3938
  | 'boolean'
2642
3939
  | 'enum'
3940
+ | 'never'
2643
3941
  | 'null'
2644
3942
  | 'number'
2645
3943
  | 'object'
@@ -3301,26 +4599,6 @@ interface Client extends Omit<Client$1, 'operations'> {
3301
4599
  services: Service[];
3302
4600
  }
3303
4601
 
3304
- /**
3305
- * This is the root object of the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#openapi-description OpenAPI Description}.
3306
- *
3307
- * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
3308
- */
3309
- interface OpenApiV3_0_0 {
3310
- /**
3311
- * An element to hold various Objects for the OpenAPI Description.
3312
- */
3313
- components?: ComponentsObject;
3314
- /**
3315
- * **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.
3316
- */
3317
- openapi: '3.0.0' | '3.0.1' | '3.0.2' | '3.0.3' | '3.0.4';
3318
- // TODO
3319
- }
3320
-
3321
- // TODO
3322
- interface ComponentsObject {}
3323
-
3324
4602
  /**
3325
4603
  * Generate the OpenAPI client. This method will read the OpenAPI specification and based on the
3326
4604
  * given language it will generate the client, including the typed models, validation schemas,
@@ -3337,4 +4615,4 @@ declare const _default: {
3337
4615
  defineConfig: (config: UserConfig) => UserConfig;
3338
4616
  };
3339
4617
 
3340
- export { type OpenApiV3_0_0, type OpenApiV3_1_0, type UserConfig, createClient, _default as default, defineConfig };
4618
+ export { type OpenApiV3_0_X, type OpenApiV3_1_X, type UserConfig, createClient, _default as default, defineConfig };