@api-client/core 0.19.19 → 0.19.21

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.
Files changed (130) hide show
  1. package/build/src/authorization/Utils.js +3 -3
  2. package/build/src/authorization/Utils.js.map +1 -1
  3. package/build/src/modeling/ApiModel.d.ts +16 -5
  4. package/build/src/modeling/ApiModel.d.ts.map +1 -1
  5. package/build/src/modeling/ApiModel.js +17 -2
  6. package/build/src/modeling/ApiModel.js.map +1 -1
  7. package/build/src/modeling/ApiValidation.d.ts.map +1 -1
  8. package/build/src/modeling/ApiValidation.js +2 -1
  9. package/build/src/modeling/ApiValidation.js.map +1 -1
  10. package/build/src/modeling/DomainProperty.d.ts +12 -0
  11. package/build/src/modeling/DomainProperty.d.ts.map +1 -1
  12. package/build/src/modeling/DomainProperty.js +23 -28
  13. package/build/src/modeling/DomainProperty.js.map +1 -1
  14. package/build/src/modeling/DomainSerialization.js +1 -1
  15. package/build/src/modeling/DomainSerialization.js.map +1 -1
  16. package/build/src/modeling/ExposedEntity.d.ts +15 -1
  17. package/build/src/modeling/ExposedEntity.d.ts.map +1 -1
  18. package/build/src/modeling/ExposedEntity.js +42 -4
  19. package/build/src/modeling/ExposedEntity.js.map +1 -1
  20. package/build/src/modeling/actions/Action.d.ts.map +1 -1
  21. package/build/src/modeling/actions/Action.js +1 -0
  22. package/build/src/modeling/actions/Action.js.map +1 -1
  23. package/build/src/modeling/actions/ListAction.d.ts +3 -17
  24. package/build/src/modeling/actions/ListAction.d.ts.map +1 -1
  25. package/build/src/modeling/actions/ListAction.js +18 -38
  26. package/build/src/modeling/actions/ListAction.js.map +1 -1
  27. package/build/src/modeling/actions/SearchAction.d.ts +4 -4
  28. package/build/src/modeling/actions/SearchAction.d.ts.map +1 -1
  29. package/build/src/modeling/actions/SearchAction.js +16 -13
  30. package/build/src/modeling/actions/SearchAction.js.map +1 -1
  31. package/build/src/modeling/generators/oas_312/OasGenerator.d.ts +32 -0
  32. package/build/src/modeling/generators/oas_312/OasGenerator.d.ts.map +1 -0
  33. package/build/src/modeling/generators/oas_312/OasGenerator.js +1452 -0
  34. package/build/src/modeling/generators/oas_312/OasGenerator.js.map +1 -0
  35. package/build/src/modeling/generators/oas_312/OasSchemaGenerator.d.ts +27 -0
  36. package/build/src/modeling/generators/oas_312/OasSchemaGenerator.d.ts.map +1 -0
  37. package/build/src/modeling/generators/oas_312/OasSchemaGenerator.js +295 -0
  38. package/build/src/modeling/generators/oas_312/OasSchemaGenerator.js.map +1 -0
  39. package/build/src/modeling/generators/oas_312/types.d.ts +1010 -0
  40. package/build/src/modeling/generators/oas_312/types.d.ts.map +1 -0
  41. package/build/src/modeling/generators/oas_312/types.js +2 -0
  42. package/build/src/modeling/generators/oas_312/types.js.map +1 -0
  43. package/build/src/modeling/generators/oas_320/OasGenerator.d.ts +16 -0
  44. package/build/src/modeling/generators/oas_320/OasGenerator.d.ts.map +1 -0
  45. package/build/src/modeling/generators/oas_320/OasGenerator.js +306 -0
  46. package/build/src/modeling/generators/oas_320/OasGenerator.js.map +1 -0
  47. package/build/src/modeling/generators/oas_320/OasSchemaGenerator.d.ts +25 -0
  48. package/build/src/modeling/generators/oas_320/OasSchemaGenerator.d.ts.map +1 -0
  49. package/build/src/modeling/generators/oas_320/OasSchemaGenerator.js +237 -0
  50. package/build/src/modeling/generators/oas_320/OasSchemaGenerator.js.map +1 -0
  51. package/build/src/modeling/generators/oas_320/types.d.ts +1219 -0
  52. package/build/src/modeling/generators/oas_320/types.d.ts.map +1 -0
  53. package/build/src/modeling/generators/oas_320/types.js +2 -0
  54. package/build/src/modeling/generators/oas_320/types.js.map +1 -0
  55. package/build/src/modeling/helpers/Intelisense.d.ts +1 -1
  56. package/build/src/modeling/helpers/Intelisense.d.ts.map +1 -1
  57. package/build/src/modeling/helpers/Intelisense.js +4 -2
  58. package/build/src/modeling/helpers/Intelisense.js.map +1 -1
  59. package/build/src/modeling/types.d.ts +50 -13
  60. package/build/src/modeling/types.d.ts.map +1 -1
  61. package/build/src/modeling/types.js.map +1 -1
  62. package/build/src/modeling/validation/api_model_rules.d.ts +1 -0
  63. package/build/src/modeling/validation/api_model_rules.d.ts.map +1 -1
  64. package/build/src/modeling/validation/api_model_rules.js +105 -29
  65. package/build/src/modeling/validation/api_model_rules.js.map +1 -1
  66. package/build/src/models/ProjectRequest.d.ts.map +1 -1
  67. package/build/src/models/ProjectRequest.js +0 -4
  68. package/build/src/models/ProjectRequest.js.map +1 -1
  69. package/build/src/models/transformers/ArcDexieTransformer.d.ts.map +1 -1
  70. package/build/src/models/transformers/ArcDexieTransformer.js +0 -4
  71. package/build/src/models/transformers/ArcDexieTransformer.js.map +1 -1
  72. package/build/src/models/transformers/ImportUtils.js +1 -1
  73. package/build/src/models/transformers/ImportUtils.js.map +1 -1
  74. package/build/src/models/transformers/PostmanBackupTransformer.d.ts.map +1 -1
  75. package/build/src/models/transformers/PostmanBackupTransformer.js +0 -4
  76. package/build/src/models/transformers/PostmanBackupTransformer.js.map +1 -1
  77. package/build/src/runtime/constants.d.ts +7 -0
  78. package/build/src/runtime/constants.d.ts.map +1 -0
  79. package/build/src/runtime/constants.js +8 -0
  80. package/build/src/runtime/constants.js.map +1 -0
  81. package/build/src/runtime/http-engine/ntlm/Des.d.ts.map +1 -1
  82. package/build/src/runtime/http-engine/ntlm/Des.js +1 -0
  83. package/build/src/runtime/http-engine/ntlm/Des.js.map +1 -1
  84. package/build/src/runtime/variables/EvalFunctions.d.ts.map +1 -1
  85. package/build/src/runtime/variables/EvalFunctions.js +0 -1
  86. package/build/src/runtime/variables/EvalFunctions.js.map +1 -1
  87. package/build/tsconfig.tsbuildinfo +1 -1
  88. package/eslint.config.js +6 -0
  89. package/package.json +3 -1
  90. package/src/authorization/Utils.ts +3 -3
  91. package/src/modeling/ApiModel.ts +23 -8
  92. package/src/modeling/ApiValidation.ts +2 -0
  93. package/src/modeling/DomainProperty.ts +22 -18
  94. package/src/modeling/DomainSerialization.ts +1 -1
  95. package/src/modeling/ExposedEntity.ts +44 -4
  96. package/src/modeling/actions/Action.ts +1 -0
  97. package/src/modeling/actions/ListAction.ts +12 -30
  98. package/src/modeling/actions/SearchAction.ts +11 -8
  99. package/src/modeling/generators/oas_312/OasGenerator.ts +1685 -0
  100. package/src/modeling/generators/oas_312/OasSchemaGenerator.ts +322 -0
  101. package/src/modeling/generators/oas_312/types.ts +1052 -0
  102. package/src/modeling/generators/oas_320/OasGenerator.ts +359 -0
  103. package/src/modeling/generators/oas_320/OasSchemaGenerator.ts +255 -0
  104. package/src/modeling/generators/oas_320/types.ts +1259 -0
  105. package/src/modeling/helpers/Intelisense.ts +4 -2
  106. package/src/modeling/types.ts +55 -22
  107. package/src/modeling/validation/api_model_rules.ts +103 -32
  108. package/src/models/ProjectRequest.ts +0 -4
  109. package/src/models/transformers/ArcDexieTransformer.ts +0 -4
  110. package/src/models/transformers/ImportUtils.ts +1 -1
  111. package/src/models/transformers/PostmanBackupTransformer.ts +0 -5
  112. package/src/runtime/constants.ts +9 -0
  113. package/src/runtime/http-engine/ntlm/Des.ts +1 -0
  114. package/src/runtime/variables/EvalFunctions.ts +0 -1
  115. package/tests/test-utils.ts +6 -2
  116. package/tests/unit/decorators/observed.spec.ts +8 -24
  117. package/tests/unit/decorators/observed_recursive.spec.ts +0 -1
  118. package/tests/unit/events/EventsTestHelpers.ts +0 -1
  119. package/tests/unit/events/events_polyfills.ts +0 -1
  120. package/tests/unit/legacy-transformers/DataTestHelper.ts +0 -2
  121. package/tests/unit/legacy-transformers/LegacyExportProcessor.spec.ts +0 -1
  122. package/tests/unit/modeling/actions/ListAction.spec.ts +9 -69
  123. package/tests/unit/modeling/actions/SearchAction.spec.ts +9 -35
  124. package/tests/unit/modeling/api_model.spec.ts +28 -0
  125. package/tests/unit/modeling/definitions/sku.spec.ts +0 -2
  126. package/tests/unit/modeling/domain_property.spec.ts +20 -1
  127. package/tests/unit/modeling/exposed_entity.spec.ts +71 -0
  128. package/tests/unit/modeling/generators/OasGenerator.spec.ts +302 -0
  129. package/tests/unit/modeling/helpers/intellisense.spec.ts +1 -1
  130. package/tests/unit/modeling/validation/api_model_rules.spec.ts +113 -15
