docusaurus-theme-openapi-docs 0.0.0-527 → 0.0.0-529
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.
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var
|
|
8
|
+
var _internal = require("@docusaurus/theme-common/internal");
|
|
9
9
|
var _postmanCollection = _interopRequireDefault(require("@paloaltonetworks/postman-collection"));
|
|
10
10
|
var _Accept = _interopRequireDefault(require("@theme/ApiDemoPanel/Accept"));
|
|
11
11
|
var _Authorization = _interopRequireDefault(require("@theme/ApiDemoPanel/Authorization"));
|
|
@@ -28,12 +28,11 @@ function Request({
|
|
|
28
28
|
}) {
|
|
29
29
|
var _item$parameters;
|
|
30
30
|
const response = (0, _hooks.useTypedSelector)(state => state.response.value);
|
|
31
|
-
const {
|
|
32
|
-
siteConfig
|
|
33
|
-
} = (0, _useDocusaurusContext.default)();
|
|
34
|
-
const themeConfig = siteConfig.themeConfig;
|
|
35
|
-
const options = themeConfig.api;
|
|
36
31
|
const postman = new _postmanCollection.default.Request(item.postman);
|
|
32
|
+
const metadata = (0, _internal.useDoc)();
|
|
33
|
+
const {
|
|
34
|
+
proxy
|
|
35
|
+
} = metadata.frontMatter;
|
|
37
36
|
const params = {
|
|
38
37
|
path: [],
|
|
39
38
|
query: [],
|
|
@@ -50,7 +49,7 @@ function Request({
|
|
|
50
49
|
<summary>
|
|
51
50
|
<div className={`details__request-summary`}>
|
|
52
51
|
<h4>Request</h4>
|
|
53
|
-
{item.servers && <_Execute.default postman={postman} proxy={
|
|
52
|
+
{item.servers && <_Execute.default postman={postman} proxy={proxy} />}
|
|
54
53
|
</div>
|
|
55
54
|
</summary>
|
|
56
55
|
<div className={_stylesModule.default.optionsPanel}>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* ========================================================================== */
|
|
7
7
|
|
|
8
8
|
import React from "react";
|
|
9
|
-
import
|
|
9
|
+
import { useDoc } from "@docusaurus/theme-common/internal";
|
|
10
10
|
import sdk from "@paloaltonetworks/postman-collection";
|
|
11
11
|
import Accept from "@theme/ApiDemoPanel/Accept";
|
|
12
12
|
import Authorization from "@theme/ApiDemoPanel/Authorization";
|
|
@@ -18,10 +18,9 @@ import { useTypedSelector } from "@theme/ApiItem/hooks";
|
|
|
18
18
|
import styles from "./styles.module.css";
|
|
19
19
|
function Request({ item }) {
|
|
20
20
|
const response = useTypedSelector((state) => state.response.value);
|
|
21
|
-
const { siteConfig } = useDocusaurusContext();
|
|
22
|
-
const themeConfig = siteConfig.themeConfig;
|
|
23
|
-
const options = themeConfig.api;
|
|
24
21
|
const postman = new sdk.Request(item.postman);
|
|
22
|
+
const metadata = useDoc();
|
|
23
|
+
const { proxy } = metadata.frontMatter;
|
|
25
24
|
const params = {
|
|
26
25
|
path: [],
|
|
27
26
|
query: [],
|
|
@@ -39,9 +38,7 @@ function Request({ item }) {
|
|
|
39
38
|
<summary>
|
|
40
39
|
<div className={`details__request-summary`}>
|
|
41
40
|
<h4>Request</h4>
|
|
42
|
-
{item.servers &&
|
|
43
|
-
<Execute postman={postman} proxy={options?.proxy} />
|
|
44
|
-
)}
|
|
41
|
+
{item.servers && <Execute postman={postman} proxy={proxy} />}
|
|
45
42
|
</div>
|
|
46
43
|
</summary>
|
|
47
44
|
<div className={styles.optionsPanel}>
|
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-529",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"openapi",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"buffer": "^6.0.3",
|
|
52
52
|
"clsx": "^1.1.1",
|
|
53
53
|
"crypto-js": "^4.1.1",
|
|
54
|
-
"docusaurus-plugin-openapi-docs": "0.0.0-
|
|
54
|
+
"docusaurus-plugin-openapi-docs": "0.0.0-529",
|
|
55
55
|
"file-saver": "^2.0.5",
|
|
56
56
|
"immer": "^9.0.7",
|
|
57
57
|
"lodash": "^4.17.20",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"engines": {
|
|
74
74
|
"node": ">=14"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "f5fc59449765c07686f86df742256acdd2eccb44"
|
|
77
77
|
}
|
|
@@ -7,8 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import React from "react";
|
|
9
9
|
|
|
10
|
-
import {
|
|
11
|
-
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
|
|
10
|
+
import { useDoc } from "@docusaurus/theme-common/internal";
|
|
12
11
|
import sdk from "@paloaltonetworks/postman-collection";
|
|
13
12
|
import Accept from "@theme/ApiDemoPanel/Accept";
|
|
14
13
|
import Authorization from "@theme/ApiDemoPanel/Authorization";
|
|
@@ -24,10 +23,9 @@ import styles from "./styles.module.css";
|
|
|
24
23
|
|
|
25
24
|
function Request({ item }: { item: NonNullable<ApiItem> }) {
|
|
26
25
|
const response = useTypedSelector((state: any) => state.response.value);
|
|
27
|
-
const { siteConfig } = useDocusaurusContext();
|
|
28
|
-
const themeConfig = siteConfig.themeConfig as ThemeConfig;
|
|
29
|
-
const options = themeConfig.api as ApiItem;
|
|
30
26
|
const postman = new sdk.Request(item.postman);
|
|
27
|
+
const metadata = useDoc();
|
|
28
|
+
const { proxy } = metadata.frontMatter;
|
|
31
29
|
|
|
32
30
|
const params = {
|
|
33
31
|
path: [] as ParameterObject[],
|
|
@@ -50,9 +48,7 @@ function Request({ item }: { item: NonNullable<ApiItem> }) {
|
|
|
50
48
|
<summary>
|
|
51
49
|
<div className={`details__request-summary`}>
|
|
52
50
|
<h4>Request</h4>
|
|
53
|
-
{item.servers &&
|
|
54
|
-
<Execute postman={postman} proxy={options?.proxy} />
|
|
55
|
-
)}
|
|
51
|
+
{item.servers && <Execute postman={postman} proxy={proxy} />}
|
|
56
52
|
</div>
|
|
57
53
|
</summary>
|
|
58
54
|
<div className={styles.optionsPanel}>
|