@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.esm5.js
CHANGED
|
@@ -158,6 +158,7 @@ ConstantString.ResponseCodeFor20X = [
|
|
|
158
158
|
"207",
|
|
159
159
|
"208",
|
|
160
160
|
"226",
|
|
161
|
+
"2XX",
|
|
161
162
|
"default",
|
|
162
163
|
];
|
|
163
164
|
ConstantString.AllOperationMethods = [
|
|
@@ -227,6 +228,9 @@ class Utils {
|
|
|
227
228
|
static isAPIKeyAuth(authScheme) {
|
|
228
229
|
return authScheme.type === "apiKey";
|
|
229
230
|
}
|
|
231
|
+
static isAPIKeyAuthButNotInCookie(authScheme) {
|
|
232
|
+
return authScheme.type === "apiKey" && authScheme.in !== "cookie";
|
|
233
|
+
}
|
|
230
234
|
static isOAuthWithAuthCodeFlow(authScheme) {
|
|
231
235
|
return !!(authScheme.type === "oauth2" &&
|
|
232
236
|
authScheme.flows &&
|
|
@@ -242,7 +246,8 @@ class Utils {
|
|
|
242
246
|
for (const auths of authSchemeArray) {
|
|
243
247
|
if (auths.length === 1) {
|
|
244
248
|
if (Utils.isOAuthWithAuthCodeFlow(auths[0].authScheme) ||
|
|
245
|
-
Utils.isBearerTokenAuth(auths[0].authScheme)
|
|
249
|
+
Utils.isBearerTokenAuth(auths[0].authScheme) ||
|
|
250
|
+
Utils.isAPIKeyAuthButNotInCookie(auths[0].authScheme)) {
|
|
246
251
|
return false;
|
|
247
252
|
}
|
|
248
253
|
}
|