oas 32.1.8 → 32.1.10

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.
@@ -1,12 +1,12 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk7AHI3P7Qcjs = require('../chunk-7AHI3P7Q.cjs');
4
- require('../chunk-SM47EGII.cjs');
3
+ var _chunkDKPOVGFIcjs = require('../chunk-DKPOVGFI.cjs');
4
+ require('../chunk-EYI3QYOG.cjs');
5
5
 
6
6
 
7
7
 
8
8
  var _chunkW6GBV2JTcjs = require('../chunk-W6GBV2JT.cjs');
9
- require('../chunk-KZCEPS4J.cjs');
9
+ require('../chunk-HTEFBV7K.cjs');
10
10
  require('../chunk-AYA3UT4L.cjs');
11
11
  require('../chunk-YPR7YTHM.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, _chunk7AHI3P7Qcjs.Oas)(structuredClone(definition));
23
+ const oas = new (0, _chunkDKPOVGFIcjs.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, _chunk7AHI3P7Qcjs.Oas)(structuredClone(definition));
36
+ const oas = new (0, _chunkDKPOVGFIcjs.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-A3J3WY7Q.js";
4
- import "../chunk-MQX2OLEW.js";
3
+ } from "../chunk-WXXVCSCN.js";
4
+ import "../chunk-2TQO63CW.js";
5
5
  import {
6
6
  query,
7
7
  refizePointer
8
8
  } from "../chunk-CKC36IL7.js";
9
- import "../chunk-7BR3G6FM.js";
9
+ import "../chunk-7BC6KXMO.js";
10
10
  import "../chunk-S27IGTVG.js";
11
11
  import "../chunk-MNOEMVCF.js";
12
12
 
@@ -13,7 +13,7 @@ import {
13
13
  mergeReferencedSchemasIntoRoot,
14
14
  supportedMethods,
15
15
  toJSONSchema
16
- } from "./chunk-7BR3G6FM.js";
16
+ } from "./chunk-7BC6KXMO.js";
17
17
  import {
18
18
  getExtension
19
19
  } from "./chunk-S27IGTVG.js";
@@ -285,6 +285,12 @@ function getMediaTypeExamples(mediaType, mediaTypeObject, definition, opts = {})
285
285
  if ("description" in example) {
286
286
  description = example.description;
287
287
  }
288
+ if (isRef(example)) {
289
+ example = dereferenceRef(example, definition);
290
+ if (!example || isRef(example)) {
291
+ return false;
292
+ }
293
+ }
288
294
  if ("value" in example) {
289
295
  if (isRef(example.value)) {
290
296
  example.value = dereferenceRef(example.value, definition);
@@ -1863,4 +1869,4 @@ export {
1863
1869
  * @license Apache-2.0
1864
1870
  * @see {@link https://github.com/swagger-api/swagger-ui/blob/master/src/core/plugins/samples/fn.js}
1865
1871
  */
1866
- //# sourceMappingURL=chunk-MQX2OLEW.js.map
1872
+ //# sourceMappingURL=chunk-2TQO63CW.js.map