oas 32.1.18 → 33.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/analyzer/index.cjs +5 -5
  2. package/dist/analyzer/index.js +3 -3
  3. package/dist/{chunk-PQHJW3YY.cjs → chunk-FFY6V4PB.cjs} +82 -78
  4. package/dist/chunk-FFY6V4PB.cjs.map +1 -0
  5. package/dist/{chunk-ZEPIAQ7U.js → chunk-GC7622O4.js} +68 -12
  6. package/dist/chunk-GC7622O4.js.map +1 -0
  7. package/dist/{chunk-SSHP7N5B.cjs → chunk-JPHXF4VQ.cjs} +81 -25
  8. package/dist/chunk-JPHXF4VQ.cjs.map +1 -0
  9. package/dist/{chunk-NWEIS3AG.cjs → chunk-K6I5TTHD.cjs} +20 -20
  10. package/dist/{chunk-NWEIS3AG.cjs.map → chunk-K6I5TTHD.cjs.map} +1 -1
  11. package/dist/{chunk-GZWQFGK3.js → chunk-OVBQKA6Q.js} +15 -11
  12. package/dist/chunk-OVBQKA6Q.js.map +1 -0
  13. package/dist/{chunk-MCWI63SO.js → chunk-PWOQS363.js} +4 -4
  14. package/dist/chunk-PWOQS363.js.map +1 -0
  15. package/dist/extensions.d.cts +1 -1
  16. package/dist/extensions.d.ts +1 -1
  17. package/dist/{get-parameters-as-json-schema-BH81ZOnw.d.ts → get-parameters-as-json-schema-BZjPPE3y.d.ts} +5 -0
  18. package/dist/{get-parameters-as-json-schema-DM1vWIEM.d.cts → get-parameters-as-json-schema-Cbp85O99.d.cts} +5 -0
  19. package/dist/index.cjs +4 -4
  20. package/dist/index.d.cts +9 -5
  21. package/dist/index.d.ts +9 -5
  22. package/dist/index.js +3 -3
  23. package/dist/operation/index.cjs +3 -3
  24. package/dist/operation/index.d.cts +1 -1
  25. package/dist/operation/index.d.ts +1 -1
  26. package/dist/operation/index.js +2 -2
  27. package/dist/reducer/index.cjs +7 -7
  28. package/dist/reducer/index.js +1 -1
  29. package/dist/utils.cjs +2 -2
  30. package/dist/utils.d.cts +1 -1
  31. package/dist/utils.d.ts +1 -1
  32. package/dist/utils.js +1 -1
  33. package/package.json +2 -2
  34. package/dist/chunk-GZWQFGK3.js.map +0 -1
  35. package/dist/chunk-MCWI63SO.js.map +0 -1
  36. package/dist/chunk-PQHJW3YY.cjs.map +0 -1
  37. package/dist/chunk-SSHP7N5B.cjs.map +0 -1
  38. package/dist/chunk-ZEPIAQ7U.js.map +0 -1
@@ -1,12 +1,12 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkNWEIS3AGcjs = require('../chunk-NWEIS3AG.cjs');
4
- require('../chunk-PQHJW3YY.cjs');
3
+ var _chunkK6I5TTHDcjs = require('../chunk-K6I5TTHD.cjs');
4
+ require('../chunk-FFY6V4PB.cjs');
5
5
 
6
6
 
7
7
 
8
8
  var _chunkW6GBV2JTcjs = require('../chunk-W6GBV2JT.cjs');
9
- require('../chunk-SSHP7N5B.cjs');
9
+ require('../chunk-JPHXF4VQ.cjs');
10
10
  require('../chunk-AYA3UT4L.cjs');
11
11
  require('../chunk-3MTU2ESP.cjs');
12
12
 
@@ -20,7 +20,7 @@ function callbacks(definition) {
20
20
  );
21
21
  }
22
22
  async function circularRefs(definition) {
23
- const oas = new (0, _chunkNWEIS3AGcjs.Oas)(structuredClone(definition));
23
+ const oas = new (0, _chunkK6I5TTHDcjs.Oas)(structuredClone(definition));
24
24
  await oas.dereference();
25
25
  const results = oas.getCircularReferences();
26
26
  results.sort();
@@ -33,7 +33,7 @@ function discriminators(definition) {
33
33
  return _chunkW6GBV2JTcjs.query.call(void 0, ["$..discriminator"], definition).map((res) => _chunkW6GBV2JTcjs.refizePointer.call(void 0, res.pointer));
34
34
  }
35
35
  async function fileSize(definition) {
36
- const oas = new (0, _chunkNWEIS3AGcjs.Oas)(structuredClone(definition));
36
+ const oas = new (0, _chunkK6I5TTHDcjs.Oas)(structuredClone(definition));
37
37
  const originalSizeInBytes = Buffer.from(JSON.stringify(oas.api)).length;
38
38
  const raw = Number((originalSizeInBytes / (1024 * 1024)).toFixed(2));
39
39
  await oas.dereference();
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  Oas
3
- } from "../chunk-MCWI63SO.js";
4
- import "../chunk-GZWQFGK3.js";
3
+ } from "../chunk-PWOQS363.js";
4
+ import "../chunk-OVBQKA6Q.js";
5
5
  import {
6
6
  query,
7
7
  refizePointer
8
8
  } from "../chunk-CKC36IL7.js";
9
- import "../chunk-ZEPIAQ7U.js";
9
+ import "../chunk-GC7622O4.js";
10
10
  import "../chunk-S27IGTVG.js";
11
11
  import "../chunk-PSNTODZL.js";
12
12
 
@@ -15,7 +15,7 @@
15
15
 
16
16
 
17
17
 
