···11+/**
22+ * This is the root object of the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#openapi-document OpenAPI document}.
33+ *
44+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.
55+ */
66+export interface OpenApiV3_1 {
77+ /**
88+ * An element to hold various schemas for the document.
99+ */
1010+ components?: any;
1111+ /**
1212+ * Additional external documentation.
1313+ */
1414+ externalDocs?: ExternalDocumentationObject;
1515+ /**
1616+ * **REQUIRED**. Provides metadata about the API. The metadata MAY be used by tooling as required.
1717+ */
1818+ info: InfoObject;
1919+ /**
2020+ * The default value for the `$schema` keyword within {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#schema-object Schema Objects} contained within this OAS document. This MUST be in the form of a URI.
2121+ */
2222+ jsonSchemaDialect?: string;
2323+ /**
2424+ * **REQUIRED**. This string MUST be the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#versions version number} of the OpenAPI Specification that the OpenAPI document uses. The `openapi` field SHOULD be used by tooling to interpret the OpenAPI document. This is _not_ related to the API {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#infoVersion info.version} string.
2525+ */
2626+ openapi: '3.1.0';
2727+ /**
2828+ * The available paths and operations for the API.
2929+ */
3030+ paths?: any;
3131+ /**
3232+ * A declaration of which security mechanisms can be used across the API. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. Individual operations can override this definition. To make security optional, an empty security requirement (`{}`) can be included in the array.
3333+ */
3434+ security?: ReadonlyArray<SecurityRequirementObject>;
3535+ /**
3636+ * An array of Server Objects, which provide connectivity information to a target server. If the `servers` property is not provided, or is an empty array, the default value would be a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#server-object Server Object} with a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#serverUrl url} value of `/`.
3737+ */
3838+ servers?: ReadonlyArray<ServerObject>;
3939+ /**
4040+ * A list of tags used by the document with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#operation-object Operation Object} must be declared. The tags that are not declared MAY be organized randomly or based on the tools' logic. Each tag name in the list MUST be unique.
4141+ */
4242+ tags?: ReadonlyArray<TagObject>;
4343+ /**
4444+ * The incoming webhooks that MAY be received as part of this API and that the API consumer MAY choose to implement. Closely related to the `callbacks` feature, this section describes requests initiated other than by an API call, for example by an out of band registration. The key name is a unique string to refer to each webhook, while the (optionally referenced) Path Item Object describes a request that may be initiated by the API provider and the expected responses. An {@link https://github.com/OAI/OpenAPI-Specification/blob/main/examples/v3.1/webhook-example.yaml example} is available.
4545+ */
4646+ webhooks?: Record<string, PathItemObject | ReferenceObject>;
4747+}
4848+4949+/**
5050+ * Allows referencing an external resource for extended documentation.
5151+ *
5252+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.
5353+ *
5454+ * @example
5555+ * ```yaml
5656+ * description: Find more info here
5757+ * url: https://example.com
5858+ * ```
5959+ */
6060+interface ExternalDocumentationObject {
6161+ /**
6262+ * A description of the target documentation. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
6363+ */
6464+ description?: string;
6565+ /**
6666+ * **REQUIRED**. The URL for the target documentation. This MUST be in the form of a URL.
6767+ */
6868+ url: string;
6969+}
7070+7171+/**
7272+ * The Header Object follows the structure of the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameter-object Parameter Object} with the following changes:
7373+ *
7474+ * 1. `name` MUST NOT be specified, it is given in the corresponding `headers` map.
7575+ * 1. `in` MUST NOT be specified, it is implicitly in `header`.
7676+ * 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.1.0.md#parameterStyle `style`}).
7777+ *
7878+ * @example
7979+ * ```yaml
8080+ * description: The number of allowed requests in the current period
8181+ * schema:
8282+ * type: integer
8383+ * ```
8484+ */
8585+interface HeaderObject extends Omit<ParameterObject, 'in' | 'name'> {}
8686+8787+/**
8888+ * 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.
8989+ *
9090+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.
9191+ *
9292+ * @example
9393+ * ```yaml
9494+ * title: Sample Pet Store App
9595+ * summary: A pet store manager.
9696+ * description: This is a sample server for a pet store.
9797+ * termsOfService: https://example.com/terms/
9898+ * contact:
9999+ * name: API Support
100100+ * url: https://www.example.com/support
101101+ * email: support@example.com
102102+ * license:
103103+ * name: Apache 2.0
104104+ * url: https://www.apache.org/licenses/LICENSE-2.0.html
105105+ * version: 1.0.1
106106+ * ```
107107+ */
108108+interface InfoObject {
109109+ /**
110110+ * The contact information for the exposed API.
111111+ */
112112+ contact?: ContactObject;
113113+ /**
114114+ * A description of the API. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
115115+ */
116116+ description?: string;
117117+ /**
118118+ * The license information for the exposed API.
119119+ */
120120+ license?: LicenseObject;
121121+ /**
122122+ * A short summary of the API.
123123+ */
124124+ summary?: string;
125125+ /**
126126+ * A URL to the Terms of Service for the API. This MUST be in the form of a URL.
127127+ */
128128+ termsOfService?: string;
129129+ /**
130130+ * **REQUIRED**. The title of the API.
131131+ */
132132+ title: string;
133133+ /**
134134+ * **REQUIRED**. The version of the OpenAPI document (which is distinct from the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#oasVersion OpenAPI Specification version} or the API implementation version).
135135+ */
136136+ version: string;
137137+}
138138+139139+/**
140140+ * Contact information for the exposed API.
141141+ *
142142+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.
143143+ *
144144+ * @example
145145+ * ```yaml
146146+ * name: API Support
147147+ * url: https://www.example.com/support
148148+ * email: support@example.com
149149+ * ```
150150+ */
151151+interface ContactObject {
152152+ /**
153153+ * The email address of the contact person/organization. This MUST be in the form of an email address.
154154+ */
155155+ email?: string;
156156+ /**
157157+ * The identifying name of the contact person/organization.
158158+ */
159159+ name?: string;
160160+ /**
161161+ * The URL pointing to the contact information. This MUST be in the form of a URL.
162162+ */
163163+ url?: string;
164164+}
165165+166166+/**
167167+ * License information for the exposed API.
168168+ *
169169+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.
170170+ *
171171+ * @example
172172+ * ```yaml
173173+ * name: Apache 2.0
174174+ * identifier: Apache-2.0
175175+ * ```
176176+ */
177177+interface LicenseObject {
178178+ /**
179179+ * An {@link https://spdx.org/licenses/ SPDX} license expression for the API. The `identifier` field is mutually exclusive of the `url` field.
180180+ */
181181+ identifier?: string;
182182+ /**
183183+ * **REQUIRED**. The license name used for the API.
184184+ */
185185+ name: string;
186186+ /**
187187+ * A URL to the license used for the API. This MUST be in the form of a URL. The `url` field is mutually exclusive of the `identifier` field.
188188+ */
189189+ url?: string;
190190+}
191191+192192+/**
193193+ * Each Media Type Object provides schema and examples for the media type identified by its key.
194194+ *
195195+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.
196196+ *
197197+ * @example
198198+ * ```yaml
199199+ * application/json:
200200+ * schema:
201201+ * $ref: "#/components/schemas/Pet"
202202+ * examples:
203203+ * cat:
204204+ * summary: An example of a cat
205205+ * value:
206206+ * name: Fluffy
207207+ * petType: Cat
208208+ * color: White
209209+ * gender: male
210210+ * breed: Persian
211211+ * dog:
212212+ * summary: An example of a dog with a cat's name
213213+ * value:
214214+ * name: Puma
215215+ * petType: Dog
216216+ * color: Black
217217+ * gender: Female
218218+ * breed: Mixed
219219+ * frog:
220220+ * $ref: "#/components/examples/frog-example"
221221+ * ```
222222+ */
223223+interface MediaTypeObject {
224224+ /**
225225+ * A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. The encoding object SHALL only apply to `requestBody` objects when the media type is `multipart` or `application/x-www-form-urlencoded`.
226226+ */
227227+ encoding?: Record<string, any>;
228228+ /**
229229+ * Example of the media type. The example object SHOULD be in the correct format as specified by the media type. The `example` field is mutually exclusive of the `examples` field. Furthermore, if referencing a `schema` which contains an example, the `example` value SHALL _override_ the example provided by the schema.
230230+ */
231231+ example?: unknown;
232232+ /**
233233+ * Examples of the media type. Each example object SHOULD match the media type and specified schema if present. The `examples` field is mutually exclusive of the `example` field. Furthermore, if referencing a `schema` which contains an example, the `examples` value SHALL _override_ the example provided by the schema.
234234+ */
235235+ examples?: Record<string, any | ReferenceObject>;
236236+ /**
237237+ * The schema defining the content of the request, response, or parameter.
238238+ */
239239+ schema?: any;
240240+}
241241+242242+/**
243243+ * Describes a single API operation on a path.
244244+ *
245245+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.
246246+ *
247247+ * @example
248248+ * ```yaml
249249+ * tags:
250250+ * - pet
251251+ * summary: Updates a pet in the store with form data
252252+ * operationId: updatePetWithForm
253253+ * parameters:
254254+ * - name: petId
255255+ * in: path
256256+ * description: ID of pet that needs to be updated
257257+ * required: true
258258+ * schema:
259259+ * type: string
260260+ * requestBody:
261261+ * content:
262262+ * 'application/x-www-form-urlencoded':
263263+ * schema:
264264+ * type: object
265265+ * properties:
266266+ * name:
267267+ * description: Updated name of the pet
268268+ * type: string
269269+ * status:
270270+ * description: Updated status of the pet
271271+ * type: string
272272+ * required:
273273+ * - status
274274+ * responses:
275275+ * '200':
276276+ * description: Pet updated.
277277+ * content:
278278+ * 'application/json': {}
279279+ * 'application/xml': {}
280280+ * '405':
281281+ * description: Method Not Allowed
282282+ * content:
283283+ * 'application/json': {}
284284+ * 'application/xml': {}
285285+ * security:
286286+ * - petstore_auth:
287287+ * - write:pets
288288+ * - read:pets
289289+ * ```
290290+ */
291291+interface OperationObject {
292292+ /**
293293+ * A map of possible out-of band callbacks related to the parent operation. The key is a unique identifier for the Callback Object. Each value in the map is a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#callback-object Callback Object} that describes a request that may be initiated by the API provider and the expected responses.
294294+ */
295295+ callbacks?: Record<string, any | ReferenceObject>;
296296+ /**
297297+ * Declares this operation to be deprecated. Consumers SHOULD refrain from usage of the declared operation. Default value is `false`.
298298+ */
299299+ deprecated?: boolean;
300300+ /**
301301+ * A verbose explanation of the operation behavior. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
302302+ */
303303+ description?: string;
304304+ /**
305305+ * Additional external documentation for this operation.
306306+ */
307307+ externalDocs?: ExternalDocumentationObject;
308308+ /**
309309+ * 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.
310310+ */
311311+ operationId?: string;
312312+ /**
313313+ * A list of parameters that are applicable for this operation. If a parameter is already defined at the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#pathItemParameters Path Item}, the new definition will override it but can never remove it. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterName name} and {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn location}. The list can use the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#reference-object Reference Object} to link to parameters that are defined at the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#componentsParameters OpenAPI Object's components/parameters}.
314314+ */
315315+ parameters?: ReadonlyArray<ParameterObject | ReferenceObject>;
316316+ /**
317317+ * The request body applicable for this operation. The `requestBody` is fully supported in HTTP methods where the HTTP 1.1 specification {@link https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.1 RFC7231} has explicitly defined semantics for request bodies. In other cases where the HTTP spec is vague (such as {@link https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.1 GET}, {@link https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.2 HEAD} and {@link https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.5 DELETE}), `requestBody` is permitted but does not have well-defined semantics and SHOULD be avoided if possible.
318318+ */
319319+ requestBody?: any | ReferenceObject;
320320+ /**
321321+ * The list of possible responses as they are returned from executing this operation.
322322+ */
323323+ responses?: ResponsesObject;
324324+ /**
325325+ * A declaration of which security mechanisms can be used for this operation. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. To make security optional, an empty security requirement (`{}`) can be included in the array. This definition overrides any declared top-level {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#oasSecurity `security`}. To remove a top-level security declaration, an empty array can be used.
326326+ */
327327+ security?: ReadonlyArray<SecurityRequirementObject>;
328328+ /**
329329+ * An alternative `server` array to service this operation. If an alternative `server` object is specified at the Path Item Object or Root level, it will be overridden by this value.
330330+ */
331331+ servers?: ReadonlyArray<ServerObject>;
332332+ /**
333333+ * A short summary of what the operation does.
334334+ */
335335+ summary?: string;
336336+ /**
337337+ * A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier.
338338+ */
339339+ tags?: ReadonlyArray<string>;
340340+}
341341+342342+/**
343343+ * Describes a single operation parameter.
344344+ *
345345+ * A unique parameter is defined by a combination of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterName name} and {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn location}.
346346+ *
347347+ * **Parameter Locations**
348348+ *
349349+ * There are four possible parameter locations specified by the `in` field:
350350+ *
351351+ * - path - Used together with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.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`.
352352+ * - query - Parameters that are appended to the URL. For example, in `/items?id=###`, the query parameter is `id`.
353353+ * - header - Custom headers that are expected as part of the request. Note that {@link https://datatracker.ietf.org/doc/html/rfc7230#page-22 RFC7230} states header names are case insensitive.
354354+ * - cookie - Used to pass a specific cookie value to the API.
355355+ *
356356+ * The rules for serialization of the parameter are specified in one of two ways. For simpler scenarios, a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterSchema `schema`} and {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterStyle `style`} can describe the structure and syntax of the parameter.
357357+ *
358358+ * For more complex scenarios, the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterContent `content`} property can define the media type and schema of the parameter. A parameter MUST contain either a `schema` property, or a `content` property, but not both. When `example` or `examples` are provided in conjunction with the `schema` object, the example MUST follow the prescribed serialization strategy for the parameter.
359359+ *
360360+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.
361361+ *
362362+ * A header parameter with an array of 64 bit integer numbers:
363363+ *
364364+ * @example
365365+ * ```yaml
366366+ * name: token
367367+ * in: header
368368+ * description: token to be passed as a header
369369+ * required: true
370370+ * schema:
371371+ * type: array
372372+ * items:
373373+ * type: integer
374374+ * format: int64
375375+ * style: simple
376376+ * ```
377377+ *
378378+ * A path parameter of a string value:
379379+ *
380380+ * @example
381381+ * ```yaml
382382+ * name: username
383383+ * in: path
384384+ * description: username to fetch
385385+ * required: true
386386+ * schema:
387387+ * type: string
388388+ * ```
389389+ *
390390+ * An optional query parameter of a string value, allowing multiple values by repeating the query parameter:
391391+ *
392392+ * @example
393393+ * ```yaml
394394+ * name: id
395395+ * in: query
396396+ * description: ID of the object to fetch
397397+ * required: false
398398+ * schema:
399399+ * type: array
400400+ * items:
401401+ * type: string
402402+ * style: form
403403+ * explode: true
404404+ * ```
405405+ *
406406+ * A free-form query parameter, allowing undefined parameters of a specific type:
407407+ *
408408+ * @example
409409+ * ```yaml
410410+ * in: query
411411+ * name: freeForm
412412+ * schema:
413413+ * type: object
414414+ * additionalProperties:
415415+ * type: integer
416416+ * style: form
417417+ * ```
418418+ *
419419+ * A complex parameter using `content` to define serialization:
420420+ *
421421+ * @example
422422+ * ```yaml
423423+ * in: query
424424+ * name: coordinates
425425+ * content:
426426+ * application/json:
427427+ * schema:
428428+ * type: object
429429+ * required:
430430+ * - lat
431431+ * - long
432432+ * properties:
433433+ * lat:
434434+ * type: number
435435+ * long:
436436+ * type: number
437437+ * ```
438438+ */
439439+interface ParameterObject {
440440+ /**
441441+ * Sets the ability to pass empty-valued parameters. This is valid only for `query` parameters and allows sending a parameter with an empty value. Default value is `false`. If {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterStyle `style`} is used, and if behavior is `n/a` (cannot be serialized), the value of `allowEmptyValue` SHALL be ignored. Use of this property is NOT RECOMMENDED, as it is likely to be removed in a later revision.
442442+ */
443443+ allowEmptyValue?: boolean;
444444+ /**
445445+ * Determines whether the parameter value SHOULD allow reserved characters, as defined by {@link https://datatracker.ietf.org/doc/html/rfc3986#section-2.2 RFC3986} `:/?#[]@!$&'()*+,;=` to be included without percent-encoding. This property only applies to parameters with an `in` value of `query`. The default value is `false`.
446446+ */
447447+ allowReserved?: boolean;
448448+ /**
449449+ * 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.
450450+ */
451451+ content?: Record<string, any>;
452452+ /**
453453+ * Specifies that a parameter is deprecated and SHOULD be transitioned out of usage. Default value is `false`.
454454+ */
455455+ deprecated?: boolean;
456456+ /**
457457+ * 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.
458458+ */
459459+ description?: string;
460460+ /**
461461+ * Example of the parameter's potential value. The example SHOULD match the specified schema and encoding properties if present. The `example` field is mutually exclusive of the `examples` field. Furthermore, if referencing a `schema` that contains an example, the `example` value SHALL _override_ the example provided by the schema. To represent examples of media types that cannot naturally be represented in JSON or YAML, a string value can contain the example with escaping where necessary.
462462+ */
463463+ example?: unknown;
464464+ /**
465465+ * Examples of the parameter's potential value. Each example SHOULD contain a value in the correct format as specified in the parameter encoding. The `examples` field is mutually exclusive of the `example` field. Furthermore, if referencing a `schema` that contains an example, the `examples` value SHALL _override_ the example provided by the schema.
466466+ */
467467+ examples?: Record<string, any | ReferenceObject>;
468468+ /**
469469+ * When this is true, parameter values of type `array` or `object` generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters this property has no effect. When {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterStyle `style`} is `form`, the default value is `true`. For all other styles, the default value is `false`.
470470+ */
471471+ explode?: boolean;
472472+ /**
473473+ * **REQUIRED**. The location of the parameter. Possible values are `"query"`, `"header"`, `"path"` or `"cookie"`.
474474+ */
475475+ in: 'cookie' | 'header' | 'path' | 'query';
476476+ /**
477477+ * **REQUIRED**. The name of the parameter. Parameter names are _case sensitive_.
478478+ * - If {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn `in`} is `"path"`, the `name` field MUST correspond to a template expression occurring within the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#pathsPath path} field in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#paths-object Paths Object}. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#path-templating Path Templating} for further information.
479479+ * - If {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn `in`} is `"header"` and the `name` field is `"Accept"`, `"Content-Type"` or `"Authorization"`, the parameter definition SHALL be ignored.
480480+ * - For all other cases, the `name` corresponds to the parameter name used by the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn `in`} property.
481481+ */
482482+ name: string;
483483+ /**
484484+ * Determines whether this parameter is mandatory. If the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn parameter location} is `"path"`, this property is **REQUIRED** and its value MUST be `true`. Otherwise, the property MAY be included and its default value is `false`.
485485+ */
486486+ required?: boolean;
487487+ /**
488488+ * The schema defining the type used for the parameter.
489489+ */
490490+ schema?: any;
491491+ /**
492492+ * 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`.
493493+ */
494494+ style?:
495495+ | 'deepObject'
496496+ | 'form'
497497+ | 'label'
498498+ | 'matrix'
499499+ | 'pipeDelimited'
500500+ | 'simple'
501501+ | 'spaceDelimited';
502502+}
503503+504504+/**
505505+ * Describes the operations available on a single path. A Path Item MAY be empty, due to {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#security-filtering ACL constraints}. The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available.
506506+ *
507507+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.
508508+ *
509509+ * @example
510510+ * ```yaml
511511+ * get:
512512+ * description: Returns pets based on ID
513513+ * summary: Find pets by ID
514514+ * operationId: getPetsById
515515+ * responses:
516516+ * '200':
517517+ * description: pet response
518518+ * content:
519519+ * '*\/*':
520520+ * schema:
521521+ * type: array
522522+ * items:
523523+ * $ref: '#/components/schemas/Pet'
524524+ * default:
525525+ * description: error payload
526526+ * content:
527527+ * 'text/html':
528528+ * schema:
529529+ * $ref: '#/components/schemas/ErrorModel'
530530+ * parameters:
531531+ * - name: id
532532+ * in: path
533533+ * description: ID of pet to use
534534+ * required: true
535535+ * schema:
536536+ * type: array
537537+ * items:
538538+ * type: string
539539+ * style: simple
540540+ * ```
541541+ */
542542+interface PathItemObject {
543543+ /**
544544+ * Allows for a referenced definition of this path item. The referenced structure MUST be in the form of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#path-item-object Path Item Object}. In case a Path Item Object field appears both in the defined object and the referenced object, the behavior is undefined. See the rules for resolving {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#relative-references-in-uris Relative References}.
545545+ */
546546+ $ref?: string;
547547+ /**
548548+ * A definition of a DELETE operation on this path.
549549+ */
550550+ delete?: OperationObject;
551551+ /**
552552+ * 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.
553553+ */
554554+ description?: string;
555555+ /**
556556+ * A definition of a GET operation on this path.
557557+ */
558558+ get?: OperationObject;
559559+ /**
560560+ * A definition of a HEAD operation on this path.
561561+ */
562562+ head?: OperationObject;
563563+ /**
564564+ * A definition of a OPTIONS operation on this path.
565565+ */
566566+ options?: OperationObject;
567567+ /**
568568+ * A list of parameters that are applicable for all the operations described under this path. These parameters can be overridden at the operation level, but cannot be removed there. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterName name} and {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn location}. The list can use the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#reference-object Reference Object} to link to parameters that are defined at the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#componentsParameters OpenAPI Object's components/parameters}.
569569+ */
570570+ parameters?: ReadonlyArray<ParameterObject | ReferenceObject>;
571571+ /**
572572+ * A definition of a PATCH operation on this path.
573573+ */
574574+ patch?: OperationObject;
575575+ /**
576576+ * A definition of a POST operation on this path.
577577+ */
578578+ post?: OperationObject;
579579+ /**
580580+ * A definition of a PUT operation on this path.
581581+ */
582582+ put?: OperationObject;
583583+ /**
584584+ * An alternative `server` array to service all operations in this path.
585585+ */
586586+ servers?: ReadonlyArray<ServerObject>;
587587+ /**
588588+ * An optional, string summary, intended to apply to all operations in this path.
589589+ */
590590+ summary?: string;
591591+ /**
592592+ * A definition of a TRACE operation on this path.
593593+ */
594594+ trace?: OperationObject;
595595+}
596596+597597+/**
598598+ * A simple object to allow referencing other components in the OpenAPI document, internally and externally.
599599+ *
600600+ * The `$ref` string value contains a URI {@link https://datatracker.ietf.org/doc/html/rfc3986 RFC3986}, which identifies the location of the value being referenced.
601601+ *
602602+ * See the rules for resolving {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#relative-references-in-uris Relative References}.
603603+ *
604604+ * This object cannot be extended with additional properties and any properties added SHALL be ignored.
605605+ *
606606+ * Note that this restriction on additional properties is a difference between Reference Objects and {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#schema-object `Schema Objects`} that contain a `$ref` keyword.
607607+ *
608608+ * Reference Object Example
609609+ *
610610+ * @example
611611+ * ```yaml
612612+ * $ref: '#/components/schemas/Pet'
613613+ * ```
614614+ *
615615+ * Relative Schema Document Example
616616+ *
617617+ * @example
618618+ * ```yaml
619619+ * $ref: Pet.yaml
620620+ * ```
621621+ *
622622+ * Relative Documents With Embedded Schema Example
623623+ *
624624+ * @example
625625+ * ```yaml
626626+ * $ref: definitions.yaml#/Pet
627627+ * ```
628628+ */
629629+interface ReferenceObject {
630630+ /**
631631+ * **REQUIRED**. The reference identifier. This MUST be in the form of a URI.
632632+ */
633633+ $ref: string;
634634+ /**
635635+ * A description which by default SHOULD override that of the referenced component. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation. If the referenced object-type does not allow a `description` field, then this field has no effect.
636636+ */
637637+ description?: string;
638638+ /**
639639+ * A short summary which by default SHOULD override that of the referenced component. If the referenced object-type does not allow a `summary` field, then this field has no effect.
640640+ */
641641+ summary?: string;
642642+}
643643+644644+/**
645645+ * Describes a single response from an API Operation, including design-time, static `links` to operations based on the response.
646646+ *
647647+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.
648648+ *
649649+ * Response of an array of a complex type:
650650+ *
651651+ * @example
652652+ * ```yaml
653653+ * description: A complex object array response
654654+ * content:
655655+ * application/json:
656656+ * schema:
657657+ * type: array
658658+ * items:
659659+ * $ref: '#/components/schemas/VeryComplexType'
660660+ * ```
661661+ *
662662+ * Response with a string type:
663663+ *
664664+ * @example
665665+ * ```yaml
666666+ * description: A simple string response
667667+ * content:
668668+ * text/plain:
669669+ * schema:
670670+ * type: string
671671+ * ```
672672+ *
673673+ * Plain text response with headers:
674674+ *
675675+ * @example
676676+ * ```yaml
677677+ * description: A simple string response
678678+ * content:
679679+ * text/plain:
680680+ * schema:
681681+ * type: string
682682+ * example: 'whoa!'
683683+ * headers:
684684+ * X-Rate-Limit-Limit:
685685+ * description: The number of allowed requests in the current period
686686+ * schema:
687687+ * type: integer
688688+ * X-Rate-Limit-Remaining:
689689+ * description: The number of remaining requests in the current period
690690+ * schema:
691691+ * type: integer
692692+ * X-Rate-Limit-Reset:
693693+ * description: The number of seconds left in the current period
694694+ * schema:
695695+ * type: integer
696696+ * ```
697697+ *
698698+ * Response with no return value:
699699+ *
700700+ * @example
701701+ * ```yaml
702702+ * description: object created
703703+ * ```
704704+ */
705705+interface ResponseObject {
706706+ /**
707707+ * A map containing descriptions of potential response payloads. The key is a media type or {@link https://datatracker.ietf.org/doc/html/rfc7231#appendix-D media type range} and the value describes it. For responses that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/*
708708+ */
709709+ content?: Record<string, MediaTypeObject>;
710710+ /**
711711+ * **REQUIRED**. A description of the response. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
712712+ */
713713+ description: string;
714714+ /**
715715+ * Maps a header name to its definition. {@link https://datatracker.ietf.org/doc/html/rfc7230#page-22 RFC7230} states header names are case insensitive. If a response header is defined with the name `"Content-Type"`, it SHALL be ignored.
716716+ */
717717+ headers?: Record<string, HeaderObject | ReferenceObject>;
718718+ /**
719719+ * A map of operations links that can be followed from the response. The key of the map is a short name for the link, following the naming constraints of the names for {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#components-object Component Objects}.
720720+ */
721721+ links?: Record<string, any | ReferenceObject>;
722722+}
723723+724724+/**
725725+ * A container for the expected responses of an operation. The container maps a HTTP response code to the expected response.
726726+ *
727727+ * 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.
728728+ *
729729+ * The `default` MAY be used as a default response object for all HTTP codes that are not covered individually by the `Responses Object`.
730730+ *
731731+ * 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.
732732+ *
733733+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.
734734+ *
735735+ * A 200 response for a successful operation and a default response for others (implying an error):
736736+ *
737737+ * @example
738738+ * ```yaml
739739+ * '200':
740740+ * description: a pet to be returned
741741+ * content:
742742+ * application/json:
743743+ * schema:
744744+ * $ref: '#/components/schemas/Pet'
745745+ * default:
746746+ * description: Unexpected error
747747+ * content:
748748+ * application/json:
749749+ * schema:
750750+ * $ref: '#/components/schemas/ErrorModel'
751751+ * ```
752752+ */
753753+interface ResponsesObject {
754754+ /**
755755+ * 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.
756756+ */
757757+ [statusCode: string]: ResponseObject | ReferenceObject | undefined;
758758+ /**
759759+ * The documentation of responses other than the ones declared for specific HTTP response codes. Use this field to cover undeclared responses.
760760+ */
761761+ default?: ResponseObject | ReferenceObject;
762762+}
763763+764764+/**
765765+ * Lists the required security schemes to execute this operation. The name used for each property MUST correspond to a security scheme declared in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#componentsSecuritySchemes Security Schemes} under the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#components-object Components Object}.
766766+ *
767767+ * Security Requirement Objects that contain multiple schemes require that 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.
768768+ *
769769+ * When a list of Security Requirement Objects is defined on the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#openapi-object OpenAPI Object} or {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#operation-object Operation Object}, only one of the Security Requirement Objects in the list needs to be satisfied to authorize the request.
770770+ *
771771+ * Non-OAuth2 Security Requirement
772772+ *
773773+ * @example
774774+ * ```yaml
775775+ * api_key: []
776776+ * ```
777777+ *
778778+ * OAuth2 Security Requirement
779779+ *
780780+ * @example
781781+ * ```yaml
782782+ * petstore_auth:
783783+ * - write:pets
784784+ * - read:pets
785785+ * ```
786786+ *
787787+ * Optional OAuth2 Security
788788+ *
789789+ * @example
790790+ * ```yaml
791791+ * security:
792792+ * - {}
793793+ * - petstore_auth:
794794+ * - write:pets
795795+ * - read:pets
796796+ * ```
797797+ */
798798+interface SecurityRequirementObject {
799799+ /**
800800+ * Each name MUST correspond to a security scheme which is declared in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#componentsSecuritySchemes Security Schemes} under the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#components-object Components Object}. If the security scheme is of type `"oauth2"` or `"openIdConnect"`, then the value is a list of scope names required for the execution, and the list MAY be empty if authorization does not require a specified scope. For other security scheme types, the array MAY contain a list of role names which are required for the execution, but are not otherwise defined or exchanged in-band.
801801+ */
802802+ [name: string]: ReadonlyArray<string>;
803803+}
804804+805805+/**
806806+ * An object representing a Server.
807807+ *
808808+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.
809809+ *
810810+ * @example
811811+ * ```yaml
812812+ * url: https://development.gigantic-server.com/v1
813813+ * description: Development server
814814+ * ```
815815+ */
816816+interface ServerObject {
817817+ /**
818818+ * An optional string describing the host designated by the URL. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
819819+ */
820820+ description?: string;
821821+ /**
822822+ * **REQUIRED**. A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the OpenAPI document is being served. Variable substitutions will be made when a variable is named in `{`brackets`}`.
823823+ */
824824+ url: string;
825825+ /**
826826+ * A map between a variable name and its value. The value is used for substitution in the server's URL template.
827827+ */
828828+ variables?: Record<string, ServerVariableObject>;
829829+}
830830+831831+/**
832832+ * An object representing a Server Variable for server URL template substitution.
833833+ *
834834+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.
835835+ */
836836+interface ServerVariableObject {
837837+ /**
838838+ * **REQUIRED**. The default value to use for substitution, which SHALL be sent if an alternate value is _not_ supplied. Note this behavior is different than the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#schema-object Schema Object's} treatment of default values, because in those cases parameter values are optional. If the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#serverVariableEnum `enum`} is defined, the value MUST exist in the enum's values.
839839+ */
840840+ default: string;
841841+ /**
842842+ * An optional description for the server variable. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
843843+ */
844844+ description?: string;
845845+ /**
846846+ * An enumeration of string values to be used if the substitution options are from a limited set. The array MUST NOT be empty.
847847+ */
848848+ enum?: ReadonlyArray<string>;
849849+}
850850+851851+/**
852852+ * Adds metadata to a single tag that is used by the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#operation-object Operation Object}. It is not mandatory to have a Tag Object per tag defined in the Operation Object instances.
853853+ *
854854+ * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.
855855+ *
856856+ * @example
857857+ * ```yaml
858858+ * name: pet
859859+ * description: Pets operations
860860+ * ```
861861+ */
862862+interface TagObject {
863863+ /**
864864+ * A description for the tag. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
865865+ */
866866+ description?: string;
867867+ /**
868868+ * Additional external documentation for this tag.
869869+ */
870870+ externalDocs?: ExternalDocumentationObject;
871871+ /**
872872+ * **REQUIRED**. The name of the tag.
873873+ */
874874+ name: string;
875875+}