docusaurus-theme-openapi-docs 0.0.0-1004 → 0.0.0-1005
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.
|
@@ -379,9 +379,8 @@ function buildPostmanRequest(
|
|
|
379
379
|
}
|
|
380
380
|
clonedPostman.url.host = [url];
|
|
381
381
|
}
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
const cookie = buildCookie(cookieParams);
|
|
382
|
+
const enhancedQueryParams = [...queryParams];
|
|
383
|
+
const enhancedCookieParams = [...cookieParams];
|
|
385
384
|
let otherHeaders = [];
|
|
386
385
|
let selectedAuth = [];
|
|
387
386
|
if (auth.selected !== undefined) {
|
|
@@ -434,23 +433,41 @@ function buildPostmanRequest(
|
|
|
434
433
|
});
|
|
435
434
|
continue;
|
|
436
435
|
}
|
|
437
|
-
// API Key
|
|
436
|
+
// API Key in header
|
|
438
437
|
if (a.type === "apiKey" && a.in === "header") {
|
|
439
438
|
const { apiKey } = auth.data[a.key];
|
|
440
|
-
if (apiKey === undefined) {
|
|
441
|
-
otherHeaders.push({
|
|
442
|
-
key: a.name,
|
|
443
|
-
value: `<${a.name ?? a.type}>`,
|
|
444
|
-
});
|
|
445
|
-
continue;
|
|
446
|
-
}
|
|
447
439
|
otherHeaders.push({
|
|
448
440
|
key: a.name,
|
|
449
|
-
value: apiKey
|
|
441
|
+
value: apiKey || `<${a.name ?? a.type}>`,
|
|
442
|
+
});
|
|
443
|
+
continue;
|
|
444
|
+
}
|
|
445
|
+
// API Key in query
|
|
446
|
+
if (a.type === "apiKey" && a.in === "query") {
|
|
447
|
+
const { apiKey } = auth.data[a.key];
|
|
448
|
+
enhancedQueryParams.push({
|
|
449
|
+
name: a.name,
|
|
450
|
+
in: "query",
|
|
451
|
+
value: apiKey || `<${a.name ?? a.type}>`,
|
|
452
|
+
});
|
|
453
|
+
continue;
|
|
454
|
+
}
|
|
455
|
+
// API Key in cookie
|
|
456
|
+
if (a.type === "apiKey" && a.in === "cookie") {
|
|
457
|
+
const { apiKey } = auth.data[a.key];
|
|
458
|
+
enhancedCookieParams.push({
|
|
459
|
+
name: a.name,
|
|
460
|
+
in: "cookie",
|
|
461
|
+
value: apiKey || `<${a.name ?? a.type}>`,
|
|
450
462
|
});
|
|
451
463
|
continue;
|
|
452
464
|
}
|
|
453
465
|
}
|
|
466
|
+
// Use the enhanced params that might include API keys
|
|
467
|
+
setQueryParams(clonedPostman, enhancedQueryParams);
|
|
468
|
+
setPathParams(clonedPostman, pathParams);
|
|
469
|
+
// Use enhanced cookie params that might include API keys
|
|
470
|
+
const cookie = buildCookie(enhancedCookieParams);
|
|
454
471
|
setHeaders(
|
|
455
472
|
clonedPostman,
|
|
456
473
|
contentType,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docusaurus-theme-openapi-docs",
|
|
3
3
|
"description": "OpenAPI theme for Docusaurus.",
|
|
4
|
-
"version": "0.0.0-
|
|
4
|
+
"version": "0.0.0-1005",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"openapi",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@types/lodash": "^4.14.176",
|
|
37
37
|
"@types/pako": "^2.0.3",
|
|
38
38
|
"concurrently": "^5.2.0",
|
|
39
|
-
"docusaurus-plugin-openapi-docs": "0.0.0-
|
|
39
|
+
"docusaurus-plugin-openapi-docs": "0.0.0-1005",
|
|
40
40
|
"docusaurus-plugin-sass": "^0.2.3",
|
|
41
41
|
"eslint-plugin-prettier": "^5.0.1"
|
|
42
42
|
},
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"engines": {
|
|
80
80
|
"node": ">=14"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "4263fa2f5bae006b1d7328a0f16af378786fed47"
|
|
83
83
|
}
|
|
@@ -430,10 +430,9 @@ function buildPostmanRequest(
|
|
|
430
430
|
clonedPostman.url.host = [url];
|
|
431
431
|
}
|
|
432
432
|
|
|
433
|
-
|
|
434
|
-
|
|
433
|
+
const enhancedQueryParams = [...queryParams];
|
|
434
|
+
const enhancedCookieParams = [...cookieParams];
|
|
435
435
|
|
|
436
|
-
const cookie = buildCookie(cookieParams);
|
|
437
436
|
let otherHeaders = [];
|
|
438
437
|
|
|
439
438
|
let selectedAuth: Scheme[] = [];
|
|
@@ -491,24 +490,46 @@ function buildPostmanRequest(
|
|
|
491
490
|
continue;
|
|
492
491
|
}
|
|
493
492
|
|
|
494
|
-
// API Key
|
|
493
|
+
// API Key in header
|
|
495
494
|
if (a.type === "apiKey" && a.in === "header") {
|
|
496
495
|
const { apiKey } = auth.data[a.key];
|
|
497
|
-
if (apiKey === undefined) {
|
|
498
|
-
otherHeaders.push({
|
|
499
|
-
key: a.name,
|
|
500
|
-
value: `<${a.name ?? a.type}>`,
|
|
501
|
-
});
|
|
502
|
-
continue;
|
|
503
|
-
}
|
|
504
496
|
otherHeaders.push({
|
|
505
497
|
key: a.name,
|
|
506
|
-
value: apiKey
|
|
498
|
+
value: apiKey || `<${a.name ?? a.type}>`,
|
|
499
|
+
});
|
|
500
|
+
continue;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
// API Key in query
|
|
504
|
+
if (a.type === "apiKey" && a.in === "query") {
|
|
505
|
+
const { apiKey } = auth.data[a.key];
|
|
506
|
+
enhancedQueryParams.push({
|
|
507
|
+
name: a.name,
|
|
508
|
+
in: "query",
|
|
509
|
+
value: apiKey || `<${a.name ?? a.type}>`,
|
|
510
|
+
});
|
|
511
|
+
continue;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
// API Key in cookie
|
|
515
|
+
if (a.type === "apiKey" && a.in === "cookie") {
|
|
516
|
+
const { apiKey } = auth.data[a.key];
|
|
517
|
+
enhancedCookieParams.push({
|
|
518
|
+
name: a.name,
|
|
519
|
+
in: "cookie",
|
|
520
|
+
value: apiKey || `<${a.name ?? a.type}>`,
|
|
507
521
|
});
|
|
508
522
|
continue;
|
|
509
523
|
}
|
|
510
524
|
}
|
|
511
525
|
|
|
526
|
+
// Use the enhanced params that might include API keys
|
|
527
|
+
setQueryParams(clonedPostman, enhancedQueryParams);
|
|
528
|
+
setPathParams(clonedPostman, pathParams);
|
|
529
|
+
|
|
530
|
+
// Use enhanced cookie params that might include API keys
|
|
531
|
+
const cookie = buildCookie(enhancedCookieParams);
|
|
532
|
+
|
|
512
533
|
setHeaders(
|
|
513
534
|
clonedPostman,
|
|
514
535
|
contentType,
|