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.
- package/dist/analyzer/index.cjs +5 -5
- package/dist/analyzer/index.js +3 -3
- package/dist/{chunk-MQX2OLEW.js → chunk-2TQO63CW.js} +8 -2
- package/dist/{chunk-MQX2OLEW.js.map → chunk-2TQO63CW.js.map} +1 -1
- package/dist/{chunk-7BR3G6FM.js → chunk-7BC6KXMO.js} +56 -6
- package/dist/chunk-7BC6KXMO.js.map +1 -0
- package/dist/{chunk-7AHI3P7Q.cjs → chunk-DKPOVGFI.cjs} +19 -19
- package/dist/{chunk-7AHI3P7Q.cjs.map → chunk-DKPOVGFI.cjs.map} +1 -1
- package/dist/{chunk-SM47EGII.cjs → chunk-EYI3QYOG.cjs} +69 -63
- package/dist/chunk-EYI3QYOG.cjs.map +1 -0
- package/dist/{chunk-KZCEPS4J.cjs → chunk-HTEFBV7K.cjs} +56 -6
- package/dist/chunk-HTEFBV7K.cjs.map +1 -0
- package/dist/{chunk-A3J3WY7Q.js → chunk-WXXVCSCN.js} +3 -3
- package/dist/index.cjs +4 -4
- package/dist/index.js +3 -3
- package/dist/operation/index.cjs +3 -3
- package/dist/operation/index.js +2 -2
- package/dist/reducer/index.cjs +7 -7
- package/dist/reducer/index.js +1 -1
- package/dist/utils.cjs +2 -2
- package/dist/utils.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-7BR3G6FM.js.map +0 -1
- package/dist/chunk-KZCEPS4J.cjs.map +0 -1
- package/dist/chunk-SM47EGII.cjs.map +0 -1
- /package/dist/{chunk-A3J3WY7Q.js.map → chunk-WXXVCSCN.js.map} +0 -0
package/dist/analyzer/index.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
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-
|
|
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,
|
|
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,
|
|
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();
|
package/dist/analyzer/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Oas
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
1872
|
+
//# sourceMappingURL=chunk-2TQO63CW.js.map
|