oas 33.2.0 → 34.0.2

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.
@@ -15,7 +15,7 @@
15
15
 
16
16
 
17
17
 
18
- var _chunk2X4PY2BScjs = require('./chunk-2X4PY2BS.cjs');
18
+ var _chunkV4IQC5XFcjs = require('./chunk-V4IQC5XF.cjs');
19
19
 
20
20
 
21
21
  var _chunkAYA3UT4Lcjs = require('./chunk-AYA3UT4L.cjs');
@@ -56,7 +56,7 @@ function usesPolymorphism(schema) {
56
56
  return false;
57
57
  }
58
58
  function objectify(thing) {
59
- if (!_chunk2X4PY2BScjs.isObject.call(void 0, thing)) {
59
+ if (!_chunkV4IQC5XFcjs.isObject.call(void 0, thing)) {
60
60
  return {};
61
61
  }
62
62
  return thing;
@@ -70,20 +70,6 @@ function normalizeArray(arr) {
70
70
  function isFunc(thing) {
71
71
  return typeof thing === "function";
72
72
  }
73
- function deeplyStripKey(input, keyToStrip, predicate) {
74
- if (typeof input !== "object" || Array.isArray(input) || input === null || !keyToStrip) {
75
- return input;
76
- }
77
- const obj = { ...input };
78
- Object.keys(obj).forEach((k) => {
79
- if (k === keyToStrip && _optionalChain([predicate, 'optionalCall', _2 => _2(obj[k], k)])) {
80
- delete obj[k];
81
- return;
82
- }
83
- obj[k] = deeplyStripKey(obj[k], keyToStrip, predicate);
84
- });
85
- return obj;
86
- }
87
73
 
88
74
  // src/samples/index.ts
89
75
  var sampleDefaults = (genericSample) => {
@@ -135,7 +121,7 @@ function sampleFromSchema(schema, opts = {}) {
135
121
  if (seenRefs.has(refToRelease)) {
136
122
  return void 0;
137
123
  }
138
- objectifySchema = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, objectifySchema, opts.definition, seenRefs);
124
+ objectifySchema = _chunkV4IQC5XFcjs.dereferenceRef.call(void 0, objectifySchema, opts.definition, seenRefs);
139
125
  if (!objectifySchema || _chunk3MTU2ESPcjs.isRef.call(void 0, objectifySchema)) {
140
126
  return void 0;
141
127
  }
@@ -150,6 +136,11 @@ function sampleFromSchema(schema, opts = {}) {
150
136
  }
151
137
  function sampleFromResolvedSchema(schema, opts, seenRefs) {
152
138
  let { type } = schema;
139
+ const { example, additionalProperties, properties, items } = schema;
140
+ const { includeReadOnly, includeWriteOnly } = opts;
141
+ if (example !== void 0) {
142
+ return _chunkV4IQC5XFcjs.dereferenceRefDeep.call(void 0, example, opts.definition, seenRefs);
143
+ }
153
144
  const hasPolymorphism = usesPolymorphism(schema);
154
145
  if (hasPolymorphism === "allOf") {
155
146
  try {
@@ -157,7 +148,7 @@ function sampleFromResolvedSchema(schema, opts, seenRefs) {
157
148
  const resolvedAllOf = schema.allOf.map((subSchema) => {
158
149
  let sub = objectify(subSchema);
159
150
  if (definition && _chunk3MTU2ESPcjs.isRef.call(void 0, sub)) {
160
- const resolved = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, sub, definition, /* @__PURE__ */ new Set());
151
+ const resolved = _chunkV4IQC5XFcjs.dereferenceRef.call(void 0, sub, definition, /* @__PURE__ */ new Set());
161
152
  if (resolved && !_chunk3MTU2ESPcjs.isRef.call(void 0, resolved)) {
162
153
  sub = resolved;
163
154
  }
@@ -194,14 +185,6 @@ function sampleFromResolvedSchema(schema, opts, seenRefs) {
194
185
  }
195
186
  return samples[0];
196
187
  }
197
- const { example, additionalProperties, properties, items } = schema;
198
- const { includeReadOnly, includeWriteOnly } = opts;
199
- if (example !== void 0) {
200
- const cleanedExample = deeplyStripKey(example, "$$ref", (val) => {
201
- return typeof val === "string" && val.indexOf("#") > -1;
202
- });
203
- return _chunk2X4PY2BScjs.dereferenceRefDeep.call(void 0, cleanedExample, opts.definition, seenRefs);
204
- }
205
188
  if (!type) {
206
189
  if (properties || additionalProperties) {
207
190
  type = "object";
@@ -215,16 +198,16 @@ function sampleFromResolvedSchema(schema, opts, seenRefs) {
215
198
  const props = objectify(properties);
216
199
  const obj = {};
217
200
  for (const name in props) {
218
- if (_optionalChain([props, 'optionalAccess', _3 => _3[name], 'access', _4 => _4.deprecated])) {
201
+ if (_optionalChain([props, 'optionalAccess', _2 => _2[name], 'access', _3 => _3.deprecated])) {
219
202
  continue;
220
203
  }
221
- if (_optionalChain([props, 'optionalAccess', _5 => _5[name], 'access', _6 => _6.readOnly]) && !includeReadOnly) {
204
+ if (_optionalChain([props, 'optionalAccess', _4 => _4[name], 'access', _5 => _5.readOnly]) && !includeReadOnly) {
222
205
  continue;
223
206
  }
224
- if (_optionalChain([props, 'optionalAccess', _7 => _7[name], 'access', _8 => _8.writeOnly]) && !includeWriteOnly) {
207
+ if (_optionalChain([props, 'optionalAccess', _6 => _6[name], 'access', _7 => _7.writeOnly]) && !includeWriteOnly) {
225
208
  continue;
226
209
  }
227
- if (_optionalChain([props, 'access', _9 => _9[name], 'access', _10 => _10.examples, 'optionalAccess', _11 => _11.length])) {
210
+ if (_optionalChain([props, 'access', _8 => _8[name], 'access', _9 => _9.examples, 'optionalAccess', _10 => _10.length])) {
228
211
  obj[name] = props[name].examples[0];
229
212
  continue;
230
213
  }
@@ -278,8 +261,8 @@ var samples_default = memo;
278
261
  // src/operation/lib/get-mediatype-examples.ts
279
262
  function getMediaTypeExamples(mediaType, mediaTypeObject, definition, opts = {}) {
280
263
  if (mediaTypeObject.example) {
281
- mediaTypeObject.example = _chunk2X4PY2BScjs.dereferenceRefDeep.call(void 0, mediaTypeObject.example, definition);
282
- if (mediaTypeObject.example === void 0 || _chunk2X4PY2BScjs.collectRefsInSchema.call(void 0, mediaTypeObject.example).size > 0) {
264
+ mediaTypeObject.example = _chunkV4IQC5XFcjs.dereferenceRefDeep.call(void 0, mediaTypeObject.example, definition);
265
+ if (mediaTypeObject.example === void 0 || _chunkV4IQC5XFcjs.collectRefsInSchema.call(void 0, mediaTypeObject.example).size > 0) {
283
266
  return [];
284
267
  }
285
268
  return [
@@ -295,7 +278,7 @@ function getMediaTypeExamples(mediaType, mediaTypeObject, definition, opts = {})
295
278
  let example = examples[key];
296
279
  if (example !== null && typeof example === "object") {
297
280
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, example)) {
298
- example = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, example, definition);
281
+ example = _chunkV4IQC5XFcjs.dereferenceRef.call(void 0, example, definition);
299
282
  if (!example || _chunk3MTU2ESPcjs.isRef.call(void 0, example)) {
300
283
  return false;
301
284
  }
@@ -307,8 +290,8 @@ function getMediaTypeExamples(mediaType, mediaTypeObject, definition, opts = {})
307
290
  description = example.description;
308
291
  }
309
292
  if ("value" in example) {
310
- example.value = _chunk2X4PY2BScjs.dereferenceRefDeep.call(void 0, example.value, definition);
311
- if (example.value === void 0 || _chunk2X4PY2BScjs.collectRefsInSchema.call(void 0, example.value).size > 0) {
293
+ example.value = _chunkV4IQC5XFcjs.dereferenceRefDeep.call(void 0, example.value, definition);
294
+ if (example.value === void 0 || _chunkV4IQC5XFcjs.collectRefsInSchema.call(void 0, example.value).size > 0) {
312
295
  return false;
313
296
  }
314
297
  example = example.value;
@@ -325,7 +308,7 @@ function getMediaTypeExamples(mediaType, mediaTypeObject, definition, opts = {})
325
308
  }
326
309
  }
327
310
  if (mediaTypeObject.schema) {
328
- if (!_chunk2X4PY2BScjs.matches_mimetype_default.xml(mediaType)) {
311
+ if (!_chunkV4IQC5XFcjs.matches_mimetype_default.xml(mediaType)) {
329
312
  return [
330
313
  {
331
314
  value: samples_default(structuredClone(mediaTypeObject.schema), {
@@ -342,17 +325,17 @@ function getMediaTypeExamples(mediaType, mediaTypeObject, definition, opts = {})
342
325
  // src/operation/lib/get-response-examples.ts
343
326
  function getResponseExamples(operation, definition) {
344
327
  return Object.keys(operation.responses || {}).map((status) => {
345
- let response = _optionalChain([operation, 'access', _12 => _12.responses, 'optionalAccess', _13 => _13[status]]);
328
+ let response = _optionalChain([operation, 'access', _11 => _11.responses, 'optionalAccess', _12 => _12[status]]);
346
329
  let onlyHeaders = false;
347
330
  if (!response) return false;
348
331
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, response)) {
349
- response = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, response, definition);
332
+ response = _chunkV4IQC5XFcjs.dereferenceRef.call(void 0, response, definition);
350
333
  if (!response || _chunk3MTU2ESPcjs.isRef.call(void 0, response)) return false;
351
334
  }
352
335
  const mediaTypes = {};
353
- (_optionalChain([response, 'optionalAccess', _14 => _14.content]) ? Object.keys(response.content) : []).forEach((mediaType) => {
336
+ (_optionalChain([response, 'optionalAccess', _13 => _13.content]) ? Object.keys(response.content) : []).forEach((mediaType) => {
354
337
  if (!mediaType) return;
355
- const mediaTypeObject = _optionalChain([response, 'access', _15 => _15.content, 'optionalAccess', _16 => _16[mediaType]]);
338
+ const mediaTypeObject = _optionalChain([response, 'access', _14 => _14.content, 'optionalAccess', _15 => _15[mediaType]]);
356
339
  if (!mediaTypeObject) return;
357
340
  const examples = getMediaTypeExamples(mediaType, mediaTypeObject, definition, {
358
341
  includeReadOnly: true,
@@ -383,17 +366,17 @@ function getCallbackExamples(operation, definition) {
383
366
  return [];
384
367
  }
385
368
  const examples = Object.keys(operation.callbacks).map((identifier) => {
386
- let callback = _optionalChain([operation, 'access', _17 => _17.callbacks, 'optionalAccess', _18 => _18[identifier]]);
369
+ let callback = _optionalChain([operation, 'access', _16 => _16.callbacks, 'optionalAccess', _17 => _17[identifier]]);
387
370
  if (!callback) return [];
388
371
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, callback)) {
389
- callback = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, callback, definition);
372
+ callback = _chunkV4IQC5XFcjs.dereferenceRef.call(void 0, callback, definition);
390
373
  if (!callback || _chunk3MTU2ESPcjs.isRef.call(void 0, callback)) return [];
391
374
  }
392
375
  const items = Object.keys(callback).map((expression) => {
393
376
  let callbackPath = callback[expression];
394
377
  if (!callbackPath) return [];
395
378
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, callbackPath)) {
396
- callbackPath = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, callbackPath, definition);
379
+ callbackPath = _chunkV4IQC5XFcjs.dereferenceRef.call(void 0, callbackPath, definition);
397
380
  if (!callbackPath || _chunk3MTU2ESPcjs.isRef.call(void 0, callbackPath)) return [];
398
381
  }
399
382
  return Object.keys(callbackPath).map((method) => {
@@ -443,7 +426,7 @@ function getExampleGroups(operation) {
443
426
  const namelessCodeSampleCounts = {};
444
427
  const groups = {};
445
428
  const codeSamples = _chunkAYA3UT4Lcjs.getExtension.call(void 0, "code-samples", operation.api, operation);
446
- _optionalChain([codeSamples, 'optionalAccess', _19 => _19.forEach, 'call', _20 => _20((sample, i) => {
429
+ _optionalChain([codeSamples, 'optionalAccess', _18 => _18.forEach, 'call', _19 => _19((sample, i) => {
447
430
  if (namelessCodeSampleCounts[sample.language]) {
448
431
  namelessCodeSampleCounts[sample.language] += 1;
449
432
  } else {
@@ -451,7 +434,7 @@ function getExampleGroups(operation) {
451
434
  }
452
435
  const name = getDefaultName(sample, namelessCodeSampleCounts);
453
436
  if (sample.correspondingExample) {
454
- if (_optionalChain([groups, 'access', _21 => _21[sample.correspondingExample], 'optionalAccess', _22 => _22.customCodeSamples, 'optionalAccess', _23 => _23.length])) {
437
+ if (_optionalChain([groups, 'access', _20 => _20[sample.correspondingExample], 'optionalAccess', _21 => _21.customCodeSamples, 'optionalAccess', _22 => _22.length])) {
455
438
  groups[sample.correspondingExample].customCodeSamples.push({ ...sample, name, originalIndex: i });
456
439
  } else if (sample.correspondingExample) {
457
440
  groups[sample.correspondingExample] = {
@@ -459,7 +442,7 @@ function getExampleGroups(operation) {
459
442
  customCodeSamples: [{ ...sample, name, originalIndex: i }]
460
443
  };
461
444
  }
462
- } else if (_optionalChain([groups, 'access', _24 => _24[noCorrespondingResponseKey], 'optionalAccess', _25 => _25.customCodeSamples, 'optionalAccess', _26 => _26.length])) {
445
+ } else if (_optionalChain([groups, 'access', _23 => _23[noCorrespondingResponseKey], 'optionalAccess', _24 => _24.customCodeSamples, 'optionalAccess', _25 => _25.length])) {
463
446
  groups[noCorrespondingResponseKey].customCodeSamples.push({ ...sample, name, originalIndex: i });
464
447
  } else {
465
448
  groups[noCorrespondingResponseKey] = {
@@ -476,16 +459,16 @@ function getExampleGroups(operation) {
476
459
  Object.entries(param.examples || {}).forEach(([exampleKey, paramExample]) => {
477
460
  let example = paramExample;
478
461
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, example)) {
479
- example = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, example, operation.api);
462
+ example = _chunkV4IQC5XFcjs.dereferenceRef.call(void 0, example, operation.api);
480
463
  if (!example || _chunk3MTU2ESPcjs.isRef.call(void 0, example)) return;
481
464
  }
482
465
  groups[exampleKey] = {
483
466
  ...groups[exampleKey],
484
- name: _optionalChain([groups, 'access', _27 => _27[exampleKey], 'optionalAccess', _28 => _28.name]) || example.summary || exampleKey,
467
+ name: _optionalChain([groups, 'access', _26 => _26[exampleKey], 'optionalAccess', _27 => _27.name]) || example.summary || exampleKey,
485
468
  request: {
486
- ..._optionalChain([groups, 'access', _29 => _29[exampleKey], 'optionalAccess', _30 => _30.request]),
469
+ ..._optionalChain([groups, 'access', _28 => _28[exampleKey], 'optionalAccess', _29 => _29.request]),
487
470
  [param.in]: {
488
- ..._optionalChain([groups, 'access', _31 => _31[exampleKey], 'optionalAccess', _32 => _32.request, 'optionalAccess', _33 => _33[param.in]]),
471
+ ..._optionalChain([groups, 'access', _30 => _30[exampleKey], 'optionalAccess', _31 => _31.request, 'optionalAccess', _32 => _32[param.in]]),
489
472
  [param.name]: example.value
490
473
  }
491
474
  }
@@ -498,9 +481,9 @@ function getExampleGroups(operation) {
498
481
  const mediaType = requestExample.mediaType === "application/x-www-form-urlencoded" ? "formData" : "body";
499
482
  groups[mediaTypeExample.title] = {
500
483
  ...groups[mediaTypeExample.title],
501
- name: _optionalChain([groups, 'access', _34 => _34[mediaTypeExample.title], 'optionalAccess', _35 => _35.name]) || mediaTypeExample.summary || mediaTypeExample.title,
484
+ name: _optionalChain([groups, 'access', _33 => _33[mediaTypeExample.title], 'optionalAccess', _34 => _34.name]) || mediaTypeExample.summary || mediaTypeExample.title,
502
485
  request: {
503
- ..._optionalChain([groups, 'access', _36 => _36[mediaTypeExample.title], 'optionalAccess', _37 => _37.request]),
486
+ ..._optionalChain([groups, 'access', _35 => _35[mediaTypeExample.title], 'optionalAccess', _36 => _36.request]),
504
487
  [mediaType]: mediaTypeExample.value
505
488
  }
506
489
  };
@@ -524,7 +507,7 @@ function getRequestBodyExamples(operation, definition) {
524
507
  if (!requestBody) {
525
508
  return [];
526
509
  } else if (_chunk3MTU2ESPcjs.isRef.call(void 0, requestBody)) {
527
- requestBody = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, requestBody, definition);
510
+ requestBody = _chunkV4IQC5XFcjs.dereferenceRef.call(void 0, requestBody, definition);
528
511
  }
529
512
  if (!requestBody || _chunk3MTU2ESPcjs.isRef.call(void 0, requestBody) || !requestBody.content) {
530
513
  return [];
@@ -547,11 +530,11 @@ function getRequestBodyExamples(operation, definition) {
547
530
 
548
531
  // src/operation/lib/operationId.ts
549
532
  function hasOperationId(operation) {
550
- return Boolean("operationId" in operation && _optionalChain([operation, 'access', _38 => _38.operationId, 'optionalAccess', _39 => _39.length]));
533
+ return Boolean("operationId" in operation && _optionalChain([operation, 'access', _37 => _37.operationId, 'optionalAccess', _38 => _38.length]));
551
534
  }
552
535
  function getOperationId(path, method, operation, opts = {}) {
553
536
  function sanitize(id) {
554
- return id.replace(_optionalChain([opts, 'optionalAccess', _40 => _40.camelCase]) || _optionalChain([opts, 'optionalAccess', _41 => _41.friendlyCase]) ? /[^a-zA-Z0-9_]/g : /[^a-zA-Z0-9]/g, "-").replace(/--+/g, "-").replace(/^-|-$/g, "");
537
+ return id.replace(_optionalChain([opts, 'optionalAccess', _39 => _39.camelCase]) || _optionalChain([opts, 'optionalAccess', _40 => _40.friendlyCase]) ? /[^a-zA-Z0-9_]/g : /[^a-zA-Z0-9]/g, "-").replace(/--+/g, "-").replace(/^-|-$/g, "");
555
538
  }
556
539
  const operationIdExists = hasOperationId(operation);
557
540
  let operationId;
@@ -561,8 +544,8 @@ function getOperationId(path, method, operation, opts = {}) {
561
544
  operationId = sanitize(path).toLowerCase();
562
545
  }
563
546
  const currMethod = method.toLowerCase();
564
- if (_optionalChain([opts, 'optionalAccess', _42 => _42.camelCase]) || _optionalChain([opts, 'optionalAccess', _43 => _43.friendlyCase])) {
565
- if (_optionalChain([opts, 'optionalAccess', _44 => _44.friendlyCase])) {
547
+ if (_optionalChain([opts, 'optionalAccess', _41 => _41.camelCase]) || _optionalChain([opts, 'optionalAccess', _42 => _42.friendlyCase])) {
548
+ if (_optionalChain([opts, 'optionalAccess', _43 => _43.friendlyCase])) {
566
549
  operationId = operationId.replaceAll("_", " ");
567
550
  if (!operationIdExists) {
568
551
  operationId = operationId.replace(/[^a-zA-Z0-9_]+(.)/g, (_, chr) => ` ${chr}`).split(" ").filter((word, i, arr) => word !== arr[i - 1]).join(" ");
@@ -589,7 +572,7 @@ function getOperationId(path, method, operation, opts = {}) {
589
572
  }
590
573
 
591
574
  // src/operation/transformers/get-response-as-json-schema.ts
592
- var isJSON = _chunk2X4PY2BScjs.matches_mimetype_default.json;
575
+ var isJSON = _chunkV4IQC5XFcjs.matches_mimetype_default.json;
593
576
  function buildHeadersSchema(response, schemaOptions) {
594
577
  const headersSchema = {
595
578
  type: "object",
@@ -599,10 +582,10 @@ function buildHeadersSchema(response, schemaOptions) {
599
582
  const seenRefs = _nullishCoalesce(schemaOptions.seenRefs, () => ( /* @__PURE__ */ new Set()));
600
583
  if (response.headers) {
601
584
  Object.keys(response.headers).forEach((key) => {
602
- let headerEntry = _optionalChain([response, 'access', _45 => _45.headers, 'optionalAccess', _46 => _46[key]]);
585
+ let headerEntry = _optionalChain([response, 'access', _44 => _44.headers, 'optionalAccess', _45 => _45[key]]);
603
586
  if (!headerEntry) return;
604
587
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, headerEntry)) {
605
- headerEntry = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, headerEntry, api, seenRefs);
588
+ headerEntry = _chunkV4IQC5XFcjs.dereferenceRef.call(void 0, headerEntry, api, seenRefs);
606
589
  if (!headerEntry || _chunk3MTU2ESPcjs.isRef.call(void 0, headerEntry)) return;
607
590
  }
608
591
  if (headerEntry.schema) {
@@ -610,10 +593,10 @@ function buildHeadersSchema(response, schemaOptions) {
610
593
  let headerSchema = header.schema;
611
594
  if (!headerSchema) return;
612
595
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, headerSchema)) {
613
- headerSchema = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, headerSchema, api, seenRefs);
596
+ headerSchema = _chunkV4IQC5XFcjs.dereferenceRef.call(void 0, headerSchema, api, seenRefs);
614
597
  if (!headerSchema || _chunk3MTU2ESPcjs.isRef.call(void 0, headerSchema)) return;
615
598
  }
616
- headersSchema.properties[key] = _chunk2X4PY2BScjs.toJSONSchema.call(void 0, _chunk2X4PY2BScjs.cloneObject.call(void 0, headerSchema), {
599
+ headersSchema.properties[key] = _chunkV4IQC5XFcjs.toJSONSchema.call(void 0, _chunkV4IQC5XFcjs.cloneObject.call(void 0, headerSchema), {
617
600
  addEnumsToDescriptions: true,
618
601
  ...schemaOptions
619
602
  });
@@ -667,35 +650,35 @@ function getResponseAsJSONSchema(operation, api, statusCode, opts) {
667
650
  }
668
651
  if (preferredContentType) {
669
652
  if (contentTypes.includes(preferredContentType)) {
670
- const schema2 = _chunk2X4PY2BScjs.cloneObject.call(void 0, content[preferredContentType].schema);
653
+ const schema2 = _chunkV4IQC5XFcjs.cloneObject.call(void 0, content[preferredContentType].schema);
671
654
  if (!schema2) {
672
655
  return null;
673
656
  }
674
- return _chunk2X4PY2BScjs.toJSONSchema.call(void 0, schema2, baseSchemaOptions);
657
+ return _chunkV4IQC5XFcjs.toJSONSchema.call(void 0, schema2, baseSchemaOptions);
675
658
  }
676
659
  return null;
677
660
  }
678
661
  for (let i = 0; i < contentTypes.length; i++) {
679
662
  if (isJSON(contentTypes[i])) {
680
- const schema2 = _chunk2X4PY2BScjs.cloneObject.call(void 0, content[contentTypes[i]].schema);
663
+ const schema2 = _chunkV4IQC5XFcjs.cloneObject.call(void 0, content[contentTypes[i]].schema);
681
664
  if (!schema2) {
682
665
  return {};
683
666
  }
684
- return _chunk2X4PY2BScjs.toJSONSchema.call(void 0, schema2, baseSchemaOptions);
667
+ return _chunkV4IQC5XFcjs.toJSONSchema.call(void 0, schema2, baseSchemaOptions);
685
668
  }
686
669
  }
687
670
  const contentType = contentTypes.shift();
688
671
  if (!contentType) {
689
672
  return {};
690
673
  }
691
- const schema = _chunk2X4PY2BScjs.cloneObject.call(void 0, content[contentType].schema);
674
+ const schema = _chunkV4IQC5XFcjs.cloneObject.call(void 0, content[contentType].schema);
692
675
  if (!schema) {
693
676
  return {};
694
677
  }
695
- return _chunk2X4PY2BScjs.toJSONSchema.call(void 0, schema, baseSchemaOptions);
678
+ return _chunkV4IQC5XFcjs.toJSONSchema.call(void 0, schema, baseSchemaOptions);
696
679
  }
697
- const foundSchema = getPreferredSchema(response.content, _optionalChain([opts, 'optionalAccess', _47 => _47.contentType]));
698
- if (_optionalChain([opts, 'optionalAccess', _48 => _48.contentType]) && !foundSchema) {
680
+ const foundSchema = getPreferredSchema(response.content, _optionalChain([opts, 'optionalAccess', _46 => _46.contentType]));
681
+ if (_optionalChain([opts, 'optionalAccess', _47 => _47.contentType]) && !foundSchema) {
699
682
  return null;
700
683
  }
701
684
  if (foundSchema) {
@@ -711,23 +694,23 @@ function getResponseAsJSONSchema(operation, api, statusCode, opts) {
711
694
  // able to render so instead of generating a JSON Schema with an `undefined` type we should
712
695
  // default to `string` so there's at least *something* the end-user can interact with.
713
696
  type: _nullishCoalesce(schemaType, () => ( "string")),
714
- schema: _chunk2X4PY2BScjs.isPrimitive.call(void 0, schema) ? schema : {
697
+ schema: _chunkV4IQC5XFcjs.isPrimitive.call(void 0, schema) ? schema : {
715
698
  ...schema,
716
- $schema: _chunk2X4PY2BScjs.getSchemaVersionString.call(void 0, schema, api)
699
+ $schema: _chunkV4IQC5XFcjs.getSchemaVersionString.call(void 0, schema, api)
717
700
  },
718
701
  label: "Response body"
719
702
  };
720
703
  if (response.description && schemaWrapper.schema) {
721
704
  schemaWrapper.description = response.description;
722
705
  }
723
- _chunk2X4PY2BScjs.applyDiscriminatorOneOfToUsedSchemas.call(void 0, api, usedSchemas, (ref) => {
706
+ _chunkV4IQC5XFcjs.applyDiscriminatorOneOfToUsedSchemas.call(void 0, api, usedSchemas, (ref) => {
724
707
  if (usedSchemas.has(ref)) {
725
708
  return usedSchemas.get(ref);
726
709
  }
727
710
  try {
728
- const resolved = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, { $ref: ref }, api, seenRefs);
711
+ const resolved = _chunkV4IQC5XFcjs.dereferenceRef.call(void 0, { $ref: ref }, api, seenRefs);
729
712
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, resolved)) return;
730
- const converted = _chunk2X4PY2BScjs.toJSONSchema.call(void 0, structuredClone(resolved), {
713
+ const converted = _chunkV4IQC5XFcjs.toJSONSchema.call(void 0, structuredClone(resolved), {
731
714
  ...baseSchemaOptions,
732
715
  seenRefs
733
716
  });
@@ -737,11 +720,11 @@ function getResponseAsJSONSchema(operation, api, statusCode, opts) {
737
720
  }
738
721
  });
739
722
  if (schemaWrapper.schema && usedSchemas.size > 0) {
740
- const refsInOutput = _chunk2X4PY2BScjs.collectRefsInSchema.call(void 0, schemaWrapper.schema);
723
+ const refsInOutput = _chunkV4IQC5XFcjs.collectRefsInSchema.call(void 0, schemaWrapper.schema);
741
724
  const refsInGroup = _nullishCoalesce(refsByGroup.get("body"), () => ( /* @__PURE__ */ new Set()));
742
- const referencedSchemas = _chunk2X4PY2BScjs.filterRequiredRefsToReferenced.call(void 0, /* @__PURE__ */ new Set([...refsInGroup, ...refsInOutput]), usedSchemas);
725
+ const referencedSchemas = _chunkV4IQC5XFcjs.filterRequiredRefsToReferenced.call(void 0, /* @__PURE__ */ new Set([...refsInGroup, ...refsInOutput]), usedSchemas);
743
726
  if (referencedSchemas.size > 0) {
744
- _chunk2X4PY2BScjs.mergeReferencedSchemasIntoRoot.call(void 0, schemaWrapper.schema, referencedSchemas);
727
+ _chunkV4IQC5XFcjs.mergeReferencedSchemasIntoRoot.call(void 0, schemaWrapper.schema, referencedSchemas);
745
728
  }
746
729
  }
747
730
  jsonSchema.push(schemaWrapper);
@@ -753,10 +736,10 @@ function getResponseAsJSONSchema(operation, api, statusCode, opts) {
753
736
  });
754
737
  if (headersWrapper.schema && usedSchemas.size > 0) {
755
738
  const refsInGroup = _nullishCoalesce(refsByGroup.get("headers"), () => ( /* @__PURE__ */ new Set()));
756
- const refsInOutput = _chunk2X4PY2BScjs.collectRefsInSchema.call(void 0, headersWrapper.schema);
757
- const referencedSchemas = _chunk2X4PY2BScjs.filterRequiredRefsToReferenced.call(void 0, /* @__PURE__ */ new Set([...refsInGroup, ...refsInOutput]), usedSchemas);
739
+ const refsInOutput = _chunkV4IQC5XFcjs.collectRefsInSchema.call(void 0, headersWrapper.schema);
740
+ const referencedSchemas = _chunkV4IQC5XFcjs.filterRequiredRefsToReferenced.call(void 0, /* @__PURE__ */ new Set([...refsInGroup, ...refsInOutput]), usedSchemas);
758
741
  if (referencedSchemas.size > 0) {
759
- _chunk2X4PY2BScjs.mergeReferencedSchemasIntoRoot.call(void 0, headersWrapper.schema, referencedSchemas);
742
+ _chunkV4IQC5XFcjs.mergeReferencedSchemasIntoRoot.call(void 0, headersWrapper.schema, referencedSchemas);
760
743
  }
761
744
  }
762
745
  jsonSchema.push(headersWrapper);
@@ -857,11 +840,11 @@ var Operation = (_class = class {
857
840
  * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-operation-summary}
858
841
  */
859
842
  getSummary() {
860
- if (_optionalChain([this, 'access', _49 => _49.schema, 'optionalAccess', _50 => _50.summary]) && typeof this.schema.summary === "string") {
843
+ if (_optionalChain([this, 'access', _48 => _48.schema, 'optionalAccess', _49 => _49.summary]) && typeof this.schema.summary === "string") {
861
844
  return this.schema.summary;
862
845
  }
863
- const pathItem = _optionalChain([this, 'access', _51 => _51.api, 'access', _52 => _52.paths, 'optionalAccess', _53 => _53[this.path]]);
864
- if (_optionalChain([pathItem, 'optionalAccess', _54 => _54.summary]) && typeof pathItem.summary === "string") {
846
+ const pathItem = _optionalChain([this, 'access', _50 => _50.api, 'access', _51 => _51.paths, 'optionalAccess', _52 => _52[this.path]]);
847
+ if (_optionalChain([pathItem, 'optionalAccess', _53 => _53.summary]) && typeof pathItem.summary === "string") {
865
848
  return pathItem.summary;
866
849
  }
867
850
  return void 0;
@@ -873,11 +856,11 @@ var Operation = (_class = class {
873
856
  * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-operation-description}
874
857
  */
875
858
  getDescription() {
876
- if (_optionalChain([this, 'access', _55 => _55.schema, 'optionalAccess', _56 => _56.description]) && typeof this.schema.description === "string") {
859
+ if (_optionalChain([this, 'access', _54 => _54.schema, 'optionalAccess', _55 => _55.description]) && typeof this.schema.description === "string") {
877
860
  return this.schema.description;
878
861
  }
879
- const pathItem = _optionalChain([this, 'access', _57 => _57.api, 'access', _58 => _58.paths, 'optionalAccess', _59 => _59[this.path]]);
880
- if (_optionalChain([pathItem, 'optionalAccess', _60 => _60.description]) && typeof pathItem.description === "string") {
862
+ const pathItem = _optionalChain([this, 'access', _56 => _56.api, 'access', _57 => _57.paths, 'optionalAccess', _58 => _58[this.path]]);
863
+ if (_optionalChain([pathItem, 'optionalAccess', _59 => _59.description]) && typeof pathItem.description === "string") {
881
864
  return pathItem.description;
882
865
  }
883
866
  return void 0;
@@ -896,18 +879,18 @@ var Operation = (_class = class {
896
879
  let types = [];
897
880
  if (this.schema.requestBody) {
898
881
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, this.schema.requestBody)) {
899
- this.schema.requestBody = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, this.schema.requestBody, this.api);
882
+ this.schema.requestBody = _chunkV4IQC5XFcjs.dereferenceRef.call(void 0, this.schema.requestBody, this.api);
900
883
  }
901
884
  if (this.schema.requestBody && "content" in this.schema.requestBody) {
902
885
  types = Object.keys(this.schema.requestBody.content);
903
886
  }
904
887
  }
905
888
  this.contentType = "application/json";
906
- if (_optionalChain([types, 'optionalAccess', _61 => _61.length])) {
889
+ if (_optionalChain([types, 'optionalAccess', _60 => _60.length])) {
907
890
  this.contentType = types[0];
908
891
  }
909
892
  types.forEach((t) => {
910
- if (_chunk2X4PY2BScjs.matches_mimetype_default.json(t)) {
893
+ if (_chunkV4IQC5XFcjs.matches_mimetype_default.json(t)) {
911
894
  this.contentType = t;
912
895
  }
913
896
  });
@@ -920,7 +903,7 @@ var Operation = (_class = class {
920
903
  * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-request-body-content}
921
904
  */
922
905
  isFormUrlEncoded() {
923
- return _chunk2X4PY2BScjs.matches_mimetype_default.formUrlEncoded(this.getContentType());
906
+ return _chunkV4IQC5XFcjs.matches_mimetype_default.formUrlEncoded(this.getContentType());
924
907
  }
925
908
  /**
926
909
  * Checks if the current operation has a mutipart content type payload.
@@ -929,7 +912,7 @@ var Operation = (_class = class {
929
912
  * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-request-body-content}
930
913
  */
931
914
  isMultipart() {
932
- return _chunk2X4PY2BScjs.matches_mimetype_default.multipart(this.getContentType());
915
+ return _chunkV4IQC5XFcjs.matches_mimetype_default.multipart(this.getContentType());
933
916
  }
934
917
  /**
935
918
  * Checks if the current operation has a JSON-like content type payload.
@@ -938,7 +921,7 @@ var Operation = (_class = class {
938
921
  * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-request-body-content}
939
922
  */
940
923
  isJson() {
941
- return _chunk2X4PY2BScjs.matches_mimetype_default.json(this.getContentType());
924
+ return _chunkV4IQC5XFcjs.matches_mimetype_default.json(this.getContentType());
942
925
  }
943
926
  /**
944
927
  * Checks if the current operation has an XML content type payload.
@@ -947,7 +930,7 @@ var Operation = (_class = class {
947
930
  * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-request-body-content}
948
931
  */
949
932
  isXml() {
950
- return _chunk2X4PY2BScjs.matches_mimetype_default.xml(this.getContentType());
933
+ return _chunkV4IQC5XFcjs.matches_mimetype_default.xml(this.getContentType());
951
934
  }
952
935
  /**
953
936
  * Checks if the current operation is a webhook or not.
@@ -966,7 +949,7 @@ var Operation = (_class = class {
966
949
  * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#security-requirement-object}
967
950
  */
968
951
  getSecurity() {
969
- if (!_optionalChain([this, 'access', _62 => _62.api, 'optionalAccess', _63 => _63.components, 'optionalAccess', _64 => _64.securitySchemes]) || !Object.keys(this.api.components.securitySchemes).length) {
952
+ if (!_optionalChain([this, 'access', _61 => _61.api, 'optionalAccess', _62 => _62.components, 'optionalAccess', _63 => _63.securitySchemes]) || !Object.keys(this.api.components.securitySchemes).length) {
970
953
  return [];
971
954
  }
972
955
  return this.schema.security || this.api.security || [];
@@ -992,10 +975,10 @@ var Operation = (_class = class {
992
975
  const keysWithTypes = keys.map((key) => {
993
976
  let security;
994
977
  try {
995
- security = _optionalChain([this, 'access', _65 => _65.api, 'optionalAccess', _66 => _66.components, 'optionalAccess', _67 => _67.securitySchemes, 'optionalAccess', _68 => _68[key]]);
978
+ security = _optionalChain([this, 'access', _64 => _64.api, 'optionalAccess', _65 => _65.components, 'optionalAccess', _66 => _66.securitySchemes, 'optionalAccess', _67 => _67[key]]);
996
979
  if (!security) return false;
997
980
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, security)) {
998
- security = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, security, this.api);
981
+ security = _chunkV4IQC5XFcjs.dereferenceRef.call(void 0, security, this.api);
999
982
  if (!security || _chunk3MTU2ESPcjs.isRef.call(void 0, security)) return false;
1000
983
  }
1001
984
  } catch (e4) {
@@ -1044,7 +1027,7 @@ var Operation = (_class = class {
1044
1027
  if (!prev[security.type]) prev[security.type] = [];
1045
1028
  const exists = prev[security.type].some((sec) => sec._key === security.security._key);
1046
1029
  if (!exists) {
1047
- if (_optionalChain([security, 'access', _69 => _69.security, 'optionalAccess', _70 => _70._requirements])) delete security.security._requirements;
1030
+ if (_optionalChain([security, 'access', _68 => _68.security, 'optionalAccess', _69 => _69._requirements])) delete security.security._requirements;
1048
1031
  prev[security.type].push(security.security);
1049
1032
  }
1050
1033
  });
@@ -1076,7 +1059,7 @@ var Operation = (_class = class {
1076
1059
  this.schema.parameters.map((p) => {
1077
1060
  let param = p;
1078
1061
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, param)) {
1079
- param = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, param, this.api);
1062
+ param = _chunkV4IQC5XFcjs.dereferenceRef.call(void 0, param, this.api);
1080
1063
  if (!param || _chunk3MTU2ESPcjs.isRef.call(void 0, param)) return;
1081
1064
  }
1082
1065
  if (param.in && param.in === "header") return param.name;
@@ -1089,20 +1072,20 @@ var Operation = (_class = class {
1089
1072
  let response = this.schema.responses[r];
1090
1073
  if (!response) return [];
1091
1074
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, response)) {
1092
- this.schema.responses[r] = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, response, this.api);
1075
+ this.schema.responses[r] = _chunkV4IQC5XFcjs.dereferenceRef.call(void 0, response, this.api);
1093
1076
  response = this.schema.responses[r];
1094
1077
  if (!response || _chunk3MTU2ESPcjs.isRef.call(void 0, response)) {
1095
1078
  return [];
1096
1079
  }
1097
1080
  }
1098
- return _optionalChain([response, 'optionalAccess', _71 => _71.headers]) ? Object.keys(response.headers) : [];
1081
+ return _optionalChain([response, 'optionalAccess', _70 => _70.headers]) ? Object.keys(response.headers) : [];
1099
1082
  }).reduce((a, b) => a.concat(b), []);
1100
1083
  }
1101
1084
  if (!this.headers.request.includes("Content-Type") && this.schema.requestBody) {
1102
1085
  let requestBody = this.schema.requestBody;
1103
1086
  if (requestBody) {
1104
1087
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, requestBody)) {
1105
- this.schema.requestBody = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, requestBody, this.api);
1088
+ this.schema.requestBody = _chunkV4IQC5XFcjs.dereferenceRef.call(void 0, requestBody, this.api);
1106
1089
  requestBody = this.schema.requestBody;
1107
1090
  }
1108
1091
  if (requestBody && !_chunk3MTU2ESPcjs.isRef.call(void 0, requestBody) && "content" in requestBody && Object.keys(requestBody.content)) {
@@ -1112,10 +1095,10 @@ var Operation = (_class = class {
1112
1095
  }
1113
1096
  if (this.schema.responses) {
1114
1097
  const hasResponseContent = Object.keys(this.schema.responses).some((r) => {
1115
- let response = _optionalChain([this, 'access', _72 => _72.schema, 'access', _73 => _73.responses, 'optionalAccess', _74 => _74[r]]);
1098
+ let response = _optionalChain([this, 'access', _71 => _71.schema, 'access', _72 => _72.responses, 'optionalAccess', _73 => _73[r]]);
1116
1099
  if (!response) return false;
1117
1100
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, response)) {
1118
- this.schema.responses[r] = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, response, this.api);
1101
+ this.schema.responses[r] = _chunkV4IQC5XFcjs.dereferenceRef.call(void 0, response, this.api);
1119
1102
  response = this.schema.responses[r];
1120
1103
  if (!response || _chunk3MTU2ESPcjs.isRef.call(void 0, response)) {
1121
1104
  return false;
@@ -1179,7 +1162,7 @@ var Operation = (_class = class {
1179
1162
  return [];
1180
1163
  }
1181
1164
  const oasTagMap = /* @__PURE__ */ new Map();
1182
- if (Array.isArray(_optionalChain([this, 'access', _75 => _75.api, 'optionalAccess', _76 => _76.tags]))) {
1165
+ if (Array.isArray(_optionalChain([this, 'access', _74 => _74.api, 'optionalAccess', _75 => _75.tags]))) {
1183
1166
  this.api.tags.forEach((tag) => {
1184
1167
  oasTagMap.set(tag.name, tag);
1185
1168
  });
@@ -1222,18 +1205,18 @@ var Operation = (_class = class {
1222
1205
  * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-operation-parameters}
1223
1206
  */
1224
1207
  getParameters() {
1225
- let parameters = (_optionalChain([this, 'access', _77 => _77.schema, 'optionalAccess', _78 => _78.parameters]) || []).map((p) => {
1208
+ let parameters = (_optionalChain([this, 'access', _76 => _76.schema, 'optionalAccess', _77 => _77.parameters]) || []).map((p) => {
1226
1209
  let param = p;
1227
1210
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, param)) {
1228
- param = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, param, this.api);
1211
+ param = _chunkV4IQC5XFcjs.dereferenceRef.call(void 0, param, this.api);
1229
1212
  if (!param || _chunk3MTU2ESPcjs.isRef.call(void 0, param)) return;
1230
1213
  }
1231
1214
  return param;
1232
1215
  }).filter((param) => param !== void 0);
1233
- const commonParams = (_optionalChain([this, 'access', _79 => _79.api, 'optionalAccess', _80 => _80.paths, 'optionalAccess', _81 => _81[this.path], 'optionalAccess', _82 => _82.parameters]) || []).map((p) => {
1216
+ const commonParams = (_optionalChain([this, 'access', _78 => _78.api, 'optionalAccess', _79 => _79.paths, 'optionalAccess', _80 => _80[this.path], 'optionalAccess', _81 => _81.parameters]) || []).map((p) => {
1234
1217
  let param = p;
1235
1218
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, param)) {
1236
- param = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, param, this.api);
1219
+ param = _chunkV4IQC5XFcjs.dereferenceRef.call(void 0, param, this.api);
1237
1220
  if (!param || _chunk3MTU2ESPcjs.isRef.call(void 0, param)) return;
1238
1221
  }
1239
1222
  return param;
@@ -1271,10 +1254,10 @@ var Operation = (_class = class {
1271
1254
  );
1272
1255
  }
1273
1256
  if (!this.schemasDecorated) {
1274
- _chunk2X4PY2BScjs.decorateComponentSchemasWithRefName.call(void 0, this.api);
1257
+ _chunkV4IQC5XFcjs.decorateComponentSchemasWithRefName.call(void 0, this.api);
1275
1258
  this.schemasDecorated = true;
1276
1259
  }
1277
- return _chunk2X4PY2BScjs.getParametersAsJSONSchema.call(void 0, this, this.api, {
1260
+ return _chunkV4IQC5XFcjs.getParametersAsJSONSchema.call(void 0, this, this.api, {
1278
1261
  includeDiscriminatorMappingRefs: true,
1279
1262
  ...opts
1280
1263
  });
@@ -1299,7 +1282,7 @@ var Operation = (_class = class {
1299
1282
  );
1300
1283
  }
1301
1284
  if (!this.schemasDecorated) {
1302
- _chunk2X4PY2BScjs.decorateComponentSchemasWithRefName.call(void 0, this.api);
1285
+ _chunkV4IQC5XFcjs.decorateComponentSchemasWithRefName.call(void 0, this.api);
1303
1286
  this.schemasDecorated = true;
1304
1287
  }
1305
1288
  return getResponseAsJSONSchema(this, this.api, statusCode, {
@@ -1314,7 +1297,7 @@ var Operation = (_class = class {
1314
1297
  getResponseStatusCodes() {
1315
1298
  if (!this.schema.responses) return [];
1316
1299
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, this.schema.responses)) {
1317
- this.schema.responses = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, this.schema.responses, this.api);
1300
+ this.schema.responses = _chunkV4IQC5XFcjs.dereferenceRef.call(void 0, this.schema.responses, this.api);
1318
1301
  if (!this.schema.responses || _chunk3MTU2ESPcjs.isRef.call(void 0, this.schema.responses)) {
1319
1302
  return [];
1320
1303
  }
@@ -1323,7 +1306,7 @@ var Operation = (_class = class {
1323
1306
  if (key.startsWith("x-")) {
1324
1307
  return false;
1325
1308
  }
1326
- const response = _optionalChain([this, 'access', _83 => _83.schema, 'access', _84 => _84.responses, 'optionalAccess', _85 => _85[key]]);
1309
+ const response = _optionalChain([this, 'access', _82 => _82.schema, 'access', _83 => _83.responses, 'optionalAccess', _84 => _84[key]]);
1327
1310
  return response && typeof response === "object";
1328
1311
  });
1329
1312
  }
@@ -1340,7 +1323,7 @@ var Operation = (_class = class {
1340
1323
  let resp = response;
1341
1324
  if (!resp) return;
1342
1325
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, resp)) {
1343
- resp = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, resp, this.api);
1326
+ resp = _chunkV4IQC5XFcjs.dereferenceRef.call(void 0, resp, this.api);
1344
1327
  if (!resp || _chunk3MTU2ESPcjs.isRef.call(void 0, resp)) {
1345
1328
  return;
1346
1329
  }
@@ -1369,7 +1352,7 @@ var Operation = (_class = class {
1369
1352
  let requestBody = this.schema.requestBody;
1370
1353
  if (!requestBody) return false;
1371
1354
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, requestBody)) {
1372
- this.schema.requestBody = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, requestBody, this.api);
1355
+ this.schema.requestBody = _chunkV4IQC5XFcjs.dereferenceRef.call(void 0, requestBody, this.api);
1373
1356
  requestBody = this.schema.requestBody;
1374
1357
  if (!requestBody || _chunk3MTU2ESPcjs.isRef.call(void 0, requestBody)) {
1375
1358
  return false;
@@ -1443,7 +1426,7 @@ var Operation = (_class = class {
1443
1426
  let availableMediaType;
1444
1427
  const mediaTypes = this.getRequestBodyMediaTypes();
1445
1428
  mediaTypes.forEach((mt) => {
1446
- if (!availableMediaType && _chunk2X4PY2BScjs.matches_mimetype_default.json(mt)) {
1429
+ if (!availableMediaType && _chunkV4IQC5XFcjs.matches_mimetype_default.json(mt)) {
1447
1430
  availableMediaType = mt;
1448
1431
  }
1449
1432
  });
@@ -1470,7 +1453,7 @@ var Operation = (_class = class {
1470
1453
  * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#request-body-examples}
1471
1454
  */
1472
1455
  getRequestBodyExamples() {
1473
- const isRequestExampleValueDefined = typeof _optionalChain([this, 'access', _86 => _86.requestBodyExamples, 'optionalAccess', _87 => _87[0], 'optionalAccess', _88 => _88.examples, 'optionalAccess', _89 => _89[0], 'access', _90 => _90.value]) !== "undefined";
1456
+ const isRequestExampleValueDefined = typeof _optionalChain([this, 'access', _85 => _85.requestBodyExamples, 'optionalAccess', _86 => _86[0], 'optionalAccess', _87 => _87.examples, 'optionalAccess', _88 => _88[0], 'access', _89 => _89.value]) !== "undefined";
1474
1457
  if (this.requestBodyExamples && isRequestExampleValueDefined) {
1475
1458
  return this.requestBodyExamples;
1476
1459
  }
@@ -1491,7 +1474,7 @@ var Operation = (_class = class {
1491
1474
  let response = this.schema.responses[statusCode];
1492
1475
  if (!response) return false;
1493
1476
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, response)) {
1494
- this.schema.responses[statusCode] = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, response, this.api);
1477
+ this.schema.responses[statusCode] = _chunkV4IQC5XFcjs.dereferenceRef.call(void 0, response, this.api);
1495
1478
  response = this.schema.responses[statusCode];
1496
1479
  if (!response || _chunk3MTU2ESPcjs.isRef.call(void 0, response)) {
1497
1480
  return false;
@@ -1535,7 +1518,7 @@ var Operation = (_class = class {
1535
1518
  let callbackObj = this.schema.callbacks[identifier];
1536
1519
  if (!callbackObj) return false;
1537
1520
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, callbackObj)) {
1538
- this.schema.callbacks[identifier] = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, callbackObj, this.api);
1521
+ this.schema.callbacks[identifier] = _chunkV4IQC5XFcjs.dereferenceRef.call(void 0, callbackObj, this.api);
1539
1522
  callbackObj = this.schema.callbacks[identifier];
1540
1523
  if (!callbackObj || _chunk3MTU2ESPcjs.isRef.call(void 0, callbackObj)) {
1541
1524
  return false;
@@ -1544,7 +1527,7 @@ var Operation = (_class = class {
1544
1527
  let callback = callbackObj[expression];
1545
1528
  if (!callback) return false;
1546
1529
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, callback)) {
1547
- callbackObj[expression] = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, callback, this.api);
1530
+ callbackObj[expression] = _chunkV4IQC5XFcjs.dereferenceRef.call(void 0, callback, this.api);
1548
1531
  callback = callbackObj[expression];
1549
1532
  if (!callback || _chunk3MTU2ESPcjs.isRef.call(void 0, callback)) {
1550
1533
  return false;
@@ -1565,10 +1548,10 @@ var Operation = (_class = class {
1565
1548
  if (!this.hasCallbacks()) return [];
1566
1549
  const callbacks = [];
1567
1550
  Object.keys(this.schema.callbacks).forEach((callback) => {
1568
- let cb = _optionalChain([this, 'access', _91 => _91.schema, 'access', _92 => _92.callbacks, 'optionalAccess', _93 => _93[callback]]);
1551
+ let cb = _optionalChain([this, 'access', _90 => _90.schema, 'access', _91 => _91.callbacks, 'optionalAccess', _92 => _92[callback]]);
1569
1552
  if (!cb) return;
1570
1553
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, cb)) {
1571
- this.schema.callbacks[callback] = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, cb, this.api);
1554
+ this.schema.callbacks[callback] = _chunkV4IQC5XFcjs.dereferenceRef.call(void 0, cb, this.api);
1572
1555
  cb = this.schema.callbacks[callback];
1573
1556
  if (!cb || _chunk3MTU2ESPcjs.isRef.call(void 0, cb)) {
1574
1557
  return;
@@ -1578,14 +1561,14 @@ var Operation = (_class = class {
1578
1561
  let callbackPath = cb[expression];
1579
1562
  if (!callbackPath) return;
1580
1563
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, callbackPath)) {
1581
- cb[expression] = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, callbackPath, this.api);
1564
+ cb[expression] = _chunkV4IQC5XFcjs.dereferenceRef.call(void 0, callbackPath, this.api);
1582
1565
  callbackPath = cb[expression];
1583
1566
  if (!callbackPath || _chunk3MTU2ESPcjs.isRef.call(void 0, callbackPath)) {
1584
1567
  return;
1585
1568
  }
1586
1569
  }
1587
1570
  Object.keys(callbackPath).forEach((method) => {
1588
- if (!_chunk2X4PY2BScjs.supportedMethods.includes(method)) return;
1571
+ if (!_chunkV4IQC5XFcjs.supportedMethods.includes(method)) return;
1589
1572
  const found = this.getCallback(callback, expression, method);
1590
1573
  if (found) {
1591
1574
  callbacks.push(found);
@@ -1628,7 +1611,7 @@ var Operation = (_class = class {
1628
1611
  * @deprecated Use `oas.getExtension(extension, operation)` instead.
1629
1612
  */
1630
1613
  getExtension(extension) {
1631
- return _optionalChain([this, 'access', _94 => _94.schema, 'optionalAccess', _95 => _95[extension]]);
1614
+ return _optionalChain([this, 'access', _93 => _93.schema, 'optionalAccess', _94 => _94[extension]]);
1632
1615
  }
1633
1616
  /**
1634
1617
  * Returns an object with groups of all example definitions (body/header/query/path/response/etc.).
@@ -1663,12 +1646,12 @@ var Operation = (_class = class {
1663
1646
  }
1664
1647
  this.dereferencing.processing = true;
1665
1648
  if (!this.schemasDecorated) {
1666
- _chunk2X4PY2BScjs.decorateComponentSchemasWithRefName.call(void 0, this.api);
1649
+ _chunkV4IQC5XFcjs.decorateComponentSchemasWithRefName.call(void 0, this.api);
1667
1650
  this.schemasDecorated = true;
1668
1651
  }
1669
1652
  const { api, schema, promises } = this;
1670
1653
  const circularRefs = /* @__PURE__ */ new Set();
1671
- const dereferencingOptions = _chunk2X4PY2BScjs.getDereferencingOptions.call(void 0, circularRefs);
1654
+ const dereferencingOptions = _chunkV4IQC5XFcjs.getDereferencingOptions.call(void 0, circularRefs);
1672
1655
  const parser = new (0, _jsonschemarefparser.$RefParser)();
1673
1656
  return parser.dereference(
1674
1657
  "#/__INTERNAL__",
@@ -1715,7 +1698,7 @@ var Operation = (_class = class {
1715
1698
  // We need to convert our `Set` to an array in order to match the typings.
1716
1699
  circularRefs: [...circularRefs]
1717
1700
  };
1718
- if (_optionalChain([opts, 'optionalAccess', _96 => _96.cb])) {
1701
+ if (_optionalChain([opts, 'optionalAccess', _95 => _95.cb])) {
1719
1702
  opts.cb();
1720
1703
  }
1721
1704
  }).then(() => {
@@ -1779,7 +1762,7 @@ var Callback = class extends Operation {
1779
1762
  * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-operation-summary}
1780
1763
  */
1781
1764
  getSummary() {
1782
- if (_optionalChain([this, 'access', _97 => _97.schema, 'optionalAccess', _98 => _98.summary]) && typeof this.schema.summary === "string") {
1765
+ if (_optionalChain([this, 'access', _96 => _96.schema, 'optionalAccess', _97 => _97.summary]) && typeof this.schema.summary === "string") {
1783
1766
  return this.schema.summary;
1784
1767
  } else if (this.parentSchema.summary && typeof this.parentSchema.summary === "string") {
1785
1768
  return this.parentSchema.summary;
@@ -1793,7 +1776,7 @@ var Callback = class extends Operation {
1793
1776
  * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-operation-description}
1794
1777
  */
1795
1778
  getDescription() {
1796
- if (_optionalChain([this, 'access', _99 => _99.schema, 'optionalAccess', _100 => _100.description]) && typeof this.schema.description === "string") {
1779
+ if (_optionalChain([this, 'access', _98 => _98.schema, 'optionalAccess', _99 => _99.description]) && typeof this.schema.description === "string") {
1797
1780
  return this.schema.description;
1798
1781
  } else if (this.parentSchema.description && typeof this.parentSchema.description === "string") {
1799
1782
  return this.parentSchema.description;
@@ -1807,10 +1790,10 @@ var Callback = class extends Operation {
1807
1790
  * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-operation-parameters}
1808
1791
  */
1809
1792
  getParameters() {
1810
- let parameters = (_optionalChain([this, 'access', _101 => _101.schema, 'optionalAccess', _102 => _102.parameters]) || []).map((p) => {
1793
+ let parameters = (_optionalChain([this, 'access', _100 => _100.schema, 'optionalAccess', _101 => _101.parameters]) || []).map((p) => {
1811
1794
  let param = p;
1812
1795
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, param)) {
1813
- param = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, param, this.api);
1796
+ param = _chunkV4IQC5XFcjs.dereferenceRef.call(void 0, param, this.api);
1814
1797
  if (!param || _chunk3MTU2ESPcjs.isRef.call(void 0, param)) return;
1815
1798
  }
1816
1799
  return param;
@@ -1818,7 +1801,7 @@ var Callback = class extends Operation {
1818
1801
  const commonParams = (this.parentSchema.parameters || []).map((p) => {
1819
1802
  let param = p;
1820
1803
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, param)) {
1821
- param = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, param, this.api);
1804
+ param = _chunkV4IQC5XFcjs.dereferenceRef.call(void 0, param, this.api);
1822
1805
  if (!param || _chunk3MTU2ESPcjs.isRef.call(void 0, param)) return;
1823
1806
  }
1824
1807
  return param;
@@ -1837,17 +1820,17 @@ var Webhook = class extends Operation {
1837
1820
  * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-operation-summary}
1838
1821
  */
1839
1822
  getSummary() {
1840
- if (_optionalChain([this, 'access', _103 => _103.schema, 'optionalAccess', _104 => _104.summary]) && typeof this.schema.summary === "string") {
1823
+ if (_optionalChain([this, 'access', _102 => _102.schema, 'optionalAccess', _103 => _103.summary]) && typeof this.schema.summary === "string") {
1841
1824
  return this.schema.summary;
1842
1825
  } else if (!this.api.webhooks) {
1843
1826
  return void 0;
1844
1827
  }
1845
1828
  let webhookPath = this.api.webhooks[this.path];
1846
1829
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, webhookPath)) {
1847
- this.api.webhooks[this.path] = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, webhookPath, this.api);
1830
+ this.api.webhooks[this.path] = _chunkV4IQC5XFcjs.dereferenceRef.call(void 0, webhookPath, this.api);
1848
1831
  webhookPath = this.api.webhooks[this.path];
1849
1832
  }
1850
- return _optionalChain([webhookPath, 'optionalAccess', _105 => _105.summary]);
1833
+ return _optionalChain([webhookPath, 'optionalAccess', _104 => _104.summary]);
1851
1834
  }
1852
1835
  /**
1853
1836
  * Retrieve the `description` for this operation.
@@ -1856,17 +1839,17 @@ var Webhook = class extends Operation {
1856
1839
  * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-operation-description}
1857
1840
  */
1858
1841
  getDescription() {
1859
- if (_optionalChain([this, 'access', _106 => _106.schema, 'optionalAccess', _107 => _107.description]) && typeof this.schema.description === "string") {
1842
+ if (_optionalChain([this, 'access', _105 => _105.schema, 'optionalAccess', _106 => _106.description]) && typeof this.schema.description === "string") {
1860
1843
  return this.schema.description;
1861
1844
  } else if (!this.api.webhooks) {
1862
1845
  return void 0;
1863
1846
  }
1864
1847
  let webhookPath = this.api.webhooks[this.path];
1865
1848
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, webhookPath)) {
1866
- this.api.webhooks[this.path] = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, webhookPath, this.api);
1849
+ this.api.webhooks[this.path] = _chunkV4IQC5XFcjs.dereferenceRef.call(void 0, webhookPath, this.api);
1867
1850
  webhookPath = this.api.webhooks[this.path];
1868
1851
  }
1869
- return _optionalChain([webhookPath, 'optionalAccess', _108 => _108.description]);
1852
+ return _optionalChain([webhookPath, 'optionalAccess', _107 => _107.description]);
1870
1853
  }
1871
1854
  };
1872
1855
 
@@ -1887,4 +1870,4 @@ exports.Operation = Operation; exports.Callback = Callback; exports.Webhook = We
1887
1870
  * @license Apache-2.0
1888
1871
  * @see {@link https://github.com/swagger-api/swagger-ui/blob/master/src/core/plugins/samples/fn.js}
1889
1872
  */
1890
- //# sourceMappingURL=chunk-TQD76MVX.cjs.map
1873
+ //# sourceMappingURL=chunk-HZ7LCMAM.cjs.map