@@ -0,0 +1,1259 @@
1
+ import { type JSONSchema } from 'json-schema-typed/draft-2020-12'
2
+ /**
3
+ * This is the root object of the [OpenAPI Description](#openapi-description-structure).
4
+ */
5
+ export interface OpenApi320 {
6
+ /**
7
+ * This string MUST be the [version number](#versions-and-deprecation) of the OpenAPI Specification that the OpenAPI
8
+ * document uses. The `openapi` field SHOULD be used by tooling to interpret the OpenAPI document. This is _not_
9
+ * related to the [`info.version`](#info-version) string, which describes the OpenAPI document's version.
10
+ */
11
+ openapi: '3.2.0'
12
+ /**
13
+ * This string MUST be in the form of a URI reference as defined by [[RFC3986]] [Section
14
+ * 4.1](https://www.rfc-editor.org/rfc/rfc3986#section-4.1). The `$self` field provides the self-assigned URI of this
15
+ * document, which also serves as its base URI in accordance with [[RFC3986]] [Section
16
+ * 5.1.1](https://www.rfc-editor.org/rfc/rfc3986#section-5.1.1). Implementations MUST support identifying the targets
17
+ * of [API description URIs](#relative-references-in-api-description-uris) using the URI defined by this field when it
18
+ * is present. See [Establishing the Base URI](#establishing-the-base-uri) for the base URI behavior when `$self` is
19
+ * absent or relative, and see [Appendix F](#appendix-f-examples-of-base-uri-determination-and-reference-resolution)
20
+ * for examples of using `$self` to resolve references.
21
+ */
22
+ $self?: string
23
+ /**
24
+ * Provides metadata about the API. The metadata MAY be used by tooling as required.
25
+ */
26
+ info: InfoObject
27
+ /**
28
+ * The default value for the `$schema` keyword within [Schema Objects](#schema-object) contained within this OAS
29
+ * document. This MUST be in the form of a URI.
30
+ */
31
+ jsonSchemaDialect?: string
32
+ /**
33
+ * An array of Server Objects, which provide connectivity information to a target server. If the `servers` field is
34
+ * not provided, or is an empty array, the default value would be an array consisting of a single [Server
35
+ * Object](#server-object) with a [url](#server-url) value of `/`.
36
+ */
37
+ servers?: ServerObject[]
38
+ /**
39
+ * The available paths and operations for the API.
40
+ */
41
+ paths?: PathsObject
42
+ /**
43
+ * The incoming webhooks that MAY be received as part of this API and that the API consumer MAY choose to implement.
44
+ * Closely related to the `callbacks` feature, this section describes requests initiated other than by an API call,
45
+ * for example by an out of band registration. The key name is a unique string to refer to each webhook, while the
46
+ * (optionally referenced) Path Item Object describes a request that may be initiated by the API provider and the
47
+ * expected responses. An [example](https://learn.openapis.org/examples/v3.1/webhook-example.html) is available.
48
+ */
49
+ webhooks?: Record<string, PathItemObject>
50
+ /**
51
+ * An element to hold various Objects for the OpenAPI Description.
52
+ */
53
+ components?: ComponentsObject
54
+ /**
55
+ * A declaration of which security mechanisms can be used across the API. The list of values includes alternative
56
+ * Security Requirement Objects that can be used. Only one of the Security Requirement Objects need to be satisfied to
57
+ * authorize a request. Individual operations can override this definition. The list can be incomplete, up to being
58
+ * empty or absent. To make security explicitly optional, an empty security requirement (`{}`) can be included in the
59
+ * array.
60
+ */
61
+ security?: SecurityRequirementObject[]
62
+ /**
63
+ * A list of tags used by the OpenAPI Description with additional metadata. The order of the tags can be used to
64
+ * reflect on their order by the parsing tools. Not all tags that are used by the [Operation
65
+ * Object](#operation-object) must be declared. The tags that are not declared MAY be organized randomly or based on
66
+ * the tools' logic. Each tag name in the list MUST be unique.
67
+ */
68
+ tags?: TagObject[]
69
+ /**
70
+ * Additional external documentation.
71
+ */
72
+ externalDocs?: ExternalDocumentationObject
73
+ }
74
+
75
+ /**
76
+ * The object provides metadata about the API. The metadata MAY be used by the clients if needed, and MAY be presented
77
+ * in editing or documentation generation tools for convenience.
78
+ */
79
+ export interface InfoObject {
80
+ /**
81
+ * The title of the API.
82
+ */
83
+ title: string
84
+ /**
85
+ * A short summary of the API.
86
+ */
87
+ summary?: string
88
+ /**
89
+ * A description of the API. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text
90
+ * representation.
91
+ */
92
+ description?: string
93
+ /**
94
+ * A URI for the Terms of Service for the API. This MUST be in the form of a URI.
95
+ */
96
+ termsOfService?: string
97
+ /**
98
+ * The contact information for the exposed API.
99
+ */
100
+ contact?: ContactObject
101
+ /**
102
+ * The license information for the exposed API.
103
+ */
104
+ license?: LicenseObject
105
+ /**
106
+ * The version of the OpenAPI document (which is distinct from the [OpenAPI Specification version](#oas-version) or
107
+ * the version of the API being described or the version of the OpenAPI Description).
108
+ */
109
+ version: string
110
+ }
111
+
112
+ /**
113
+ * Contact information for the exposed API.
114
+ */
115
+ export interface ContactObject {
116
+ /**
117
+ * The identifying name of the contact person/organization.
118
+ */
119
+ name?: string
120
+ /**
121
+ * The URI for the contact information. This MUST be in the form of a URI.
122
+ */
123
+ url?: string
124
+ /**
125
+ * The email address of the contact person/organization. This MUST be in the form of an email address.
126
+ */
127
+ email?: string
128
+ }
129
+
130
+ /**
131
+ * License information for the exposed API.
132
+ */
133
+ export interface LicenseObject {
134
+ /**
135
+ * The license name used for the API.
136
+ */
137
+ name: string
138
+ /**
139
+ * An [SPDX](https://spdx.org/licenses/) license expression for the API. The `identifier` field is mutually exclusive
140
+ * of the `url` field.
141
+ */
142
+ identifier?: string
143
+ /**
144
+ * A URI for the license used for the API. This MUST be in the form of a URI. The `url` field is mutually exclusive of
145
+ * the `identifier` field.
146
+ */
147
+ url?: string
148
+ }
149
+
150
+ /**
151
+ * An object representing a Server.
152
+ */
153
+ export interface ServerObject {
154
+ /**
155
+ * A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host
156
+ * location is relative to the location where the document containing the Server Object is being served. Query and
157
+ * fragment MUST NOT be part of this URL. Variable substitutions will be made when a variable is named in
158
+ * `{`braces`}`.
159
+ */
160
+ url: string
161
+ /**
162
+ * An optional string describing the host designated by the URL. [CommonMark syntax](https://spec.commonmark.org/) MAY
163
+ * be used for rich text representation.
164
+ */
165
+ description?: string
166
+ /**
167
+ * An optional unique string to refer to the host designated by the URL.
168
+ */
169
+ name?: string
170
+ /**
171
+ * A map between a variable name and its value. The value is used for substitution in the server's URL template.
172
+ */
173
+ variables?: Record<string, ServerVariableObject>
174
+ }
175
+
176
+ /**
177
+ * An object representing a Server Variable for server URL template substitution. The server URL templating is defined
178
+ * by the following [ABNF](https://tools.ietf.org/html/rfc5234) syntax.
179
+ *
180
+ * ```abnf
181
+ * server-url-template = 1*( literals / server-variable )
182
+ * server-variable = "{" server-variable-name "}"
183
+ * server-variable-name = 1*( %x00-7A / %x7C / %x7E-10FFFF ) ; every Unicode character except { and }
184
+ * literals = 1*( %x21 / %x23-24 / %x26-3B / %x3D / %x3F-5B
185
+ * / %x5D / %x5F / %x61-7A / %x7E / ucschar / iprivate
186
+ * / pct-encoded)
187
+ * ; any Unicode character except: CTL, SP,
188
+ * ; DQUOTE, "%" (aside from pct-encoded),
189
+ * ; "<", ">", "\", "^", "`", "{", "|", "}"
190
+ * pct-encoded = "%" HEXDIG HEXDIG
191
+ * ucschar = %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF
192
+ * / %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD
193
+ * / %x40000-4FFFD / %x50000-5FFFD / %x60000-6FFFD
194
+ * / %x70000-7FFFD / %x80000-8FFFD / %x90000-9FFFD
195
+ * / %xA0000-AFFFD / %xB0000-BFFFD / %xC0000-CFFFD
196
+ * / %xD0000-DFFFD / %xE1000-EFFFD
197
+ * iprivate = %xE000-F8FF / %xF0000-FFFFD / %x100000-10FFFD
198
+ * ```
199
+ *
200
+ * Here, `literals`, `pct-encoded`, `ucschar` and `iprivate` definitions are taken from [RFC
201
+ * 6570](https://www.rfc-editor.org/rfc/rfc6570), incorporating the corrections specified in [Errata
202
+ * 6937](https://www.rfc-editor.org/errata/eid6937) for `literals`. Each server variable MUST NOT appear more than once
203
+ * in the URL template. See the [Paths Object](#paths-object) for guidance on constructing full request URLs.
204
+ *
205
+ * ```abnf
206
+ * server-url-template = 1*( literals / server-variable )
207
+ * server-variable = "{" server-variable-name "}"
208
+ * server-variable-name = 1*( %x00-7A / %x7C / %x7E-10FFFF ) ; every Unicode character except { and }
209
+ * literals = 1*( %x21 / %x23-24 / %x26-3B / %x3D / %x3F-5B
210
+ * / %x5D / %x5F / %x61-7A / %x7E / ucschar / iprivate
211
+ * / pct-encoded)
212
+ * ; any Unicode character except: CTL, SP,
213
+ * ; DQUOTE, "%" (aside from pct-encoded),
214
+ * ; "<", ">", "\", "^", "`", "{", "|", "}"
215
+ * pct-encoded = "%" HEXDIG HEXDIG
216
+ * ucschar = %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF
217
+ * / %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD
218
+ * / %x40000-4FFFD / %x50000-5FFFD / %x60000-6FFFD
219
+ * / %x70000-7FFFD / %x80000-8FFFD / %x90000-9FFFD
220
+ * / %xA0000-AFFFD / %xB0000-BFFFD / %xC0000-CFFFD
221
+ * / %xD0000-DFFFD / %xE1000-EFFFD
222
+ * iprivate = %xE000-F8FF / %xF0000-FFFFD / %x100000-10FFFD
223
+ * ```
224
+ */
225
+ export interface ServerVariableObject {
226
+ /**
227
+ * An enumeration of string values to be used if the substitution options are from a limited set. The array MUST NOT
228
+ * be empty.
229
+ */
230
+ enum?: string[]
231
+ /**
232
+ * The default value to use for substitution, which SHALL be sent if an alternate value is not_supplied. If the
233
+ * [`enum`](#server-variable-enum) is defined, the value MUST exist in the enum's values. Note that this behavior is
234
+ * different from the [Schema Object](#schema-object)'s `default` keyword, which documents the receiver's behavior
235
+ * rather than inserting the value into the data.
236
+ */
237
+ default: string
238
+ /**
239
+ * An optional description for the server variable. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for
240
+ * rich text representation.
241
+ */
242
+ description?: string
243
+ }
244
+
245
+ /**
246
+ * Holds a set of reusable objects for different aspects of the OAS. All objects defined within the Components Object
247
+ * will have no effect on the API unless they are explicitly referenced from outside the Components Object.
248
+ */
249
+ export interface ComponentsObject {
250
+ /**
251
+ * An object to hold reusable [Schema Objects](#schema-object).
252
+ */
253
+ schemas?: Record<string, SchemaObject>
254
+ /**
255
+ * [Reference Object](#reference-object)]
256
+ */
257
+ responses?: Record<string, ResponseObject>
258
+ /**
259
+ * [Reference Object](#reference-object)]
260
+ */
261
+ parameters?: Record<string, ParameterObject>
262
+ /**
263
+ * [Reference Object](#reference-object)]
264
+ */
265
+ examples?: Record<string, ExampleObject>
266
+ /**
267
+ * [Reference Object](#reference-object)]
268
+ */
269
+ requestBodies?: Record<string, RequestBodyObject>
270
+ /**
271
+ * [Reference Object](#reference-object)]
272
+ */
273
+ headers?: Record<string, HeaderObject>
274
+ /**
275
+ * [Reference Object](#reference-object)]
276
+ */
277
+ securitySchemes?: Record<string, SecuritySchemeObject | ReferenceObject>
278
+ /**
279
+ * [Reference Object](#reference-object)]
280
+ */
281
+ links?: Record<string, LinkObject>
282
+ /**
283
+ * [Reference Object](#reference-object)]
284
+ */
285
+ callbacks?: Record<string, CallbackObject>
286
+ /**
287
+ * An object to hold reusable [Path Item Objects](#path-item-object).
288
+ */
289
+ pathItems?: Record<string, PathItemObject>
290
+ /**
291
+ * [Reference Object](#reference-object)]
292
+ */
293
+ mediaTypes?: Record<string, MediaTypeObject>
294
+ }
295
+
296
+ /**
297
+ * Holds the relative paths to the individual endpoints and their operations. The path is appended to the URL from the
298
+ * [Server Object](#server-object) in order to construct the full URL. The Paths Object MAY be empty, due to [Access
299
+ * Control List (ACL) constraints](#security-filtering). The key has a pattern: `/{path}`. A relative path to an
300
+ * individual endpoint. The field name MUST begin with a forward slash (`/`). The URL from the [Server
301
+ * Object](#server-object)'s `url` field, resolved and with template variables substituted, has the path **appended**
302
+ * (no relative URL resolution) to it in order to construct the full URL. [Path templating](#path-templating) is
303
+ * allowed. When matching URLs, concrete (non-templated) paths would be matched before their templated counterparts.
304
+ * Templated paths with the same hierarchy but different templated names MUST NOT exist as they are identical. In case
305
+ * of ambiguous matching, it's up to the tooling to decide which one to use.
306
+ */
307
+ export type PathsObject = Record<string, PathItemObject>
308
+
309
+ /**
310
+ * Describes the operations available on a single path. A Path Item MAY be empty, due to [ACL
311
+ * constraints](#security-filtering). The path itself is still exposed to the documentation viewer but they will not
312
+ * know which operations and parameters are available.
313
+ */
314
+ export interface PathItemObject {
315
+ /**
316
+ * Allows for a referenced definition of this path item. The value MUST be in the form of a URI, and the referenced
317
+ * structure MUST be in the form of a [Path Item Object](#path-item-object). In case a Path Item Object field appears
318
+ * both in the defined object and the referenced object, the behavior is undefined. See the rules for resolving
319
+ * [Relative References](#relative-references-in-api-description-uris). _**Note:** The behavior of `$ref` with
320
+ * adjacent properties is likely to change in future versions of this specification to bring it into closer alignment
321
+ * with the behavior of the [Reference Object](#reference-object)._
322
+ */
323
+ $ref?: string
324
+ /**
325
+ * An optional string summary, intended to apply to all operations in this path.
326
+ */
327
+ summary?: string
328
+ /**
329
+ * An optional string description, intended to apply to all operations in this path. [CommonMark
330
+ * syntax](https://spec.commonmark.org/) MAY be used for rich text representation.
331
+ */
332
+ description?: string
333
+ /**
334
+ * A definition of a GET operation on this path.
335
+ */
336
+ get?: OperationObject
337
+ /**
338
+ * A definition of a PUT operation on this path.
339
+ */
340
+ put?: OperationObject
341
+ /**
342
+ * A definition of a POST operation on this path.
343
+ */
344
+ post?: OperationObject
345
+ /**
346
+ * A definition of a DELETE operation on this path.
347
+ */
348
+ delete?: OperationObject
349
+ /**
350
+ * A definition of a OPTIONS operation on this path.
351
+ */
352
+ options?: OperationObject
353
+ /**
354
+ * A definition of a HEAD operation on this path.
355
+ */
356
+ head?: OperationObject
357
+ /**
358
+ * A definition of a PATCH operation on this path.
359
+ */
360
+ patch?: OperationObject
361
+ /**
362
+ * A definition of a TRACE operation on this path.
363
+ */
364
+ trace?: OperationObject
365
+ /**
366
+ * A definition of a QUERY operation, as defined in the most recent IETF draft
367
+ * ([draft-ietf-httpbis-safe-method-w-body-08](https://www.ietf.org/archive/id/draft-ietf-httpbis-safe-method-w-body-11.html)
368
+ * as of this writing) or its RFC successor, on this path.
369
+ */
370
+ query?: OperationObject
371
+ /**
372
+ * A map of additional operations on this path. The map key is the HTTP method with the same capitalization that is to
373
+ * be sent in the request. This map MUST NOT contain any entry for the methods that can be defined by other fixed
374
+ * fields with Operation Object values (e.g. no `POST` entry, as the `post` field is used for this method).
375
+ */
376
+ additionalOperations?: Record<string, OperationObject>
377
+ /**
378
+ * An alternative `servers` array to service all operations in this path. If a `servers` array is specified at the
379
+ * [OpenAPI Object](#oas-servers) level, it will be overridden by this value.
380
+ */
381
+ servers?: ServerObject[]
382
+ /**
383
+ * [Reference Object](#reference-object)]
384
+ */
385
+ parameters?: (ParameterObject | ReferenceObject)[]
386
+ }
387
+
388
+ /**
389
+ * Describes a single API operation on a path.
390
+ */
391
+ export interface OperationObject {
392
+ /**
393
+ * A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or
394
+ * any other qualifier.
395
+ */
396
+ tags?: string[]
397
+ /**
398
+ * A short summary of what the operation does.
399
+ */
400
+ summary?: string
401
+ /**
402
+ * A verbose explanation of the operation behavior. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for
403
+ * rich text representation.
404
+ */
405
+ description?: string
406
+ /**
407
+ * Additional external documentation for this operation.
408
+ */
409
+ externalDocs?: ExternalDocumentationObject
410
+ /**
411
+ * Unique string used to identify the operation. The id MUST be unique among all operations described in the API. The
412
+ * operationId value is **case-sensitive**. Tools and libraries MAY use the operationId to uniquely identify an
413
+ * operation, therefore, it is RECOMMENDED to follow common programming naming conventions.
414
+ */
415
+ operationId?: string
416
+ /**
417
+ * A list of parameters that are applicable for this operation. If a parameter is already defined at the Path Item,
418
+ * the new definition will override it but can never remove it. The list MUST NOT include duplicated parameters. A
419
+ * unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link
420
+ * to parameters that are defined in the OpenAPI Object’s components.parameters.
421
+ */
422
+ parameters?: (ParameterObject | ReferenceObject)[]
423
+ /**
424
+ * The request body applicable for this operation. The `requestBody` is fully supported in HTTP methods where the HTTP
425
+ * specification [[RFC9110](https://spec.openapis.org/oas/v3.2.0.html#bib-rfc9110)] [Section
426
+ * 9.3](https://datatracker.ietf.org/doc/html/rfc9110#section-9.3) has explicitly defined semantics for request
427
+ * bodies. In other cases where the HTTP spec discourages message content (such as GET and DELETE), `requestBody` is
428
+ * permitted but does not have well-defined semantics and SHOULD be avoided if possible.
429
+ */
430
+ requestBody?: RequestBodyObject | ReferenceObject
431
+ /**
432
+ * The list of possible responses as they are returned from executing this operation.
433
+ */
434
+ responses?: ResponsesObject
435
+ /**
436
+ * A map of possible out-of band callbacks related to the parent operation. The key is a unique identifier for the
437
+ * Callback Object. Each value in the map is a Callback Object that describes a request that may be initiated by the
438
+ * API provider and the expected responses.
439
+ */
440
+ callbacks?: Record<string, CallbackObject | ReferenceObject>
441
+ /**
442
+ * Declares this operation to be deprecated. Consumers SHOULD refrain from usage of the declared operation. Default
443
+ * value is `false`.
444
+ */
445
+ deprecated?: boolean
446
+ /**
447
+ * A declaration of which security mechanisms can be used for this operation. The list of values includes alternative
448
+ * Security Requirement Objects that can be used. Only one of the Security Requirement Objects need to be satisfied to
449
+ * authorize a request. To make security optional, an empty security requirement (`{}`) can be included in the array.
450
+ * This definition overrides any declared top-level [`security`](#oas-security). To remove a top-level security
451
+ * declaration, an empty array can be used.
452
+ */
453
+ security?: SecurityRequirementObject[]
454
+ /**
455
+ * An alternative `servers` array to service this operation. If a `servers` array is specified at the [Path Item
456
+ * Object](#path-item-servers) or [OpenAPI Object](#oas-servers) level, it will be overridden by this value.
457
+ */
458
+ servers?: ServerObject[]
459
+ }
460
+
461
+ /**
462
+ * Allows referencing an external resource for extended documentation.
463
+ */
464
+ export interface ExternalDocumentationObject {
465
+ /**
466
+ * A description of the target documentation. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich
467
+ * text representation.
468
+ */
469
+ description?: string
470
+ /**
471
+ * The URI for the target documentation. This MUST be in the form of a URI.
472
+ */
473
+ url: string
474
+ }
475
+
476
+ /**
477
+ * An object grouping an internal or external example value with basic `summary` and `description` metadata. The
478
+ * examples can show either data suitable for schema validation, or serialized data as required by the containing [Media
479
+ * Type Object](#media-type-object), [Parameter Object](#parameter-object), or [Header Object](#header-object). This
480
+ * object is typically used in fields named `examples` (plural), and is a [referenceable](#reference-object) alternative
481
+ * to older `example` (singular) fields that do not support referencing or metadata. The various fields and types of
482
+ * examples are explained in more detail under [Working With Examples](#working-with-examples).
483
+ */
484
+ export interface ExampleObject {
485
+ /**
486
+ * Short description for the example.
487
+ */
488
+ summary?: string
489
+ /**
490
+ * Long description for the example. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text
491
+ * representation.
492
+ */
493
+ description?: string
494
+ /**
495
+ * An example of the data structure that MUST be valid according to the relevant [Schema Object](#schema-object). If
496
+ * this field is present, `value` MUST be absent.
497
+ */
498
+ dataValue?: unknown
499
+ /**
500
+ * An example of the serialized form of the value, including encoding and escaping as described under [Validating
501
+ * Examples](#validating-examples). If `dataValue` is present, then this field SHOULD contain the serialization of the
502
+ * given data. Otherwise, it SHOULD be the valid serialization of a data value that itself MUST be valid as described
503
+ * for `dataValue`. This field SHOULD NOT be used if the serialization format is JSON, as the data form is easier to
504
+ * work with. If this field is present, `value`, and `externalValue` MUST be absent.
505
+ */
506
+ serializedValue?: string
507
+ /**
508
+ * A URI that identifies the serialized example in a separate document, allowing for values not easily or readably
509
+ * expressed as a Unicode string. If `dataValue` is present, then this field SHOULD identify a serialization of the
510
+ * given data. Otherwise, the value SHOULD be the valid serialization of a data value that itself MUST be valid as
511
+ * described for `dataValue`. If this field is present, `serializedValue` and `value` MUST be absent. See also the
512
+ * rules for resolving [Relative References](#relative-references-in-api-description-uris).
513
+ */
514
+ externalValue?: string
515
+ /**
516
+ * Embedded literal example. The `value` field and `externalValue` field are mutually exclusive. To represent examples
517
+ * of media types that cannot naturally be represented in JSON or YAML, use a string value to contain the example,
518
+ * escaping where necessary. **Deprecated for non-JSON serialization targets:** Use `dataValue` and/or
519
+ * `serializedValue`, which both have unambiguous syntax and semantics, instead.
520
+ */
521
+ value?: unknown
522
+ }
523
+ /**
524
+ * Describes a single operation parameter. A unique parameter is defined by a combination of a [name](#parameter-name)
525
+ * and [location](#parameter-in). See [Appendix E](#appendix-e-percent-encoding-and-form-media-types) for a detailed
526
+ * examination of percent-encoding concerns, including interactions with the `application/x-www-form-urlencoded` query
527
+ * string format.
528
+ */
529
+ export interface ParameterObject {
530
+ /**
531
+ * The name of the parameter. Parameter names are _case-sensitive_. If [`in`](#parameter-in) is `"path"`, the `name`
532
+ * field MUST correspond to a single template expression occurring within the [path](#paths-path) field in the [Paths
533
+ * Object](#paths-object). See [Path Templating](#path-templating) for further information. If [`in`](#parameter-in)
534
+ * is `"header"` and the `name` field is `"Accept"`, `"Content-Type"` or `"Authorization"`, the parameter definition
535
+ * SHALL be ignored. If `in` is `"querystring"`, or for [certain combinations](#style-examples) of
536
+ * [`style`](#parameter-style) and [`explode`](#parameter-explode), the value of `name` is not used in the parameter
537
+ * serialization. For all other cases, the `name` corresponds to the parameter name used by the [`in`](#parameter-in)
538
+ * field.
539
+ */
540
+ name: string
541
+ /**
542
+ * The location of the parameter.
543
+ */
544
+ in: 'query' | 'querystring' | 'header' | 'path' | 'cookie'
545
+ /**
546
+ * A brief description of the parameter. This could contain examples of use. [CommonMark
547
+ * syntax](https://spec.commonmark.org/) MAY be used for rich text representation.
548
+ */
549
+ description?: string
550
+ /**
551
+ * Determines whether this parameter is mandatory. If the [parameter location](#parameter-in) is `"path"`, this field
552
+ * is **REQUIRED** and its value MUST be `true`. Otherwise, the field MAY be included and its default value is
553
+ * `false`.
554
+ */
555
+ required: boolean
556
+ /**
557
+ * Specifies that a parameter is deprecated and SHOULD be transitioned out of usage. Default value is `false`.
558
+ */
559
+ deprecated?: boolean
560
+ /**
561
+ * If `true`, clients MAY pass a zero-length string value in place of parameters that would otherwise be omitted
562
+ * entirely, which the server SHOULD interpret as the parameter being unused. Default value is `false`. If
563
+ * [`style`](#parameter-style) is used, and if [behavior is _n/a_ (cannot be serialized)](#style-examples), the value
564
+ * of `allowEmptyValue` SHALL be ignored. Interactions between this field and the parameter's [Schema
565
+ * Object](#schema-object) are implementation-defined. This field is valid only for `query` parameters.
566
+ * **Deprecated:** Use of this field is NOT RECOMMENDED, and it is likely to be removed in a later revision.
567
+ */
568
+ allowEmptyValue?: boolean
569
+ /**
570
+ * Example of the parameter's potential value; see [Working With Examples](#working-with-examples).
571
+ */
572
+ example?: unknown
573
+ /**
574
+ * [Reference Object](#reference-object)]
575
+ */
576
+ examples?: Record<string, ExampleObject>
577
+ /**
578
+ * Describes how the parameter value will be serialized depending on the type of the parameter value. Default values
579
+ * (based on value of `in`):
580
+ *
581
+ * - For `"query"` - `"form"`
582
+ * - For `"path"` - `"simple"`
583
+ * - For `"header"` - `"simple"`
584
+ * - For `"cookie"` - `"form"` (for compatibility reasons; note that `style: "cookie"` SHOULD be used with `in:
585
+ * "cookie"`; see [Appendix D](#appendix-d-serializing-headers-and-cookies) for details).
586
+ */
587
+ style?: string
588
+ /**
589
+ * When this is true, parameter values of type `array` or `object` generate separate parameters for each value of the
590
+ * array or key-value pair of the map. For other types of parameters, or when [`style`](#parameter-style) is
591
+ * `"deepObject"`, this field has no effect. When `style` is `"form"` or `"cookie"`, the default value is `true`. For
592
+ * all other styles, the default value is `false`.
593
+ */
594
+ explode?: boolean
595
+ /**
596
+ * When this is true, parameter values are serialized using reserved expansion, as defined by
597
+ * [RFC6570](https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.3), which allows [RFC3986's reserved character
598
+ * set](https://datatracker.ietf.org/doc/html/rfc3986#section-2.2), as well as percent-encoded triples, to pass
599
+ * through unchanged, while still percent-encoding all other disallowed characters (including `%` outside of
600
+ * percent-encoded triples). Applications are still responsible for percent-encoding reserved characters that are not
601
+ * allowed by the rules of the `in` destination or media type, or are [not allowed in the path by this
602
+ * specification](#path-templating); see [URL Percent-Encoding](#url-percent-encoding) for details. The default value
603
+ * is `false`. This field only applies to `in` and `style` values that automatically percent-encode.
604
+ */
605
+ allowReserved?: boolean
606
+ /**
607
+ * The schema defining the type used for the parameter.
608
+ */
609
+ schema?: SchemaObject
610
+ /**
611
+ * [Reference Object](#reference-object)]
612
+ */
613
+ content?: Record<string, MediaTypeObject>
614
+ }
615
+
616
+ /**
617
+ * Describes a single request body.
618
+ */
619
+ export interface RequestBodyObject {
620
+ /**
621
+ * A brief description of the request body. This could contain examples of use. [CommonMark
622
+ * syntax](https://spec.commonmark.org/) MAY be used for rich text representation.
623
+ */
624
+ description?: string
625
+ /**
626
+ * The content of the request body. The key is a media type or media type range and the value describes it. The map
627
+ * SHOULD have at least one entry; if it does not, the behavior is implementation-defined. For requests that match
628
+ * multiple keys, only the most specific key is applicable. e.g. "text/plain" overrides "text/*"
629
+ */
630
+ content?: Record<string, MediaTypeObject | ReferenceObject>
631
+ /**
632
+ * Determines if the request body is required in the request. Defaults to `false`.
633
+ */
634
+ required?: boolean
635
+ }
636
+
637
+ /**
638
+ * Each Media Type Object describes content structured in accordance with the media type identified by its key. Multiple
639
+ * Media Type Objects can be used to describe content that can appear in any of several different media types. When
640
+ * `example` or `examples` are provided, the example SHOULD match the specified schema and be in the correct format as
641
+ * specified by the media type and its encoding. The `example` and `examples` fields are mutually exclusive. See
642
+ * [Working With Examples](#working-with-examples) for further guidance regarding the different ways of specifying
643
+ * examples, including non-JSON/YAML values.
644
+ */
645
+ export interface MediaTypeObject {
646
+ /**
647
+ * A schema describing the complete content of the request, response, parameter, or header.
648
+ */
649
+ schema?: SchemaObject
650
+ /**
651
+ * A schema describing each item within a [sequential media type](#sequential-media-types).
652
+ */
653
+ itemSchema?: SchemaObject
654
+ /**
655
+ * Example of the media type; see [Working With Examples](#working-with-examples).
656
+ */
657
+ example?: unknown
658
+ /**
659
+ * [Reference Object](#reference-object)]
660
+ */
661
+ examples?: Record<string, ExampleObject>
662
+ /**
663
+ * A map between a property name and its encoding information, as defined under [Encoding By Name](#encoding-by-name).
664
+ * The `encoding` field SHALL only apply when the media type is `multipart` or `application/x-www-form-urlencoded`. If
665
+ * no Encoding Object is provided for a property, the behavior is determined by the default values documented for the
666
+ * Encoding Object. This field MUST NOT be present if `prefixEncoding` or `itemEncoding` are present.
667
+ */
668
+ encoding?: Record<string, EncodingObject>
669
+ /**
670
+ * An array of positional encoding information, as defined under [Encoding By Position](#encoding-by-position). The
671
+ * `prefixEncoding` field SHALL only apply when the media type is `multipart`. If no Encoding Object is provided for a
672
+ * property, the behavior is determined by the default values documented for the Encoding Object. This field MUST NOT
673
+ * be present if `encoding` is present.
674
+ */
675
+ prefixEncoding?: EncodingObject[]
676
+ /**
677
+ * A single Encoding Object that provides encoding information for multiple array items, as defined under [Encoding By
678
+ * Position](#encoding-by-position). The `itemEncoding` field SHALL only apply when the media type is `multipart`. If
679
+ * no Encoding Object is provided for a property, the behavior is determined by the default values documented for the
680
+ * Encoding Object. This field MUST NOT be present if `encoding` is present.
681
+ */
682
+ itemEncoding?: EncodingObject
683
+ }
684
+
685
+ /**
686
+ * A single encoding definition applied to a single value, with the mapping of Encoding Objects to values determined by
687
+ * the [Media Type Object](#media-type-object) as described under [Encoding Usage and
688
+ * Restrictions](#encoding-usage-and-restrictions). See [Appendix B](#appendix-b-data-type-conversion) for a discussion
689
+ * of converting values of various types to string representations. See [Appendix
690
+ * E](#appendix-e-percent-encoding-and-form-media-types) for a detailed examination of percent-encoding concerns for
691
+ * form media types.
692
+ */
693
+ export interface EncodingObject {
694
+ /**
695
+ * The `Content-Type` for encoding a specific property. The value is a comma-separated list, each element of which is
696
+ * either a specific media type (e.g. `image/png`) or a wildcard media type (e.g. `image/*`). The default value
697
+ * depends on the type as shown in the table below.
698
+ */
699
+ contentType?: string
700
+ /**
701
+ * [Reference Object](#reference-object)]
702
+ */
703
+ headers?: Record<string, HeaderObject>
704
+ /**
705
+ * Applies nested Encoding Objects in the same manner as the [Media Type Object](#media-type-object)'s `encoding`
706
+ * field.
707
+ */
708
+ encoding?: Record<string, EncodingObject>
709
+ /**
710
+ * Applies nested Encoding Objects in the same manner as the [Media Type Object](#media-type-object)'s
711
+ * `prefixEncoding` field.
712
+ */
713
+ prefixEncoding?: EncodingObject[]
714
+ /**
715
+ * Applies nested Encoding Objects in the same manner as the [Media Type Object](#media-type-object)'s `itemEncoding`
716
+ * field.
717
+ */
718
+ itemEncoding?: EncodingObject
719
+ /**
720
+ * Describes how a specific property value will be serialized depending on its type. See [Parameter
721
+ * Object](#parameter-object) for details on the [`style`](#parameter-style) field. The behavior follows the same
722
+ * values as `query` parameters, including the default value of `"form"` which applies only when `contentType` is
723
+ * _not_ being used due to one or both of `explode` or `allowReserved` being explicitly specified. Note that the
724
+ * initial `?` used in query strings is not used in `application/x-www-form-urlencoded` message bodies, and MUST be
725
+ * removed (if using an RFC6570 implementation) or simply not added (if constructing the string manually). This field
726
+ * SHALL be ignored if the media type is not `application/x-www-form-urlencoded` or `multipart/form-data`. If a value
727
+ * is explicitly defined, then the value of [`contentType`](#encoding-content-type) (implicit or explicit) SHALL be
728
+ * ignored.
729
+ */
730
+ style?: string
731
+ /**
732
+ * When this is true, property values of type `array` or `object` generate separate parameters for each value of the
733
+ * array, or key-value-pair of the map. For other types of properties, or when [`style`](#encoding-style) is
734
+ * `"deepObject"`, this field has no effect. When `style` is `"form"`, the default value is `true`. For all other
735
+ * styles, the default value is `false`. This field SHALL be ignored if the media type is not
736
+ * `application/x-www-form-urlencoded` or `multipart/form-data`. If a value is explicitly defined, then the value of
737
+ * [`contentType`](#encoding-content-type) (implicit or explicit) SHALL be ignored.
738
+ */
739
+ explode?: boolean
740
+ /**
741
+ * When this is true, parameter values are serialized using reserved expansion, as defined by
742
+ * [RFC6570](https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.3), which allows [RFC3986's reserved character
743
+ * set](https://datatracker.ietf.org/doc/html/rfc3986#section-2.2), as well as percent-encoded triples, to pass
744
+ * through unchanged, while still percent-encoding all other disallowed characters (including `%` outside of
745
+ * percent-encoded triples). Applications are still responsible for percent-encoding reserved characters that are not
746
+ * allowed in the target media type; see [URL Percent-Encoding](#url-percent-encoding) for details. The default value
747
+ * is `false`. This field SHALL be ignored if the media type is not `application/x-www-form-urlencoded` or
748
+ * `multipart/form-data`. If a value is explicitly defined, then the value of [`contentType`](#encoding-content-type)
749
+ * (implicit or explicit) SHALL be ignored.
750
+ */
751
+ allowReserved?: boolean
752
+ }
753
+
754
+ /**
755
+ * A container for the expected responses of an operation. The container maps a HTTP response code to the expected
756
+ * response. The documentation is not necessarily expected to cover all possible HTTP response codes because they may
757
+ * not be known in advance. However, documentation is expected to cover a successful operation response and any known
758
+ * errors. The `default` MAY be used as a default Response Object for all HTTP codes that are not covered individually
759
+ * by the Responses Object. The Responses Object MUST contain at least one response code, and if only one response code
760
+ * is provided it SHOULD be the response for a successful operation call.
761
+ */
762
+ export interface ResponsesObject {
763
+ /**
764
+ * The documentation of responses other than the ones declared for specific HTTP response codes. Use this field to
765
+ * cover undeclared responses.
766
+ */
767
+ default?: ResponseObject | ReferenceObject
768
+ /**
769
+ * Pattern: [HTTP Status Code](#http-status-codes) Any HTTP status code can be used as the property name, but only one
770
+ * property per code, to describe the expected response for that HTTP status code. This field MUST be enclosed in
771
+ * quotation marks (for example, “200”) for compatibility between JSON and YAML. To define a range of response codes,
772
+ * this field MAY contain the uppercase wildcard character X. For example, 2XX represents all response codes between
773
+ * 200 and 299. Only the following range definitions are allowed: 1XX, 2XX, 3XX, 4XX, and 5XX. If a response is
774
+ * defined using an explicit code, the explicit code definition takes precedence over the range definition for that
775
+ * code.
776
+ */
777
+ [pattern: string]: ResponseObject | ReferenceObject | undefined
778
+ }
779
+
780
+ /**
781
+ * Describes a single response from an API operation, including design-time, static `links` to operations based on the
782
+ * response.
783
+ */
784
+ export interface ResponseObject {
785
+ /**
786
+ * A short summary of the meaning of the response.
787
+ */
788
+ summary?: string
789
+ /**
790
+ * A description of the response. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text
791
+ * representation.
792
+ */
793
+ description?: string
794
+ /**
795
+ * [Reference Object](#reference-object)]
796
+ */
797
+ headers?: Record<string, HeaderObject>
798
+ /**
799
+ * [Reference Object](#reference-object)]
800
+ */
801
+ content?: Record<string, MediaTypeObject>
802
+ /**
803
+ * [Reference Object](#reference-object)]
804
+ */
805
+ links?: Record<string, LinkObject>
806
+ }
807
+
808
+ /**
809
+ * A map of possible out-of band callbacks related to the parent operation. Each value in the map is a [Path Item
810
+ * Object](#path-item-object) that describes a set of requests that may be initiated by the API provider and the
811
+ * expected responses. The key value used to identify the Path Item Object is an expression, evaluated at runtime, that
812
+ * identifies a URL to use for the callback operation. To describe incoming requests from the API provider independent
813
+ * from another API call, use the [`webhooks`](#oas-webhooks) field. Pattern: {expression} A Path Item Object used to
814
+ * define a callback request and expected responses. A [complete
815
+ * example](https://learn.openapis.org/examples/v3.0/callback-example.html) is available.
816
+ */
817
+ export type CallbackObject = Record<string, PathItemObject>
818
+
819
+ /**
820
+ * The Link Object represents a possible design-time link for a response. The presence of a link does not guarantee the
821
+ * caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between
822
+ * responses and other operations. Unlike _dynamic_ links (i.e. links provided **in** the response payload), the OAS
823
+ * linking mechanism does not require link information in the runtime response. For computing links and providing
824
+ * instructions to execute them, a [runtime expression](#runtime-expressions) is used for accessing values in an
825
+ * operation and using them as parameters while invoking the linked operation.
826
+ */
827
+ export interface LinkObject {
828
+ /**
829
+ * A URI reference to an OAS operation. This field is mutually exclusive of the `operationId` field, and MUST point to
830
+ * an [Operation Object](#operation-object). Relative `operationRef` values MAY be used to locate an existing
831
+ * [Operation Object](#operation-object) in the OpenAPI Description.
832
+ */
833
+ operationRef?: string
834
+ /**
835
+ * The name of an _existing_, resolvable OAS operation, as defined with a unique `operationId`. This field is mutually
836
+ * exclusive of the `operationRef` field.
837
+ */
838
+ operationId?: string
839
+ /**
840
+ * A map representing parameters to pass to an operation as specified with operationId or identified via
841
+ * `operationRef`. The key is the parameter name to be used (optionally qualified with the parameter location, e.g.
842
+ * path.id for an id parameter in the path), whereas the value can be a constant or an expression to be evaluated and
843
+ * passed to the linked operation.
844
+ */
845
+ parameters?: Record<string, unknown>
846
+ /**
847
+ * [{expression}](#runtime-expressions)
848
+ */
849
+ requestBody?: unknown
850
+ /**
851
+ * A description of the link. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text
852
+ * representation.
853
+ */
854
+ description?: string
855
+ /**
856
+ * A server object to be used by the target operation.
857
+ */
858
+ server?: ServerObject
859
+ }
860
+
861
+ /**
862
+ * Describes a single header for [HTTP responses](#response-headers) and for [individual parts in `multipart`
863
+ * representations](#encoding-headers); see the relevant [Response Object](#response-object) and [Encoding
864
+ * Object](#encoding-object) documentation for restrictions on which headers can be described. The Header Object follows
865
+ * the structure of the [Parameter Object](#parameter-object), including determining its serialization strategy based on
866
+ * whether `schema` or `content` is present, with the following changes:
867
+ *
868
+ * 1. `name` MUST NOT be specified, it is given in the corresponding `headers` map.
869
+ * 2. `in` MUST NOT be specified, it is implicitly in `header`.
870
+ * 3. All traits that are affected by the location MUST be applicable to a location of `header` (for example,
871
+ * [`style`](#parameter-style)). This means that `allowEmptyValue` MUST NOT be used, and `style`, if used, MUST be
872
+ * limited to `"simple"`.
873
+ * 4. `name` MUST NOT be specified, it is given in the corresponding `headers` map.
874
+ * 5. `in` MUST NOT be specified, it is implicitly in `header`.
875
+ * 6. All traits that are affected by the location MUST be applicable to a location of `header` (for example,
876
+ * [`style`](#parameter-style)). This means that `allowEmptyValue` MUST NOT be used, and `style`, if used, MUST be
877
+ * limited to `"simple"`.
878
+ */
879
+ export interface HeaderObject {
880
+ /**
881
+ * A brief description of the header. This could contain examples of use. [CommonMark
882
+ * syntax](https://spec.commonmark.org/) MAY be used for rich text representation.
883
+ */
884
+ description?: string
885
+ /**
886
+ * Determines whether this header is mandatory. The default value is `false`.
887
+ */
888
+ required?: boolean
889
+ /**
890
+ * Specifies that the header is deprecated and SHOULD be transitioned out of usage. Default value is `false`.
891
+ */
892
+ deprecated?: boolean
893
+ /**
894
+ * Example of the header's potential value; see [Working With Examples](#working-with-examples).
895
+ */
896
+ example?: unknown
897
+ /**
898
+ * [Reference Object](#reference-object)]
899
+ */
900
+ examples?: Record<string, ExampleObject>
901
+ /**
902
+ * Describes how the header value will be serialized. The default (and only legal value for headers) is `"simple"`.
903
+ */
904
+ style?: string
905
+ /**
906
+ * When this is true, header values of type `array` or `object` generate a single header whose value is a
907
+ * comma-separated list of the array items or key-value pairs of the map, see [Style Examples](#style-examples). For
908
+ * other data types this field has no effect. The default value is `false`.
909
+ */
910
+ explode?: boolean
911
+ /**
912
+ * The schema defining the type used for the header.
913
+ */
914
+ schema?: SchemaObject
915
+ /**
916
+ * [Reference Object](#reference-object)]
917
+ */
918
+ content?: Record<string, MediaTypeObject>
919
+ }
920
+
921
+ /**
922
+ * Adds metadata to a single tag that is used by the [Operation Object](#operation-object). It is not mandatory to have
923
+ * a Tag Object per tag defined in the Operation Object instances.
924
+ */
925
+ export interface TagObject {
926
+ /**
927
+ * The name of the tag. Use this value in the `tags` array of an Operation.
928
+ */
929
+ name: string
930
+ /**
931
+ * A short summary of the tag, used for display purposes.
932
+ */
933
+ summary?: string
934
+ /**
935
+ * A description for the tag. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text
936
+ * representation.
937
+ */
938
+ description?: string
939
+ /**
940
+ * Additional external documentation for this tag.
941
+ */
942
+ externalDocs?: ExternalDocumentationObject
943
+ /**
944
+ * The `name` of a tag that this tag is nested under. The named tag MUST exist in the API description, and circular
945
+ * references between parent and child tags MUST NOT be used.
946
+ */
947
+ parent?: string
948
+ /**
949
+ * A machine-readable string to categorize what sort of tag it is. Any string value can be used; common uses are `nav`
950
+ * for Navigation, `badge` for visible badges, `audience` for APIs used by different groups. A [registry of the most
951
+ * commonly used values](https://spec.openapis.org/registry/tag-kind/) is available.
952
+ */
953
+ kind?: string
954
+ }
955
+
956
+ /**
957
+ * A simple object to allow referencing other components in the OpenAPI Description, internally and externally. The
958
+ * `$ref` string value contains a URI [RFC3986](https://tools.ietf.org/html/rfc3986), which identifies the value being
959
+ * referenced. See the rules for resolving [Relative References](#relative-references-in-api-description-uris).
960
+ */
961
+ export interface ReferenceObject {
962
+ /**
963
+ * The reference identifier. This MUST be in the form of a URI.
964
+ */
965
+ $ref: string
966
+ /**
967
+ * A short summary which by default SHOULD override that of the referenced component. If the referenced object-type
968
+ * does not allow a `summary` field, then this field has no effect.
969
+ */
970
+ summary?: string
971
+ /**
972
+ * A description which by default SHOULD override that of the referenced component. [CommonMark
973
+ * syntax](https://spec.commonmark.org/) MAY be used for rich text representation. If the referenced object-type does
974
+ * not allow a `description` field, then this field has no effect.
975
+ */
976
+ description?: string
977
+ }
978
+
979
+ /**
980
+ * The Schema Object allows the definition of input and output data types. These types can be objects, but also
981
+ * primitives and arrays. This object is a superset of the [JSON Schema Specification Draft
982
+ * 2020-12](https://www.ietf.org/archive/id/draft-bhutton-json-schema-01.html). The empty schema (which allows any
983
+ * instance to validate) MAY be represented by the boolean value `true` and a schema which allows no instance to
984
+ * validate MAY be represented by the boolean value `false`. For more information about the keywords, see [JSON Schema
985
+ * Core](https://www.ietf.org/archive/id/draft-bhutton-json-schema-01.html) and [JSON Schema
986
+ * Validation](https://www.ietf.org/archive/id/draft-bhutton-json-schema-validation-01.html). Unless stated otherwise,
987
+ * the keyword definitions follow those of JSON Schema and do not add any additional semantics; this includes keywords
988
+ * such as `$schema`, `$id`, `$ref`, and `$dynamicRef` being URIs rather than URLs. Where JSON Schema indicates that
989
+ * behavior is defined by the application (e.g. for annotations), OAS also defers the definition of semantics to the
990
+ * application consuming the OpenAPI document.
991
+ */
992
+ export type SchemaObject = JSONSchema & {
993
+ /**
994
+ * The discriminator provides a "hint" for which of a set of schemas a payload is expected to satisfy. See
995
+ * [Composition and Inheritance](#composition-and-inheritance-polymorphism) for more details.
996
+ */
997
+ discriminator?: DiscriminatorObject
998
+ /**
999
+ * Adds additional metadata to describe the XML representation of this schema.
1000
+ */
1001
+ xml?: XMLObject
1002
+ /**
1003
+ * Additional external documentation for this schema.
1004
+ */
1005
+ externalDocs?: ExternalDocumentationObject
1006
+ /**
1007
+ * A free-form field to include an example of an instance for this schema. To represent examples that cannot be
1008
+ * naturally represented in JSON or YAML, a string value can be used to contain the example with escaping where
1009
+ * necessary. **Deprecated:** The `example` field has been deprecated in favor of the JSON Schema `examples` keyword.
1010
+ * Use of `example` is discouraged, and later versions of this specification may remove it.
1011
+ */
1012
+ example?: unknown
1013
+ }
1014
+
1015
+ /**
1016
+ * When request bodies or response payloads may be one of a number of different schemas, these should use the JSON
1017
+ * Schema `anyOf` or `oneOf` keywords to describe the possible schemas (see [Composition and
1018
+ * Inheritance](#composition-and-inheritance-polymorphism)). A polymorphic schema MAY include a Discriminator Object,
1019
+ * which defines the name of the property that may be used as a hint for which schema of the `anyOf` or `oneOf`, or
1020
+ * which schema that references the current schema in an `allOf`, is expected to validate the structure of the model.
1021
+ * This hint can be used to aid in serialization, deserialization, and validation. The Discriminator Object does this by
1022
+ * implicitly or explicitly associating the possible values of a named property with alternative schemas. Note that
1023
+ * `discriminator` MUST NOT change the validation outcome of the schema.
1024
+ */
1025
+ export interface DiscriminatorObject {
1026
+ /**
1027
+ * The name of the discriminating property in the payload that will hold the discriminating value. The discriminating
1028
+ * property MAY be defined as required or optional, but when defined as optional the Discriminator Object MUST include
1029
+ * a `defaultMapping` field that specifies which schema is expected to validate the structure of the model when the
1030
+ * discriminating property is not present.
1031
+ */
1032
+ propertyName: string
1033
+ /**
1034
+ * An object to hold mappings between payload values and schema names or URI references.
1035
+ */
1036
+ mapping?: Record<string, string>
1037
+ /**
1038
+ * The schema name or URI reference to a schema that is expected to validate the structure of the model when the
1039
+ * discriminating property is not present in the payload or contains a value for which there is no explicit or
1040
+ * implicit mapping.
1041
+ */
1042
+ defaultMapping?: string
1043
+ }
1044
+
1045
+ /**
1046
+ * A metadata object that allows for more fine-tuned XML model definitions. When using a Schema Object with XML, if no
1047
+ * XML Object is present, the behavior is determined by the XML Object's default field values.
1048
+ */
1049
+ export interface XMLObject {
1050
+ /**
1051
+ * One of `element`, `attribute`, `text`, `cdata`, or `none`, as explained under [XML Node Types](#xml-node-types).
1052
+ * The default value is `none` if `$ref`, `$dynamicRef`, or `type: "array"` is present in the [Schema
1053
+ * Object](#schema-object) containing the XML Object, and `element` otherwise.
1054
+ */
1055
+ nodeType?: string
1056
+ /**
1057
+ * Sets the name of the element/attribute corresponding to the schema, replacing the name that was inferred as
1058
+ * described under [XML Node Names](#xml-node-names). This field SHALL be ignored if the `nodeType` is `text`,
1059
+ * `cdata`, or `none`.
1060
+ */
1061
+ name?: string
1062
+ /**
1063
+ * The IRI ([[RFC3987]]) of the namespace definition. Value MUST be in the form of a non-relative IRI.
1064
+ */
1065
+ namespace?: string
1066
+ /**
1067
+ * The prefix to be used for the [name](#xml-name).
1068
+ */
1069
+ prefix?: string
1070
+ /**
1071
+ * Declares whether the property definition translates to an attribute instead of an element. Default value is
1072
+ * `false`. If `nodeType` is present, this field MUST NOT be present. **Deprecated:** Use `nodeType: "attribute"`
1073
+ * instead of `attribute: true`
1074
+ */
1075
+ attribute?: boolean
1076
+ /**
1077
+ * MAY be used only for an array definition. Signifies whether the array is wrapped (for example, `) or unwrapped (`).
1078
+ *
1079
+ * - Default value is `false`. The definition takes effect only when defined alongside `type` being `"array"` (outside
1080
+ * the `items`). If `nodeType` is present, this field MUST NOT be present. **Deprecated:** Use `nodeType: "element"`
1081
+ * instead of `wrapped: true`
1082
+ * - Default value is `false`. The definition takes effect only when defined alongside `type` being `"array"` (outside
1083
+ * the `items`). If `nodeType` is present, this field MUST NOT be present. **Deprecated:** Use `nodeType: "element"`
1084
+ * instead of `wrapped: true`
1085
+ */
1086
+ wrapped?: boolean
1087
+ }
1088
+
1089
+ /**
1090
+ * Defines a security scheme that can be used by the operations. Supported schemes are HTTP authentication, an API key
1091
+ * (either as a header, a cookie parameter or as a query parameter), mutual TLS (use of a client certificate), OAuth2's
1092
+ * common flows (implicit, password, client credentials and authorization code) as defined in
1093
+ * [RFC6749](https://tools.ietf.org/html/rfc6749), OAuth2 device authorization flow as defined in
1094
+ * [RFC8628](https://tools.ietf.org/html/rfc8628), and [[OpenID-Connect-Core]]. Please note that as of 2020, the
1095
+ * implicit flow is about to be deprecated by [OAuth 2.0 Security Best Current
1096
+ * Practice](https://tools.ietf.org/html/draft-ietf-oauth-security-topics). Recommended for most use cases is
1097
+ * Authorization Code Grant flow with PKCE.
1098
+ */
1099
+ export type SecuritySchemeObject =
1100
+ | HttpSecurityScheme
1101
+ | ApiKeySecurityScheme
1102
+ | OAuth2SecurityScheme
1103
+ | OpenIdSecurityScheme
1104
+
1105
+ interface SecuritySchemeBase {
1106
+ description?: string
1107
+ deprecated?: boolean
1108
+ }
1109
+
1110
+ export interface HttpSecurityScheme extends SecuritySchemeBase {
1111
+ type: 'http'
1112
+ /**
1113
+ * The name of the HTTP Authentication scheme to be used in the Authorization header as defined in [RFC9110] Section
1114
+ * 16.4.1. The values used SHOULD be registered in the IANA Authentication Scheme registry. The value is
1115
+ * case-insensitive, as defined in [RFC9110] Section 11.1.
1116
+ */
1117
+ scheme: 'Basic' | 'Bearer' | string
1118
+ /**
1119
+ * A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an
1120
+ * authorization server, so this information is primarily for documentation purposes.
1121
+ */
1122
+ bearerFormat?: string
1123
+ }
1124
+
1125
+ export interface ApiKeySecurityScheme extends SecuritySchemeBase {
1126
+ type: 'apiKey'
1127
+ /**
1128
+ * The name of the header, query or cookie parameter to be used.
1129
+ */
1130
+ name: string
1131
+ /**
1132
+ * The location of the API key.
1133
+ */
1134
+ in: 'query' | 'header' | 'cookie'
1135
+ }
1136
+
1137
+ export interface OAuth2SecurityScheme extends SecuritySchemeBase {
1138
+ type: 'oauth2'
1139
+ /**
1140
+ * An object containing configuration information for the flow types supported.
1141
+ */
1142
+ flows: OAuthFlowsObject
1143
+ }
1144
+
1145
+ export interface OpenIdSecurityScheme extends SecuritySchemeBase {
1146
+ type: 'openIdConnect'
1147
+ /**
1148
+ * OpenID Connect Discovery URL as defined by [OpenID-Connect-Discovery-1.0].
1149
+ */
1150
+ openIdConnectUrl: string
1151
+ }
1152
+
1153
+ /**
1154
+ * Allows configuration of the supported OAuth Flows.
1155
+ */
1156
+ export interface OAuthFlowsObject {
1157
+ /**
1158
+ * Configuration for the OAuth Implicit flow
1159
+ */
1160
+ implicit?: ImplicitOAuthFlowObject
1161
+ /**
1162
+ * Configuration for the OAuth Resource Owner Password flow
1163
+ */
1164
+ password?: PasswordOAuthFlowObject
1165
+ /**
1166
+ * Configuration for the OAuth Client Credentials flow. Previously called `application` in OpenAPI 2.0.
1167
+ */
1168
+ clientCredentials?: ClientCredentialsOAuthFlowObject
1169
+ /**
1170
+ * Configuration for the OAuth Authorization Code flow. Previously called `accessCode` in OpenAPI 2.0.
1171
+ */
1172
+ authorizationCode?: AuthorizationCodeOAuthFlowObject
1173
+ /**
1174
+ * Configuration for the OAuth Device Authorization flow.
1175
+ */
1176
+ deviceAuthorization?: DeviceAuthorizationOAuthFlowObject
1177
+ }
1178
+
1179
+ /**
1180
+ * Configuration details for a supported OAuth Flow
1181
+ */
1182
+ export interface OAuthFlowObject {
1183
+ /**
1184
+ * The authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the
1185
+ * use of TLS. Applies To:
1186
+ *
1187
+ * - Implicit
1188
+ * - AuthorizationCode
1189
+ */
1190
+ authorizationUrl?: string
1191
+ /**
1192
+ * The device authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard
1193
+ * requires the use of TLS. Applies To:
1194
+ *
1195
+ * - DeviceAuthorization
1196
+ */
1197
+ deviceAuthorizationUrl?: string
1198
+ /**
1199
+ * The device authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard
1200
+ * requires the use of TLS. Applies To:
1201
+ *
1202
+ * - Password
1203
+ * - ClientCredentials
1204
+ * - AuthorizationCode
1205
+ * - DeviceAuthorization
1206
+ */
1207
+ tokenUrl?: string
1208
+ /**
1209
+ * The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2 standard requires
1210
+ * the use of TLS.
1211
+ */
1212
+ refreshUrl?: string
1213
+ /**
1214
+ * The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it.
1215
+ * The map MAY be empty.
1216
+ */
1217
+ scopes: Record<string, string>
1218
+ }
1219
+
1220
+ export interface ImplicitOAuthFlowObject extends OAuthFlowObject {
1221
+ authorizationUrl: string
1222
+ }
1223
+
1224
+ export interface AuthorizationCodeOAuthFlowObject extends OAuthFlowObject {
1225
+ authorizationUrl: string
1226
+ tokenUrl: string
1227
+ }
1228
+
1229
+ export interface PasswordOAuthFlowObject extends OAuthFlowObject {
1230
+ tokenUrl: string
1231
+ }
1232
+
1233
+ export interface ClientCredentialsOAuthFlowObject extends OAuthFlowObject {
1234
+ tokenUrl: string
1235
+ }
1236
+
1237
+ export interface DeviceAuthorizationOAuthFlowObject extends OAuthFlowObject {
1238
+ deviceAuthorizationUrl: string
1239
+ tokenUrl: string
1240
+ }
1241
+
1242
+ /**
1243
+ * Lists the required security schemes to execute this operation. The name used for each property MUST either correspond
1244
+ * to a security scheme declared in the [Security Schemes](#components-security-schemes) under the [Components
1245
+ * Object](#components-object), or be the URI of a Security Scheme Object. Property names that are identical to a
1246
+ * component name under the Components Object MUST be treated as a component name. To reference a Security Scheme with a
1247
+ * single-segment relative URI reference (e.g. `foo`) that collides with a component name (e.g.
1248
+ * `#/components/securitySchemes/foo`), use the `.` path segment (e.g. `./foo`). Using a Security Scheme component name
1249
+ * that appears to be a URI is NOT RECOMMENDED, as the precedence of component-name-matching over URI resolution, which
1250
+ * is necessary to maintain compatibility with prior OAS versions, is counter-intuitive. See also [Security
1251
+ * Considerations](#security-considerations). A Security Requirement Object MAY refer to multiple security schemes in
1252
+ * which case all schemes MUST be satisfied for a request to be authorized. This enables support for scenarios where
1253
+ * multiple query parameters or HTTP headers are required to convey security information. When the `security` field is
1254
+ * defined on the [OpenAPI Object](#openapi-object) or [Operation Object](#operation-object) and contains multiple
1255
+ * Security Requirement Objects, only one of the entries in the list needs to be satisfied to authorize the request.
1256
+ * This enables support for scenarios where the API allows multiple, independent security schemes. An empty Security
1257
+ * Requirement Object (`{}`) indicates anonymous access is supported.
1258
+ */
1259
+ export type SecurityRequirementObject = Record<string, string[]>