18
- var _chunkSSHP7N5Bcjs = require('./chunk-SSHP7N5B.cjs');
18
+ var _chunkJPHXF4VQcjs = require('./chunk-JPHXF4VQ.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 (!_chunkSSHP7N5Bcjs.isObject.call(void 0, thing)) {
59
+ if (!_chunkJPHXF4VQcjs.isObject.call(void 0, thing)) {
60
60
  return {};
61
61
  }
62
62
  return thing;
@@ -135,7 +135,7 @@ function sampleFromSchema(schema, opts = {}) {
135
135
  if (seenRefs.has(refToRelease)) {
136
136
  return void 0;
137
137
  }
138
- objectifySchema = _chunkSSHP7N5Bcjs.dereferenceRef.call(void 0, objectifySchema, opts.definition, seenRefs);
138
+ objectifySchema = _chunkJPHXF4VQcjs.dereferenceRef.call(void 0, objectifySchema, opts.definition, seenRefs);
139
139
  if (!objectifySchema || _chunk3MTU2ESPcjs.isRef.call(void 0, objectifySchema)) {
140
140
  return void 0;
141
141
  }
@@ -157,7 +157,7 @@ function sampleFromResolvedSchema(schema, opts, seenRefs) {
157
157
  const resolvedAllOf = schema.allOf.map((subSchema) => {
158
158
  let sub = objectify(subSchema);
159
159
  if (definition && _chunk3MTU2ESPcjs.isRef.call(void 0, sub)) {
160
- const resolved = _chunkSSHP7N5Bcjs.dereferenceRef.call(void 0, sub, definition, /* @__PURE__ */ new Set());
160
+ const resolved = _chunkJPHXF4VQcjs.dereferenceRef.call(void 0, sub, definition, /* @__PURE__ */ new Set());
161
161
  if (resolved && !_chunk3MTU2ESPcjs.isRef.call(void 0, resolved)) {
162
162
  sub = resolved;
163
163
  }
@@ -277,8 +277,8 @@ var samples_default = memo;
277
277
  // src/operation/lib/get-mediatype-examples.ts
278
278
  function getMediaTypeExamples(mediaType, mediaTypeObject, definition, opts = {}) {
279
279
  if (mediaTypeObject.example) {
280
- mediaTypeObject.example = _chunkSSHP7N5Bcjs.dereferenceRefDeep.call(void 0, mediaTypeObject.example, definition);
281
- if (mediaTypeObject.example === void 0 || _chunkSSHP7N5Bcjs.collectRefsInSchema.call(void 0, mediaTypeObject.example).size > 0) {
280
+ mediaTypeObject.example = _chunkJPHXF4VQcjs.dereferenceRefDeep.call(void 0, mediaTypeObject.example, definition);
281
+ if (mediaTypeObject.example === void 0 || _chunkJPHXF4VQcjs.collectRefsInSchema.call(void 0, mediaTypeObject.example).size > 0) {
282
282
  return [];
283
283
  }
284
284
  return [
@@ -294,7 +294,7 @@ function getMediaTypeExamples(mediaType, mediaTypeObject, definition, opts = {})
294
294
  let example = examples[key];
295
295
  if (example !== null && typeof example === "object") {
296
296
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, example)) {
297
- example = _chunkSSHP7N5Bcjs.dereferenceRef.call(void 0, example, definition);
297
+ example = _chunkJPHXF4VQcjs.dereferenceRef.call(void 0, example, definition);
298
298
  if (!example || _chunk3MTU2ESPcjs.isRef.call(void 0, example)) {
299
299
  return false;
300
300
  }
@@ -306,8 +306,8 @@ function getMediaTypeExamples(mediaType, mediaTypeObject, definition, opts = {})
306
306
  description = example.description;
307
307
  }
308
308
  if ("value" in example) {
309
- example.value = _chunkSSHP7N5Bcjs.dereferenceRefDeep.call(void 0, example.value, definition);
310
- if (example.value === void 0 || _chunkSSHP7N5Bcjs.collectRefsInSchema.call(void 0, example.value).size > 0) {
309
+ example.value = _chunkJPHXF4VQcjs.dereferenceRefDeep.call(void 0, example.value, definition);
310
+ if (example.value === void 0 || _chunkJPHXF4VQcjs.collectRefsInSchema.call(void 0, example.value).size > 0) {
311
311
  return false;
312
312
  }
313
313
  example = example.value;
@@ -324,7 +324,7 @@ function getMediaTypeExamples(mediaType, mediaTypeObject, definition, opts = {})
324
324
  }
325
325
  }
326
326
  if (mediaTypeObject.schema) {
327
- if (!_chunkSSHP7N5Bcjs.matches_mimetype_default.xml(mediaType)) {
327
+ if (!_chunkJPHXF4VQcjs.matches_mimetype_default.xml(mediaType)) {
328
328
  return [
329
329
  {
330
330
  value: samples_default(structuredClone(mediaTypeObject.schema), {
@@ -345,7 +345,7 @@ function getResponseExamples(operation, definition) {
345
345
  let onlyHeaders = false;
346
346
  if (!response) return false;
347
347
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, response)) {
348
- response = _chunkSSHP7N5Bcjs.dereferenceRef.call(void 0, response, definition);
348
+ response = _chunkJPHXF4VQcjs.dereferenceRef.call(void 0, response, definition);
349
349
  if (!response || _chunk3MTU2ESPcjs.isRef.call(void 0, response)) return false;
350
350
  }
351
351
  const mediaTypes = {};
@@ -385,14 +385,14 @@ function getCallbackExamples(operation, definition) {
385
385
  let callback = _optionalChain([operation, 'access', _17 => _17.callbacks, 'optionalAccess', _18 => _18[identifier]]);
386
386
  if (!callback) return [];
387
387
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, callback)) {
388
- callback = _chunkSSHP7N5Bcjs.dereferenceRef.call(void 0, callback, definition);
388
+ callback = _chunkJPHXF4VQcjs.dereferenceRef.call(void 0, callback, definition);
389
389
  if (!callback || _chunk3MTU2ESPcjs.isRef.call(void 0, callback)) return [];
390
390
  }
391
391
  const items = Object.keys(callback).map((expression) => {
392
392
  let callbackPath = callback[expression];
393
393
  if (!callbackPath) return [];
394
394
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, callbackPath)) {
395
- callbackPath = _chunkSSHP7N5Bcjs.dereferenceRef.call(void 0, callbackPath, definition);
395
+ callbackPath = _chunkJPHXF4VQcjs.dereferenceRef.call(void 0, callbackPath, definition);
396
396
  if (!callbackPath || _chunk3MTU2ESPcjs.isRef.call(void 0, callbackPath)) return [];
397
397
  }
398
398
  return Object.keys(callbackPath).map((method) => {
@@ -475,7 +475,7 @@ function getExampleGroups(operation) {
475
475
  Object.entries(param.examples || {}).forEach(([exampleKey, paramExample]) => {
476
476
  let example = paramExample;
477
477
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, example)) {
478
- example = _chunkSSHP7N5Bcjs.dereferenceRef.call(void 0, example, operation.api);
478
+ example = _chunkJPHXF4VQcjs.dereferenceRef.call(void 0, example, operation.api);
479
479
  if (!example || _chunk3MTU2ESPcjs.isRef.call(void 0, example)) return;
480
480
  }
481
481
  groups[exampleKey] = {
@@ -523,7 +523,7 @@ function getRequestBodyExamples(operation, definition) {
523
523
  if (!requestBody) {
524
524
  return [];
525
525
  } else if (_chunk3MTU2ESPcjs.isRef.call(void 0, requestBody)) {
526
- requestBody = _chunkSSHP7N5Bcjs.dereferenceRef.call(void 0, requestBody, definition);
526
+ requestBody = _chunkJPHXF4VQcjs.dereferenceRef.call(void 0, requestBody, definition);
527
527
  }
528
528
  if (!requestBody || _chunk3MTU2ESPcjs.isRef.call(void 0, requestBody) || !requestBody.content) {
529
529
  return [];
@@ -588,7 +588,7 @@ function getOperationId(path, method, operation, opts = {}) {
588
588
  }
589
589
 
590
590
  // src/operation/transformers/get-response-as-json-schema.ts
591
- var isJSON = _chunkSSHP7N5Bcjs.matches_mimetype_default.json;
591
+ var isJSON = _chunkJPHXF4VQcjs.matches_mimetype_default.json;
592
592
  function buildHeadersSchema(response, schemaOptions) {
593
593
  const headersSchema = {
594
594
  type: "object",
@@ -601,7 +601,7 @@ function buildHeadersSchema(response, schemaOptions) {
601
601
  let headerEntry = _optionalChain([response, 'access', _45 => _45.headers, 'optionalAccess', _46 => _46[key]]);
602
602
  if (!headerEntry) return;
603
603
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, headerEntry)) {
604
- headerEntry = _chunkSSHP7N5Bcjs.dereferenceRef.call(void 0, headerEntry, api, seenRefs);
604
+ headerEntry = _chunkJPHXF4VQcjs.dereferenceRef.call(void 0, headerEntry, api, seenRefs);
605
605
  if (!headerEntry || _chunk3MTU2ESPcjs.isRef.call(void 0, headerEntry)) return;
606
606
  }
607
607
  if (headerEntry.schema) {
@@ -609,10 +609,10 @@ function buildHeadersSchema(response, schemaOptions) {
609
609
  let headerSchema = header.schema;
610
610
  if (!headerSchema) return;
611
611
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, headerSchema)) {
612
- headerSchema = _chunkSSHP7N5Bcjs.dereferenceRef.call(void 0, headerSchema, api, seenRefs);
612
+ headerSchema = _chunkJPHXF4VQcjs.dereferenceRef.call(void 0, headerSchema, api, seenRefs);
613
613
  if (!headerSchema || _chunk3MTU2ESPcjs.isRef.call(void 0, headerSchema)) return;
614
614
  }
615
- headersSchema.properties[key] = _chunkSSHP7N5Bcjs.toJSONSchema.call(void 0, _chunkSSHP7N5Bcjs.cloneObject.call(void 0, headerSchema), {
615
+ headersSchema.properties[key] = _chunkJPHXF4VQcjs.toJSONSchema.call(void 0, _chunkJPHXF4VQcjs.cloneObject.call(void 0, headerSchema), {
616
616
  addEnumsToDescriptions: true,
617
617
  ...schemaOptions
618
618
  });
@@ -666,32 +666,32 @@ function getResponseAsJSONSchema(operation, api, statusCode, opts) {
666
666
  }
667
667
  if (preferredContentType) {
668
668
  if (contentTypes.includes(preferredContentType)) {
669
- const schema2 = _chunkSSHP7N5Bcjs.cloneObject.call(void 0, content[preferredContentType].schema);
669
+ const schema2 = _chunkJPHXF4VQcjs.cloneObject.call(void 0, content[preferredContentType].schema);
670
670
  if (!schema2) {
671
671
  return null;
672
672
  }
673
- return _chunkSSHP7N5Bcjs.toJSONSchema.call(void 0, schema2, baseSchemaOptions);
673
+ return _chunkJPHXF4VQcjs.toJSONSchema.call(void 0, schema2, baseSchemaOptions);
674
674
  }
675
675
  return null;
676
676
  }
677
677
  for (let i = 0; i < contentTypes.length; i++) {
678
678
  if (isJSON(contentTypes[i])) {
679
- const schema2 = _chunkSSHP7N5Bcjs.cloneObject.call(void 0, content[contentTypes[i]].schema);
679
+ const schema2 = _chunkJPHXF4VQcjs.cloneObject.call(void 0, content[contentTypes[i]].schema);
680
680
  if (!schema2) {
681
681
  return {};
682
682
  }
683
- return _chunkSSHP7N5Bcjs.toJSONSchema.call(void 0, schema2, baseSchemaOptions);
683
+ return _chunkJPHXF4VQcjs.toJSONSchema.call(void 0, schema2, baseSchemaOptions);
684
684
  }
685
685
  }
686
686
  const contentType = contentTypes.shift();
687
687
  if (!contentType) {
688
688
  return {};
689
689
  }
690
- const schema = _chunkSSHP7N5Bcjs.cloneObject.call(void 0, content[contentType].schema);
690
+ const schema = _chunkJPHXF4VQcjs.cloneObject.call(void 0, content[contentType].schema);
691
691
  if (!schema) {
692
692
  return {};
693
693
  }
694
- return _chunkSSHP7N5Bcjs.toJSONSchema.call(void 0, schema, baseSchemaOptions);
694
+ return _chunkJPHXF4VQcjs.toJSONSchema.call(void 0, schema, baseSchemaOptions);
695
695
  }
696
696
  const foundSchema = getPreferredSchema(response.content, _optionalChain([opts, 'optionalAccess', _47 => _47.contentType]));
697
697
  if (_optionalChain([opts, 'optionalAccess', _48 => _48.contentType]) && !foundSchema) {
@@ -710,23 +710,23 @@ function getResponseAsJSONSchema(operation, api, statusCode, opts) {
710
710
  // able to render so instead of generating a JSON Schema with an `undefined` type we should
711
711
  // default to `string` so there's at least *something* the end-user can interact with.
712
712
  type: _nullishCoalesce(schemaType, () => ( "string")),
713
- schema: _chunkSSHP7N5Bcjs.isPrimitive.call(void 0, schema) ? schema : {
713
+ schema: _chunkJPHXF4VQcjs.isPrimitive.call(void 0, schema) ? schema : {
714
714
  ...schema,
715
- $schema: _chunkSSHP7N5Bcjs.getSchemaVersionString.call(void 0, schema, api)
715
+ $schema: _chunkJPHXF4VQcjs.getSchemaVersionString.call(void 0, schema, api)
716
716
  },
717
717
  label: "Response body"
718
718
  };
719
719
  if (response.description && schemaWrapper.schema) {
720
720
  schemaWrapper.description = response.description;
721
721
  }
722
- _chunkSSHP7N5Bcjs.applyDiscriminatorOneOfToUsedSchemas.call(void 0, api, usedSchemas, (ref) => {
722
+ _chunkJPHXF4VQcjs.applyDiscriminatorOneOfToUsedSchemas.call(void 0, api, usedSchemas, (ref) => {
723
723
  if (usedSchemas.has(ref)) {
724
724
  return usedSchemas.get(ref);
725
725
  }
726
726
  try {
727
- const resolved = _chunkSSHP7N5Bcjs.dereferenceRef.call(void 0, { $ref: ref }, api, seenRefs);
727
+ const resolved = _chunkJPHXF4VQcjs.dereferenceRef.call(void 0, { $ref: ref }, api, seenRefs);
728
728
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, resolved)) return;
729
- const converted = _chunkSSHP7N5Bcjs.toJSONSchema.call(void 0, structuredClone(resolved), {
729
+ const converted = _chunkJPHXF4VQcjs.toJSONSchema.call(void 0, structuredClone(resolved), {
730
730
  ...baseSchemaOptions,
731
731
  seenRefs
732
732
  });
@@ -736,11 +736,11 @@ function getResponseAsJSONSchema(operation, api, statusCode, opts) {
736
736
  }
737
737
  });
738
738
  if (schemaWrapper.schema && usedSchemas.size > 0) {
739
- const refsInOutput = _chunkSSHP7N5Bcjs.collectRefsInSchema.call(void 0, schemaWrapper.schema);
739
+ const refsInOutput = _chunkJPHXF4VQcjs.collectRefsInSchema.call(void 0, schemaWrapper.schema);
740
740
  const refsInGroup = _nullishCoalesce(refsByGroup.get("body"), () => ( /* @__PURE__ */ new Set()));
741
- const referencedSchemas = _chunkSSHP7N5Bcjs.filterRequiredRefsToReferenced.call(void 0, /* @__PURE__ */ new Set([...refsInGroup, ...refsInOutput]), usedSchemas);
741
+ const referencedSchemas = _chunkJPHXF4VQcjs.filterRequiredRefsToReferenced.call(void 0, /* @__PURE__ */ new Set([...refsInGroup, ...refsInOutput]), usedSchemas);
742
742
  if (referencedSchemas.size > 0) {
743
- _chunkSSHP7N5Bcjs.mergeReferencedSchemasIntoRoot.call(void 0, schemaWrapper.schema, referencedSchemas);
743
+ _chunkJPHXF4VQcjs.mergeReferencedSchemasIntoRoot.call(void 0, schemaWrapper.schema, referencedSchemas);
744
744
  }
745
745
  }
746
746
  jsonSchema.push(schemaWrapper);
@@ -752,10 +752,10 @@ function getResponseAsJSONSchema(operation, api, statusCode, opts) {
752
752
  });
753
753
  if (headersWrapper.schema && usedSchemas.size > 0) {
754
754
  const refsInGroup = _nullishCoalesce(refsByGroup.get("headers"), () => ( /* @__PURE__ */ new Set()));
755
- const refsInOutput = _chunkSSHP7N5Bcjs.collectRefsInSchema.call(void 0, headersWrapper.schema);
756
- const referencedSchemas = _chunkSSHP7N5Bcjs.filterRequiredRefsToReferenced.call(void 0, /* @__PURE__ */ new Set([...refsInGroup, ...refsInOutput]), usedSchemas);
755
+ const refsInOutput = _chunkJPHXF4VQcjs.collectRefsInSchema.call(void 0, headersWrapper.schema);
756
+ const referencedSchemas = _chunkJPHXF4VQcjs.filterRequiredRefsToReferenced.call(void 0, /* @__PURE__ */ new Set([...refsInGroup, ...refsInOutput]), usedSchemas);
757
757
  if (referencedSchemas.size > 0) {
758
- _chunkSSHP7N5Bcjs.mergeReferencedSchemasIntoRoot.call(void 0, headersWrapper.schema, referencedSchemas);
758
+ _chunkJPHXF4VQcjs.mergeReferencedSchemasIntoRoot.call(void 0, headersWrapper.schema, referencedSchemas);
759
759
  }
760
760
  }
761
761
  jsonSchema.push(headersWrapper);
@@ -895,7 +895,7 @@ var Operation = (_class = class {
895
895
  let types = [];
896
896
  if (this.schema.requestBody) {
897
897
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, this.schema.requestBody)) {
898
- this.schema.requestBody = _chunkSSHP7N5Bcjs.dereferenceRef.call(void 0, this.schema.requestBody, this.api);
898
+ this.schema.requestBody = _chunkJPHXF4VQcjs.dereferenceRef.call(void 0, this.schema.requestBody, this.api);
899
899
  }
900
900
  if (this.schema.requestBody && "content" in this.schema.requestBody) {
901
901
  types = Object.keys(this.schema.requestBody.content);
@@ -906,7 +906,7 @@ var Operation = (_class = class {
906
906
  this.contentType = types[0];
907
907
  }
908
908
  types.forEach((t) => {
909
- if (_chunkSSHP7N5Bcjs.matches_mimetype_default.json(t)) {
909
+ if (_chunkJPHXF4VQcjs.matches_mimetype_default.json(t)) {
910
910
  this.contentType = t;
911
911
  }
912
912
  });
@@ -919,7 +919,7 @@ var Operation = (_class = class {
919
919
  * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-request-body-content}
920
920
  */
921
921
  isFormUrlEncoded() {
922
- return _chunkSSHP7N5Bcjs.matches_mimetype_default.formUrlEncoded(this.getContentType());
922
+ return _chunkJPHXF4VQcjs.matches_mimetype_default.formUrlEncoded(this.getContentType());
923
923
  }
924
924
  /**
925
925
  * Checks if the current operation has a mutipart content type payload.
@@ -928,7 +928,7 @@ var Operation = (_class = class {
928
928
  * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-request-body-content}
929
929
  */
930
930
  isMultipart() {
931
- return _chunkSSHP7N5Bcjs.matches_mimetype_default.multipart(this.getContentType());
931
+ return _chunkJPHXF4VQcjs.matches_mimetype_default.multipart(this.getContentType());
932
932
  }
933
933
  /**
934
934
  * Checks if the current operation has a JSON-like content type payload.
@@ -937,7 +937,7 @@ var Operation = (_class = class {
937
937
  * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-request-body-content}
938
938
  */
939
939
  isJson() {
940
- return _chunkSSHP7N5Bcjs.matches_mimetype_default.json(this.getContentType());
940
+ return _chunkJPHXF4VQcjs.matches_mimetype_default.json(this.getContentType());
941
941
  }
942
942
  /**
943
943
  * Checks if the current operation has an XML content type payload.
@@ -946,7 +946,7 @@ var Operation = (_class = class {
946
946
  * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-request-body-content}
947
947
  */
948
948
  isXml() {
949
- return _chunkSSHP7N5Bcjs.matches_mimetype_default.xml(this.getContentType());
949
+ return _chunkJPHXF4VQcjs.matches_mimetype_default.xml(this.getContentType());
950
950
  }
951
951
  /**
952
952
  * Checks if the current operation is a webhook or not.
@@ -994,7 +994,7 @@ var Operation = (_class = class {
994
994
  security = _optionalChain([this, 'access', _65 => _65.api, 'optionalAccess', _66 => _66.components, 'optionalAccess', _67 => _67.securitySchemes, 'optionalAccess', _68 => _68[key]]);
995
995
  if (!security) return false;
996
996
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, security)) {
997
- security = _chunkSSHP7N5Bcjs.dereferenceRef.call(void 0, security, this.api);
997
+ security = _chunkJPHXF4VQcjs.dereferenceRef.call(void 0, security, this.api);
998
998
  if (!security || _chunk3MTU2ESPcjs.isRef.call(void 0, security)) return false;
999
999
  }
1000
1000
  } catch (e4) {
@@ -1075,7 +1075,7 @@ var Operation = (_class = class {
1075
1075
  this.schema.parameters.map((p) => {
1076
1076
  let param = p;
1077
1077
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, param)) {
1078
- param = _chunkSSHP7N5Bcjs.dereferenceRef.call(void 0, param, this.api);
1078
+ param = _chunkJPHXF4VQcjs.dereferenceRef.call(void 0, param, this.api);
1079
1079
  if (!param || _chunk3MTU2ESPcjs.isRef.call(void 0, param)) return;
1080
1080
  }
1081
1081
  if (param.in && param.in === "header") return param.name;
@@ -1088,7 +1088,7 @@ var Operation = (_class = class {
1088
1088
  let response = this.schema.responses[r];
1089
1089
  if (!response) return [];
1090
1090
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, response)) {
1091
- this.schema.responses[r] = _chunkSSHP7N5Bcjs.dereferenceRef.call(void 0, response, this.api);
1091
+ this.schema.responses[r] = _chunkJPHXF4VQcjs.dereferenceRef.call(void 0, response, this.api);
1092
1092
  response = this.schema.responses[r];
1093
1093
  if (!response || _chunk3MTU2ESPcjs.isRef.call(void 0, response)) {
1094
1094
  return [];
@@ -1101,7 +1101,7 @@ var Operation = (_class = class {
1101
1101
  let requestBody = this.schema.requestBody;
1102
1102
  if (requestBody) {
1103
1103
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, requestBody)) {
1104
- this.schema.requestBody = _chunkSSHP7N5Bcjs.dereferenceRef.call(void 0, requestBody, this.api);
1104
+ this.schema.requestBody = _chunkJPHXF4VQcjs.dereferenceRef.call(void 0, requestBody, this.api);
1105
1105
  requestBody = this.schema.requestBody;
1106
1106
  }
1107
1107
  if (requestBody && !_chunk3MTU2ESPcjs.isRef.call(void 0, requestBody) && "content" in requestBody && Object.keys(requestBody.content)) {
@@ -1114,7 +1114,7 @@ var Operation = (_class = class {
1114
1114
  let response = _optionalChain([this, 'access', _72 => _72.schema, 'access', _73 => _73.responses, 'optionalAccess', _74 => _74[r]]);
1115
1115
  if (!response) return false;
1116
1116
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, response)) {
1117
- this.schema.responses[r] = _chunkSSHP7N5Bcjs.dereferenceRef.call(void 0, response, this.api);
1117
+ this.schema.responses[r] = _chunkJPHXF4VQcjs.dereferenceRef.call(void 0, response, this.api);
1118
1118
  response = this.schema.responses[r];
1119
1119
  if (!response || _chunk3MTU2ESPcjs.isRef.call(void 0, response)) {
1120
1120
  return false;
@@ -1224,7 +1224,7 @@ var Operation = (_class = class {
1224
1224
  let parameters = (_optionalChain([this, 'access', _77 => _77.schema, 'optionalAccess', _78 => _78.parameters]) || []).map((p) => {
1225
1225
  let param = p;
1226
1226
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, param)) {
1227
- param = _chunkSSHP7N5Bcjs.dereferenceRef.call(void 0, param, this.api);
1227
+ param = _chunkJPHXF4VQcjs.dereferenceRef.call(void 0, param, this.api);
1228
1228
  if (!param || _chunk3MTU2ESPcjs.isRef.call(void 0, param)) return;
1229
1229
  }
1230
1230
  return param;
@@ -1232,7 +1232,7 @@ var Operation = (_class = class {
1232
1232
  const commonParams = (_optionalChain([this, 'access', _79 => _79.api, 'optionalAccess', _80 => _80.paths, 'optionalAccess', _81 => _81[this.path], 'optionalAccess', _82 => _82.parameters]) || []).map((p) => {
1233
1233
  let param = p;
1234
1234
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, param)) {
1235
- param = _chunkSSHP7N5Bcjs.dereferenceRef.call(void 0, param, this.api);
1235
+ param = _chunkJPHXF4VQcjs.dereferenceRef.call(void 0, param, this.api);
1236
1236
  if (!param || _chunk3MTU2ESPcjs.isRef.call(void 0, param)) return;
1237
1237
  }
1238
1238
  return param;
@@ -1270,10 +1270,10 @@ var Operation = (_class = class {
1270
1270
  );
1271
1271
  }
1272
1272
  if (!this.schemasDecorated) {
1273
- _chunkSSHP7N5Bcjs.decorateComponentSchemasWithRefName.call(void 0, this.api);
1273
+ _chunkJPHXF4VQcjs.decorateComponentSchemasWithRefName.call(void 0, this.api);
1274
1274
  this.schemasDecorated = true;
1275
1275
  }
1276
- return _chunkSSHP7N5Bcjs.getParametersAsJSONSchema.call(void 0, this, this.api, {
1276
+ return _chunkJPHXF4VQcjs.getParametersAsJSONSchema.call(void 0, this, this.api, {
1277
1277
  includeDiscriminatorMappingRefs: true,
1278
1278
  ...opts
1279
1279
  });
@@ -1298,7 +1298,7 @@ var Operation = (_class = class {
1298
1298
  );
1299
1299
  }
1300
1300
  if (!this.schemasDecorated) {
1301
- _chunkSSHP7N5Bcjs.decorateComponentSchemasWithRefName.call(void 0, this.api);
1301
+ _chunkJPHXF4VQcjs.decorateComponentSchemasWithRefName.call(void 0, this.api);
1302
1302
  this.schemasDecorated = true;
1303
1303
  }
1304
1304
  return getResponseAsJSONSchema(this, this.api, statusCode, {
@@ -1313,7 +1313,7 @@ var Operation = (_class = class {
1313
1313
  getResponseStatusCodes() {
1314
1314
  if (!this.schema.responses) return [];
1315
1315
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, this.schema.responses)) {
1316
- this.schema.responses = _chunkSSHP7N5Bcjs.dereferenceRef.call(void 0, this.schema.responses, this.api);
1316
+ this.schema.responses = _chunkJPHXF4VQcjs.dereferenceRef.call(void 0, this.schema.responses, this.api);
1317
1317
  if (!this.schema.responses || _chunk3MTU2ESPcjs.isRef.call(void 0, this.schema.responses)) {
1318
1318
  return [];
1319
1319
  }
@@ -1339,7 +1339,7 @@ var Operation = (_class = class {
1339
1339
  let resp = response;
1340
1340
  if (!resp) return;
1341
1341
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, resp)) {
1342
- resp = _chunkSSHP7N5Bcjs.dereferenceRef.call(void 0, resp, this.api);
1342
+ resp = _chunkJPHXF4VQcjs.dereferenceRef.call(void 0, resp, this.api);
1343
1343
  if (!resp || _chunk3MTU2ESPcjs.isRef.call(void 0, resp)) {
1344
1344
  return;
1345
1345
  }
@@ -1368,7 +1368,7 @@ var Operation = (_class = class {
1368
1368
  let requestBody = this.schema.requestBody;
1369
1369
  if (!requestBody) return false;
1370
1370
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, requestBody)) {
1371
- this.schema.requestBody = _chunkSSHP7N5Bcjs.dereferenceRef.call(void 0, requestBody, this.api);
1371
+ this.schema.requestBody = _chunkJPHXF4VQcjs.dereferenceRef.call(void 0, requestBody, this.api);
1372
1372
  requestBody = this.schema.requestBody;
1373
1373
  if (!requestBody || _chunk3MTU2ESPcjs.isRef.call(void 0, requestBody)) {
1374
1374
  return false;
@@ -1415,9 +1415,9 @@ var Operation = (_class = class {
1415
1415
  * Retrieve a specific request body content schema off this operation.
1416
1416
  *
1417
1417
  * If no media type is supplied this will return either the first available JSON-like request
1418
- * body, or the first available if there are no JSON-like media types present. When this return
1419
- * comes back it's in the form of an array with the first key being the selected media type,
1420
- * followed by the media type object in question.
1418
+ * body, or the first available if there are no JSON-like media types present. The return value
1419
+ * is an object containing the selected media type, the media type object, and an optional
1420
+ * description.
1421
1421
  *
1422
1422
  * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#media-type-object}
1423
1423
  * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#media-type-object}
@@ -1433,12 +1433,16 @@ var Operation = (_class = class {
1433
1433
  if (!(mediaType in requestBody.content)) {
1434
1434
  return false;
1435
1435
  }
1436
- return requestBody.content[mediaType];
1436
+ return {
1437
+ mediaType,
1438
+ mediaTypeObject: requestBody.content[mediaType],
1439
+ description: requestBody.description
1440
+ };
1437
1441
  }
1438
1442
  let availableMediaType;
1439
1443
  const mediaTypes = this.getRequestBodyMediaTypes();
1440
1444
  mediaTypes.forEach((mt) => {
1441
- if (!availableMediaType && _chunkSSHP7N5Bcjs.matches_mimetype_default.json(mt)) {
1445
+ if (!availableMediaType && _chunkJPHXF4VQcjs.matches_mimetype_default.json(mt)) {
1442
1446
  availableMediaType = mt;
1443
1447
  }
1444
1448
  });
@@ -1450,11 +1454,11 @@ var Operation = (_class = class {
1450
1454
  });
1451
1455
  }
1452
1456
  if (availableMediaType) {
1453
- return [
1454
- availableMediaType,
1455
- requestBody.content[availableMediaType],
1456
- ...requestBody.description ? [requestBody.description] : []
1457
- ];
1457
+ return {
1458
+ mediaType: availableMediaType,
1459
+ mediaTypeObject: requestBody.content[availableMediaType],
1460
+ description: requestBody.description
1461
+ };
1458
1462
  }
1459
1463
  return false;
1460
1464
  }
@@ -1486,7 +1490,7 @@ var Operation = (_class = class {
1486
1490
  let response = this.schema.responses[statusCode];
1487
1491
  if (!response) return false;
1488
1492
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, response)) {
1489
- this.schema.responses[statusCode] = _chunkSSHP7N5Bcjs.dereferenceRef.call(void 0, response, this.api);
1493
+ this.schema.responses[statusCode] = _chunkJPHXF4VQcjs.dereferenceRef.call(void 0, response, this.api);
1490
1494
  response = this.schema.responses[statusCode];
1491
1495
  if (!response || _chunk3MTU2ESPcjs.isRef.call(void 0, response)) {
1492
1496
  return false;
@@ -1530,7 +1534,7 @@ var Operation = (_class = class {
1530
1534
  let callbackObj = this.schema.callbacks[identifier];
1531
1535
  if (!callbackObj) return false;
1532
1536
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, callbackObj)) {
1533
- this.schema.callbacks[identifier] = _chunkSSHP7N5Bcjs.dereferenceRef.call(void 0, callbackObj, this.api);
1537
+ this.schema.callbacks[identifier] = _chunkJPHXF4VQcjs.dereferenceRef.call(void 0, callbackObj, this.api);
1534
1538
  callbackObj = this.schema.callbacks[identifier];
1535
1539
  if (!callbackObj || _chunk3MTU2ESPcjs.isRef.call(void 0, callbackObj)) {
1536
1540
  return false;
@@ -1539,7 +1543,7 @@ var Operation = (_class = class {
1539
1543
  let callback = callbackObj[expression];
1540
1544
  if (!callback) return false;
1541
1545
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, callback)) {
1542
- callbackObj[expression] = _chunkSSHP7N5Bcjs.dereferenceRef.call(void 0, callback, this.api);
1546
+ callbackObj[expression] = _chunkJPHXF4VQcjs.dereferenceRef.call(void 0, callback, this.api);
1543
1547
  callback = callbackObj[expression];
1544
1548
  if (!callback || _chunk3MTU2ESPcjs.isRef.call(void 0, callback)) {
1545
1549
  return false;
@@ -1563,7 +1567,7 @@ var Operation = (_class = class {
1563
1567
  let cb = _optionalChain([this, 'access', _91 => _91.schema, 'access', _92 => _92.callbacks, 'optionalAccess', _93 => _93[callback]]);
1564
1568
  if (!cb) return;
1565
1569
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, cb)) {
1566
- this.schema.callbacks[callback] = _chunkSSHP7N5Bcjs.dereferenceRef.call(void 0, cb, this.api);
1570
+ this.schema.callbacks[callback] = _chunkJPHXF4VQcjs.dereferenceRef.call(void 0, cb, this.api);
1567
1571
  cb = this.schema.callbacks[callback];
1568
1572
  if (!cb || _chunk3MTU2ESPcjs.isRef.call(void 0, cb)) {
1569
1573
  return;
@@ -1573,14 +1577,14 @@ var Operation = (_class = class {
1573
1577
  let callbackPath = cb[expression];
1574
1578
  if (!callbackPath) return;
1575
1579
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, callbackPath)) {
1576
- cb[expression] = _chunkSSHP7N5Bcjs.dereferenceRef.call(void 0, callbackPath, this.api);
1580
+ cb[expression] = _chunkJPHXF4VQcjs.dereferenceRef.call(void 0, callbackPath, this.api);
1577
1581
  callbackPath = cb[expression];
1578
1582
  if (!callbackPath || _chunk3MTU2ESPcjs.isRef.call(void 0, callbackPath)) {
1579
1583
  return;
1580
1584
  }
1581
1585
  }
1582
1586
  Object.keys(callbackPath).forEach((method) => {
1583
- if (!_chunkSSHP7N5Bcjs.supportedMethods.includes(method)) return;
1587
+ if (!_chunkJPHXF4VQcjs.supportedMethods.includes(method)) return;
1584
1588
  const found = this.getCallback(callback, expression, method);
1585
1589
  if (found) {
1586
1590
  callbacks.push(found);
@@ -1658,12 +1662,12 @@ var Operation = (_class = class {
1658
1662
  }
1659
1663
  this.dereferencing.processing = true;
1660
1664
  if (!this.schemasDecorated) {
1661
- _chunkSSHP7N5Bcjs.decorateComponentSchemasWithRefName.call(void 0, this.api);
1665
+ _chunkJPHXF4VQcjs.decorateComponentSchemasWithRefName.call(void 0, this.api);
1662
1666
  this.schemasDecorated = true;
1663
1667
  }
1664
1668
  const { api, schema, promises } = this;
1665
1669
  const circularRefs = /* @__PURE__ */ new Set();
1666
- const dereferencingOptions = _chunkSSHP7N5Bcjs.getDereferencingOptions.call(void 0, circularRefs);
1670
+ const dereferencingOptions = _chunkJPHXF4VQcjs.getDereferencingOptions.call(void 0, circularRefs);
1667
1671
  const parser = new (0, _jsonschemarefparser.$RefParser)();
1668
1672
  return parser.dereference(
1669
1673
  "#/__INTERNAL__",
@@ -1805,7 +1809,7 @@ var Callback = class extends Operation {
1805
1809
  let parameters = (_optionalChain([this, 'access', _101 => _101.schema, 'optionalAccess', _102 => _102.parameters]) || []).map((p) => {
1806
1810
  let param = p;
1807
1811
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, param)) {
1808
- param = _chunkSSHP7N5Bcjs.dereferenceRef.call(void 0, param, this.api);
1812
+ param = _chunkJPHXF4VQcjs.dereferenceRef.call(void 0, param, this.api);
1809
1813
  if (!param || _chunk3MTU2ESPcjs.isRef.call(void 0, param)) return;
1810
1814
  }
1811
1815
  return param;
@@ -1813,7 +1817,7 @@ var Callback = class extends Operation {
1813
1817
  const commonParams = (this.parentSchema.parameters || []).map((p) => {
1814
1818
  let param = p;
1815
1819
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, param)) {
1816
- param = _chunkSSHP7N5Bcjs.dereferenceRef.call(void 0, param, this.api);
1820
+ param = _chunkJPHXF4VQcjs.dereferenceRef.call(void 0, param, this.api);
1817
1821
  if (!param || _chunk3MTU2ESPcjs.isRef.call(void 0, param)) return;
1818
1822
  }
1819
1823
  return param;
@@ -1839,7 +1843,7 @@ var Webhook = class extends Operation {
1839
1843
  }
1840
1844
  let webhookPath = this.api.webhooks[this.path];
1841
1845
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, webhookPath)) {
1842
- this.api.webhooks[this.path] = _chunkSSHP7N5Bcjs.dereferenceRef.call(void 0, webhookPath, this.api);
1846
+ this.api.webhooks[this.path] = _chunkJPHXF4VQcjs.dereferenceRef.call(void 0, webhookPath, this.api);
1843
1847
  webhookPath = this.api.webhooks[this.path];
1844
1848
  }
1845
1849
  return _optionalChain([webhookPath, 'optionalAccess', _105 => _105.summary]);
@@ -1858,7 +1862,7 @@ var Webhook = class extends Operation {
1858
1862
  }
1859
1863
  let webhookPath = this.api.webhooks[this.path];
1860
1864
  if (_chunk3MTU2ESPcjs.isRef.call(void 0, webhookPath)) {
1861
- this.api.webhooks[this.path] = _chunkSSHP7N5Bcjs.dereferenceRef.call(void 0, webhookPath, this.api);
1865
+ this.api.webhooks[this.path] = _chunkJPHXF4VQcjs.dereferenceRef.call(void 0, webhookPath, this.api);
1862
1866
  webhookPath = this.api.webhooks[this.path];
1863
1867
  }
1864
1868
  return _optionalChain([webhookPath, 'optionalAccess', _108 => _108.description]);
@@ -1882,4 +1886,4 @@ exports.Operation = Operation; exports.Callback = Callback; exports.Webhook = We
1882
1886
  * @license Apache-2.0
1883
1887
  * @see {@link https://github.com/swagger-api/swagger-ui/blob/master/src/core/plugins/samples/fn.js}
1884
1888
  */
1885
- //# sourceMappingURL=chunk-PQHJW3YY.cjs.map
1889
+ //# sourceMappingURL=chunk-FFY6V4PB.cjs.map