@microsoft/m365-spec-parser 0.2.4-alpha.5577464e2.0 → 0.2.4-alpha.59a7e76c4.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.
- package/dist/index.esm2017.js +6 -1
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm2017.mjs +21 -6
- package/dist/index.esm2017.mjs.map +1 -1
- package/dist/index.esm5.js +6 -1
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +24 -7
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/src/specParser.d.ts +2 -0
- package/dist/src/utils.d.ts +1 -0
- package/package.json +4 -4
package/dist/index.esm2017.js
CHANGED
|
@@ -128,6 +128,7 @@ ConstantString.ResponseCodeFor20X = [
|
|
|
128
128
|
"207",
|
|
129
129
|
"208",
|
|
130
130
|
"226",
|
|
131
|
+
"2XX",
|
|
131
132
|
"default",
|
|
132
133
|
];
|
|
133
134
|
ConstantString.AllOperationMethods = [
|
|
@@ -197,6 +198,9 @@ class Utils {
|
|
|
197
198
|
static isAPIKeyAuth(authScheme) {
|
|
198
199
|
return authScheme.type === "apiKey";
|
|
199
200
|
}
|
|
201
|
+
static isAPIKeyAuthButNotInCookie(authScheme) {
|
|
202
|
+
return authScheme.type === "apiKey" && authScheme.in !== "cookie";
|
|
203
|
+
}
|
|
200
204
|
static isOAuthWithAuthCodeFlow(authScheme) {
|
|
201
205
|
return !!(authScheme.type === "oauth2" &&
|
|
202
206
|
authScheme.flows &&
|
|
@@ -212,7 +216,8 @@ class Utils {
|
|
|
212
216
|
for (const auths of authSchemeArray) {
|
|
213
217
|
if (auths.length === 1) {
|
|
214
218
|
if (Utils.isOAuthWithAuthCodeFlow(auths[0].authScheme) ||
|
|
215
|
-
Utils.isBearerTokenAuth(auths[0].authScheme)
|
|
219
|
+
Utils.isBearerTokenAuth(auths[0].authScheme) ||
|
|
220
|
+
Utils.isAPIKeyAuthButNotInCookie(auths[0].authScheme)) {
|
|
216
221
|
return false;
|
|
217
222
|
}
|
|
218
223
|
}
|