oas 36.0.1 → 36.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.
- package/dist/analyzer/index.cjs +5 -5
- package/dist/analyzer/index.js +3 -3
- package/dist/{chunk-GWZBWDMT.js → chunk-35LEYZEY.js} +2 -2
- package/dist/{chunk-LYWP3CSV.js → chunk-6MDVLJ3A.js} +8 -2
- package/dist/{chunk-LYWP3CSV.js.map → chunk-6MDVLJ3A.js.map} +1 -1
- package/dist/{chunk-QI6WI5AK.js → chunk-IXQKQM3K.js} +3 -3
- package/dist/{chunk-C6QTUTTF.cjs → chunk-SCWW2SNX.cjs} +8 -2
- package/dist/chunk-SCWW2SNX.cjs.map +1 -0
- package/dist/{chunk-O2NUKZ7L.cjs → chunk-UDN4U5TL.cjs} +70 -70
- package/dist/{chunk-O2NUKZ7L.cjs.map → chunk-UDN4U5TL.cjs.map} +1 -1
- package/dist/{chunk-BECL5BTE.cjs → chunk-YKV73CBG.cjs} +19 -19
- package/dist/{chunk-BECL5BTE.cjs.map → chunk-YKV73CBG.cjs.map} +1 -1
- 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 +1 -1
- package/dist/chunk-C6QTUTTF.cjs.map +0 -1
- /package/dist/{chunk-GWZBWDMT.js.map → chunk-35LEYZEY.js.map} +0 -0
- /package/dist/{chunk-QI6WI5AK.js.map → chunk-IXQKQM3K.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 _chunkYKV73CBGcjs = require('../chunk-YKV73CBG.cjs');
|
|
4
|
+
require('../chunk-UDN4U5TL.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
var _chunkW6GBV2JTcjs = require('../chunk-W6GBV2JT.cjs');
|
|
9
|
-
require('../chunk-
|
|
9
|
+
require('../chunk-SCWW2SNX.cjs');
|
|
10
10
|
require('../chunk-AYA3UT4L.cjs');
|
|
11
11
|
require('../chunk-7PWF3F2W.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, _chunkYKV73CBGcjs.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, _chunkYKV73CBGcjs.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-IXQKQM3K.js";
|
|
4
|
+
import "../chunk-35LEYZEY.js";
|
|
5
5
|
import {
|
|
6
6
|
query,
|
|
7
7
|
refizePointer
|
|
8
8
|
} from "../chunk-CKC36IL7.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-6MDVLJ3A.js";
|
|
10
10
|
import "../chunk-S27IGTVG.js";
|
|
11
11
|
import "../chunk-XG4HGNCN.js";
|
|
12
12
|
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
mergeReferencedSchemasIntoRoot,
|
|
16
16
|
supportedMethods,
|
|
17
17
|
toJSONSchema
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-6MDVLJ3A.js";
|
|
19
19
|
import {
|
|
20
20
|
getExtension
|
|
21
21
|
} from "./chunk-S27IGTVG.js";
|
|
@@ -1870,4 +1870,4 @@ export {
|
|
|
1870
1870
|
* @license Apache-2.0
|
|
1871
1871
|
* @see {@link https://github.com/swagger-api/swagger-ui/blob/master/src/core/plugins/samples/fn.js}
|
|
1872
1872
|
*/
|
|
1873
|
-
//# sourceMappingURL=chunk-
|
|
1873
|
+
//# sourceMappingURL=chunk-35LEYZEY.js.map
|
|
@@ -1342,6 +1342,10 @@ ${enums}`;
|
|
|
1342
1342
|
}
|
|
1343
1343
|
|
|
1344
1344
|
// src/operation/transformers/get-parameters-as-json-schema.ts
|
|
1345
|
+
var RESERVED_HEADER_PARAMETERS = /* @__PURE__ */ new Set(["accept", "authorization", "content-type"]);
|
|
1346
|
+
function isReservedHeaderParameter(param) {
|
|
1347
|
+
return param.in === "header" && RESERVED_HEADER_PARAMETERS.has(param.name.toLowerCase());
|
|
1348
|
+
}
|
|
1345
1349
|
var types = {
|
|
1346
1350
|
path: "Path Params",
|
|
1347
1351
|
query: "Query Params",
|
|
@@ -1427,7 +1431,9 @@ function getParametersAsJSONSchema(operation, api, opts) {
|
|
|
1427
1431
|
const operationParams = operation.getParameters();
|
|
1428
1432
|
const transformed = Object.keys(types).map((type) => {
|
|
1429
1433
|
const required = [];
|
|
1430
|
-
const parameters = operationParams.filter((param) =>
|
|
1434
|
+
const parameters = operationParams.filter((param) => {
|
|
1435
|
+
return param.in === type && !isReservedHeaderParameter(param);
|
|
1436
|
+
});
|
|
1431
1437
|
if (parameters.length === 0) {
|
|
1432
1438
|
return null;
|
|
1433
1439
|
}
|
|
@@ -1577,4 +1583,4 @@ export {
|
|
|
1577
1583
|
supportedMethods,
|
|
1578
1584
|
SERVER_VARIABLE_REGEX
|
|
1579
1585
|
};
|
|
1580
|
-
//# sourceMappingURL=chunk-
|
|
1586
|
+
//# sourceMappingURL=chunk-6MDVLJ3A.js.map
|