@scalar/oas-utils 0.2.113 → 0.2.114
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/CHANGELOG.md +6 -0
- package/dist/transforms/import-spec.js +4 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,8 +3,8 @@ import { isHttpMethod } from '../helpers/httpMethods.js';
|
|
|
3
3
|
import { schemaModel } from '../helpers/schema-model.js';
|
|
4
4
|
import { keysOf } from '@scalar/object-utils/arrays';
|
|
5
5
|
import { load, upgrade, dereference } from '@scalar/openapi-parser';
|
|
6
|
-
import { serverSchema } from '../entities/spec/server.js';
|
|
7
6
|
import { isDefined } from '../helpers/is-defined.js';
|
|
7
|
+
import { serverSchema } from '../entities/spec/server.js';
|
|
8
8
|
import { requestSchema } from '../entities/spec/requests.js';
|
|
9
9
|
import { tagSchema } from '../entities/spec/spec-objects.js';
|
|
10
10
|
import { createExampleFromRequest } from '../entities/spec/request-examples.js';
|
|
@@ -55,7 +55,9 @@ const getSelectedSecuritySchemeUids = (securityRequirements, preferredSecurityNa
|
|
|
55
55
|
// Set the first security requirement if no preferred security schemes are set
|
|
56
56
|
const names = securityRequirements[0] && !preferredSecurityNames.length ? [securityRequirements[0]] : preferredSecurityNames;
|
|
57
57
|
// Map names to uids
|
|
58
|
-
const uids = names
|
|
58
|
+
const uids = names
|
|
59
|
+
.map((name) => (Array.isArray(name) ? name.map((k) => securitySchemeMap[k]) : securitySchemeMap[name]))
|
|
60
|
+
.filter(isDefined);
|
|
59
61
|
return uids;
|
|
60
62
|
};
|
|
61
63
|
/**
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"specification",
|
|
17
17
|
"yaml"
|
|
18
18
|
],
|
|
19
|
-
"version": "0.2.
|
|
19
|
+
"version": "0.2.114",
|
|
20
20
|
"engines": {
|
|
21
21
|
"node": ">=18"
|
|
22
22
|
},
|
|
@@ -127,8 +127,8 @@
|
|
|
127
127
|
"yaml": "^2.4.5",
|
|
128
128
|
"zod": "^3.23.8",
|
|
129
129
|
"@scalar/object-utils": "1.1.13",
|
|
130
|
-
"@scalar/themes": "0.9.74",
|
|
131
130
|
"@scalar/openapi-types": "0.1.9",
|
|
131
|
+
"@scalar/themes": "0.9.74",
|
|
132
132
|
"@scalar/types": "0.0.39"
|
|
133
133
|
},
|
|
134
134
|
"devDependencies": {
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
"vite": "^5.4.10",
|
|
137
137
|
"vitest": "^1.6.0",
|
|
138
138
|
"zod-to-ts": "github:amritk/zod-to-ts#build",
|
|
139
|
-
"@scalar/build-tooling": "0.1.
|
|
139
|
+
"@scalar/build-tooling": "0.1.17",
|
|
140
140
|
"@scalar/openapi-parser": "0.10.9",
|
|
141
141
|
"@scalar/openapi-types": "0.1.9"
|
|
142
142
|
},
|