docusaurus-theme-openapi-docs 1.4.4 → 1.4.6
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/lib/theme/ApiDemoPanel/Accept/index.js +3 -3
- package/lib/theme/ApiDemoPanel/Authorization/index.js +9 -9
- package/lib/theme/ApiDemoPanel/Authorization/slice.js +1 -1
- package/lib/theme/ApiDemoPanel/Body/index.js +9 -13
- package/lib/theme/ApiDemoPanel/CodeTabs/index.js +1 -1
- package/lib/theme/ApiDemoPanel/ContentType/index.js +3 -3
- package/lib/theme/ApiDemoPanel/Curl/index.js +3 -3
- package/lib/theme/ApiDemoPanel/Execute/index.js +3 -3
- package/lib/theme/ApiDemoPanel/FormFileUpload/index.js +1 -1
- package/lib/theme/ApiDemoPanel/LiveEditor/index.js +1 -1
- package/lib/theme/ApiDemoPanel/ParamOptions/index.js +6 -6
- package/lib/theme/ApiDemoPanel/Request/index.js +7 -7
- package/lib/theme/ApiDemoPanel/Response/index.js +1 -1
- package/lib/theme/ApiDemoPanel/SecuritySchemes/index.js +1 -1
- package/lib/theme/ApiDemoPanel/Server/index.js +5 -5
- package/lib/theme/ApiDemoPanel/index.js +5 -5
- package/lib/theme/ApiDemoPanel/persistanceMiddleware.js +1 -1
- package/lib/theme/ApiItem/index.js +3 -3
- package/lib/theme/ApiItem/store.js +7 -7
- package/lib/theme/DiscriminatorTabs/styles.module.css +9 -5
- package/lib/theme/MimeTabs/index.js +4 -6
- package/lib/theme/ParamsItem/index.js +9 -3
- package/lib/theme/SchemaItem/index.js +4 -2
- package/lib/theme/styles.css +1 -0
- package/lib/theme-openapi.d.ts +186 -0
- package/lib-next/theme/ApiDemoPanel/Accept/index.js +3 -3
- package/lib-next/theme/ApiDemoPanel/Authorization/index.js +9 -9
- package/lib-next/theme/ApiDemoPanel/Authorization/slice.js +1 -1
- package/lib-next/theme/ApiDemoPanel/Body/index.js +9 -11
- package/lib-next/theme/ApiDemoPanel/CodeTabs/index.js +1 -1
- package/lib-next/theme/ApiDemoPanel/ContentType/index.js +3 -3
- package/lib-next/theme/ApiDemoPanel/Curl/index.js +3 -3
- package/lib-next/theme/ApiDemoPanel/Execute/index.js +3 -3
- package/lib-next/theme/ApiDemoPanel/FormFileUpload/index.js +1 -1
- package/lib-next/theme/ApiDemoPanel/LiveEditor/index.js +1 -1
- package/lib-next/theme/ApiDemoPanel/ParamOptions/index.js +9 -6
- package/lib-next/theme/ApiDemoPanel/Request/index.js +7 -7
- package/lib-next/theme/ApiDemoPanel/Response/index.js +1 -1
- package/lib-next/theme/ApiDemoPanel/SecuritySchemes/index.js +1 -1
- package/lib-next/theme/ApiDemoPanel/Server/index.js +5 -5
- package/lib-next/theme/ApiDemoPanel/index.js +5 -5
- package/lib-next/theme/ApiDemoPanel/persistanceMiddleware.js +4 -1
- package/lib-next/theme/ApiItem/index.js +3 -3
- package/lib-next/theme/ApiItem/store.js +7 -7
- package/lib-next/theme/DiscriminatorTabs/styles.module.css +9 -5
- package/lib-next/theme/MimeTabs/index.js +4 -6
- package/lib-next/theme/ParamsItem/index.js +9 -3
- package/lib-next/theme/SchemaItem/index.js +4 -2
- package/lib-next/theme/styles.css +1 -0
- package/lib-next/theme-openapi.d.ts +186 -0
- package/package.json +3 -3
- package/src/theme/ApiDemoPanel/Accept/index.tsx +7 -6
- package/src/theme/ApiDemoPanel/Authorization/index.tsx +20 -19
- package/src/theme/ApiDemoPanel/Authorization/slice.ts +3 -2
- package/src/theme/ApiDemoPanel/Body/index.tsx +16 -18
- package/src/theme/ApiDemoPanel/CodeTabs/index.tsx +3 -2
- package/src/theme/ApiDemoPanel/ContentType/index.tsx +9 -6
- package/src/theme/ApiDemoPanel/Curl/index.tsx +14 -14
- package/src/theme/ApiDemoPanel/Execute/index.tsx +15 -15
- package/src/theme/ApiDemoPanel/Execute/makeRequest.ts +1 -2
- package/src/theme/ApiDemoPanel/FloatingButton/index.tsx +1 -1
- package/src/theme/ApiDemoPanel/FormFileUpload/index.tsx +2 -2
- package/src/theme/ApiDemoPanel/FormItem/index.tsx +1 -1
- package/src/theme/ApiDemoPanel/FormMultiSelect/index.tsx +1 -1
- package/src/theme/ApiDemoPanel/FormSelect/index.tsx +1 -1
- package/src/theme/ApiDemoPanel/FormTextInput/index.tsx +1 -1
- package/src/theme/ApiDemoPanel/LiveEditor/index.tsx +1 -1
- package/src/theme/ApiDemoPanel/MethodEndpoint/index.tsx +1 -1
- package/src/theme/ApiDemoPanel/ParamOptions/index.tsx +26 -16
- package/src/theme/ApiDemoPanel/Request/index.tsx +10 -10
- package/src/theme/ApiDemoPanel/Response/index.tsx +2 -2
- package/src/theme/ApiDemoPanel/SecuritySchemes/index.tsx +4 -5
- package/src/theme/ApiDemoPanel/Server/index.tsx +14 -13
- package/src/theme/ApiDemoPanel/buildPostmanRequest.ts +2 -3
- package/src/theme/ApiDemoPanel/index.tsx +5 -6
- package/src/theme/ApiDemoPanel/persistanceMiddleware.ts +8 -4
- package/src/theme/ApiItem/index.tsx +8 -5
- package/src/theme/ApiItem/store.ts +7 -8
- package/src/theme/DiscriminatorTabs/styles.module.css +9 -5
- package/src/theme/MimeTabs/index.js +4 -6
- package/src/theme/ParamsItem/index.js +9 -3
- package/src/theme/SchemaItem/index.js +4 -2
- package/src/theme/styles.css +1 -0
- package/src/theme-openapi.d.ts +186 -0
package/lib/theme-openapi.d.ts
CHANGED
|
@@ -46,3 +46,189 @@ declare module "@docusaurus/plugin-content-docs-types" {
|
|
|
46
46
|
declare module "docusaurus-theme-openapi-docs" {
|
|
47
47
|
export type ThemeConfig = Partial<import("./types").ThemeConfig>;
|
|
48
48
|
}
|
|
49
|
+
|
|
50
|
+
declare module "@theme/ApiItem/hooks" {
|
|
51
|
+
export { useTypedDispatch, useTypedSelector };
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
declare module "@theme/ApiItem/Layout" {
|
|
55
|
+
export default function Layout(props: any): JSX.Element;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
declare module "@theme/ApiItem/store" {
|
|
59
|
+
export { AppDispatch, RootState };
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
declare module "@theme/SchemaTabs" {
|
|
63
|
+
export default function SchemaTabs(props: any): JSX.Element;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
declare module "@theme/ApiDemoPanel/Accept" {
|
|
67
|
+
export default function Accept(): JSX.Element;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
declare module "@theme/ApiDemoPanel/Accept/slice" {
|
|
71
|
+
export default accept as Reducer<State, AnyAction>;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
declare module "@theme/ApiDemoPanel/Authorization" {
|
|
75
|
+
export default function Authorization(): JSX.Element;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
declare module "@theme/ApiDemoPanel/Authorization/slice" {
|
|
79
|
+
export { AuthState, Scheme, setAuthData, setSelectedAuth, createAuth };
|
|
80
|
+
export default auth as Reducer<State, AnyAction>;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
declare module "@theme/ApiDemoPanel/Body" {
|
|
84
|
+
import { Props as BodyProps } from "@theme/ApiDemoPanel/Body";
|
|
85
|
+
|
|
86
|
+
export default function Body(props: BodyProps): JSX.Element;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
declare module "@theme/ApiDemoPanel/Body/json2xml" {
|
|
90
|
+
export default function json2xml(any, any?): any;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
declare module "@theme/ApiDemoPanel/Body/slice" {
|
|
94
|
+
import { Body, Content, State } from "@theme/ApiDemoPanel/Body/slice";
|
|
95
|
+
|
|
96
|
+
export { Body, Content, State };
|
|
97
|
+
export function setStringRawBody(any, any?): any;
|
|
98
|
+
export default body as Reducer<State, AnyAction>;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
declare module "@theme/ApiDemoPanel/buildPostmanRequest" {
|
|
102
|
+
export default function buildPostmanRequest(any, any?): any;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
declare module "@theme/ApiDemoPanel/CodeTabs" {
|
|
106
|
+
import { Props as CodeTabsProps } from "@theme/ApiDemoPanel/CodeTabs";
|
|
107
|
+
|
|
108
|
+
export default function CodeTabs(props: CodeTabsProps): JSX.Element;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
declare module "@theme/ApiDemoPanel/ContentType" {
|
|
112
|
+
export default function ContentType(): JSX.Element;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
declare module "@theme/ApiDemoPanel/ContentType/slice" {
|
|
116
|
+
export { setContentType };
|
|
117
|
+
export default contentType as Reducer<State, AnyAction>;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
declare module "@theme/ApiDemoPanel/Curl" {
|
|
121
|
+
import { Props as CurlProps } from "@theme/ApiDemoPanel/Curl";
|
|
122
|
+
|
|
123
|
+
export { languageSet, Language } from "@theme/ApiDemoPanel/Curl";
|
|
124
|
+
export default function Curl(props: CurlProps): JSX.Element;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
declare module "@theme/ApiDemoPanel/FloatingButton" {
|
|
128
|
+
import { Props as FloatingButtonProps } from "@theme/ApiDemoPanel/FloatingButton";
|
|
129
|
+
|
|
130
|
+
export default function FloatingButton(
|
|
131
|
+
props: FloatingButtonProps
|
|
132
|
+
): JSX.Element;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
declare module "@theme/ApiDemoPanel/FormItem" {
|
|
136
|
+
import { Props as FormItemProps } from "@theme/ApiDemoPanel/FormItem";
|
|
137
|
+
|
|
138
|
+
export default function FormItem(props: FormItemProps): JSX.Element;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
declare module "@theme/ApiDemoPanel/FormSelect" {
|
|
142
|
+
import { Props as FormSelectProps } from "@theme/ApiDemoPanel/FormSelect";
|
|
143
|
+
|
|
144
|
+
export default function FormSelect(props: FormSelectProps): JSX.Element;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
declare module "@theme/ApiDemoPanel/FormTextInput" {
|
|
148
|
+
import { Props as FormTextInputProps } from "@theme/ApiDemoPanel/FormTextInput";
|
|
149
|
+
|
|
150
|
+
export default function FormTextInput(props: FormTextInputProps): JSX.Element;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
declare module "@theme/ApiDemoPanel/FormFileUpload" {
|
|
154
|
+
import { Props as FormFileUploadProps } from "@theme/ApiDemoPanel/FormFileUpload";
|
|
155
|
+
|
|
156
|
+
export default function FormFileUpload(
|
|
157
|
+
props: FormFileUploadProps
|
|
158
|
+
): JSX.Element;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
declare module "@theme/ApiDemoPanel/FormMultiSelect" {
|
|
162
|
+
import { Props as FormMultiSelectProps } from "@theme/ApiDemoPanel/FormMultiSelect";
|
|
163
|
+
|
|
164
|
+
export default function FormMultiSelect(
|
|
165
|
+
props: FormMultiSelectProps
|
|
166
|
+
): JSX.Element;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
declare module "@theme/ApiDemoPanel/Execute" {
|
|
170
|
+
import { Props as ExecuteProps } from "@theme/ApiDemoPanel/Execute";
|
|
171
|
+
|
|
172
|
+
export default function Execute(props: ExecuteProps): JSX.Element;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
declare module "@theme/ApiDemoPanel/LiveEditor" {
|
|
176
|
+
export default function LiveEditor(props: any): JSX.Element;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
declare module "@theme/ApiDemoPanel/MethodEndpoint" {
|
|
180
|
+
import { Props as MethodEndpointProps } from "@theme/ApiDemoPanel/MethodEndpoint";
|
|
181
|
+
|
|
182
|
+
export default function MethodEndpoint(
|
|
183
|
+
props: MethodEndpointProps
|
|
184
|
+
): JSX.Element;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
declare module "@theme/ApiDemoPanel/ParamOptions" {
|
|
188
|
+
import { ParamProps } from "@theme/ApiDemoPanel/ParamOptions";
|
|
189
|
+
|
|
190
|
+
export default function ParamOptions(props: ParamProps): JSX.Element;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
declare module "@theme/ApiDemoPanel/ParamOptions/slice" {
|
|
194
|
+
export type { Param };
|
|
195
|
+
export default params as Reducer<State, AnyAction>;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
declare module "@theme/ApiDemoPanel/persistanceMiddleware" {
|
|
199
|
+
export { createPersistanceMiddleware };
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
declare module "@theme/ApiDemoPanel/Request" {
|
|
203
|
+
import { ApiItem } from "docusaurus-plugin-openapi-docs/src/types";
|
|
204
|
+
|
|
205
|
+
export interface RequestProps {
|
|
206
|
+
item: NonNullable<ApiItem>;
|
|
207
|
+
}
|
|
208
|
+
export default function Request(props: RequestProps): JSX.Element;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
declare module "@theme/ApiDemoPanel/Response" {
|
|
212
|
+
export default function Response(): JSX.Element;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
declare module "@theme/ApiDemoPanel/Response/slice" {
|
|
216
|
+
export { setResponse };
|
|
217
|
+
export default response as Reducer<State, AnyAction>;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
declare module "@theme/ApiDemoPanel/SecuritySchemes" {
|
|
221
|
+
export default function SecuritySchemes(props: any): JSX.Element;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
declare module "@theme/ApiDemoPanel/Server" {
|
|
225
|
+
export default function Server(): JSX.Element;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
declare module "@theme/ApiDemoPanel/Server/slice" {
|
|
229
|
+
export default server as Reducer<State, AnyAction>;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
declare module "@theme/ApiDemoPanel/storage-utils" {
|
|
233
|
+
export { createStorage, hashArray };
|
|
234
|
+
}
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* ========================================================================== */
|
|
7
7
|
|
|
8
8
|
import React from "react";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
9
|
+
import FormItem from "@theme/ApiDemoPanel/FormItem";
|
|
10
|
+
import FormSelect from "@theme/ApiDemoPanel/FormSelect";
|
|
11
|
+
import { useTypedDispatch, useTypedSelector } from "@theme/ApiItem/hooks";
|
|
12
12
|
import { setAccept } from "./slice";
|
|
13
13
|
function Accept() {
|
|
14
14
|
const value = useTypedSelector((state) => state.accept.value);
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* ========================================================================== */
|
|
7
7
|
|
|
8
8
|
import React from "react";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
9
|
+
import FormItem from "@theme/ApiDemoPanel/FormItem";
|
|
10
|
+
import FormSelect from "@theme/ApiDemoPanel/FormSelect";
|
|
11
|
+
import FormTextInput from "@theme/ApiDemoPanel/FormTextInput";
|
|
12
|
+
import { useTypedDispatch, useTypedSelector } from "@theme/ApiItem/hooks";
|
|
13
13
|
import { setAuthData, setSelectedAuth } from "./slice";
|
|
14
14
|
function Authorization() {
|
|
15
15
|
const data = useTypedSelector((state) => state.auth.data);
|
|
@@ -42,7 +42,7 @@ function Authorization() {
|
|
|
42
42
|
placeholder="Bearer Token"
|
|
43
43
|
value={data[a.key].token ?? ""}
|
|
44
44
|
onChange={(e) => {
|
|
45
|
-
const value = e.target.value
|
|
45
|
+
const value = e.target.value;
|
|
46
46
|
dispatch(
|
|
47
47
|
setAuthData({
|
|
48
48
|
scheme: a.key,
|
|
@@ -62,7 +62,7 @@ function Authorization() {
|
|
|
62
62
|
placeholder="Bearer Token"
|
|
63
63
|
value={data[a.key].token ?? ""}
|
|
64
64
|
onChange={(e) => {
|
|
65
|
-
const value = e.target.value
|
|
65
|
+
const value = e.target.value;
|
|
66
66
|
dispatch(
|
|
67
67
|
setAuthData({
|
|
68
68
|
scheme: a.key,
|
|
@@ -83,7 +83,7 @@ function Authorization() {
|
|
|
83
83
|
placeholder="Username"
|
|
84
84
|
value={data[a.key].username ?? ""}
|
|
85
85
|
onChange={(e) => {
|
|
86
|
-
const value = e.target.value
|
|
86
|
+
const value = e.target.value;
|
|
87
87
|
dispatch(
|
|
88
88
|
setAuthData({
|
|
89
89
|
scheme: a.key,
|
|
@@ -100,7 +100,7 @@ function Authorization() {
|
|
|
100
100
|
password
|
|
101
101
|
value={data[a.key].password ?? ""}
|
|
102
102
|
onChange={(e) => {
|
|
103
|
-
const value = e.target.value
|
|
103
|
+
const value = e.target.value;
|
|
104
104
|
dispatch(
|
|
105
105
|
setAuthData({
|
|
106
106
|
scheme: a.key,
|
|
@@ -121,7 +121,7 @@ function Authorization() {
|
|
|
121
121
|
placeholder={`${a.key}`}
|
|
122
122
|
value={data[a.key].apiKey ?? ""}
|
|
123
123
|
onChange={(e) => {
|
|
124
|
-
const value = e.target.value
|
|
124
|
+
const value = e.target.value;
|
|
125
125
|
dispatch(
|
|
126
126
|
setAuthData({
|
|
127
127
|
scheme: a.key,
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* ========================================================================== */
|
|
7
7
|
|
|
8
8
|
import { createSlice } from "@reduxjs/toolkit";
|
|
9
|
-
import { createStorage, hashArray } from "
|
|
9
|
+
import { createStorage, hashArray } from "@theme/ApiDemoPanel/storage-utils";
|
|
10
10
|
import { getAuthDataKeys } from "./auth-types";
|
|
11
11
|
|
|
12
12
|
// The global definitions
|
|
@@ -6,19 +6,17 @@
|
|
|
6
6
|
* ========================================================================== */
|
|
7
7
|
|
|
8
8
|
import React from "react";
|
|
9
|
+
import json2xml from "@theme/ApiDemoPanel/Body/json2xml";
|
|
10
|
+
import ContentType from "@theme/ApiDemoPanel/ContentType";
|
|
11
|
+
import FormFileUpload from "@theme/ApiDemoPanel/FormFileUpload";
|
|
12
|
+
import FormItem from "@theme/ApiDemoPanel/FormItem";
|
|
13
|
+
import FormSelect from "@theme/ApiDemoPanel/FormSelect";
|
|
14
|
+
import FormTextInput from "@theme/ApiDemoPanel/FormTextInput";
|
|
15
|
+
import LiveApp from "@theme/ApiDemoPanel/LiveEditor";
|
|
16
|
+
import { useTypedDispatch, useTypedSelector } from "@theme/ApiItem/hooks";
|
|
17
|
+
import SchemaTabs from "@theme/SchemaTabs";
|
|
9
18
|
import TabItem from "@theme/TabItem";
|
|
10
19
|
import format from "xml-formatter";
|
|
11
|
-
import { useTypedDispatch, useTypedSelector } from "../../ApiItem/hooks";
|
|
12
|
-
// @ts-ignore
|
|
13
|
-
import SchemaTabs from "../../SchemaTabs";
|
|
14
|
-
import ContentType from "../ContentType";
|
|
15
|
-
import FormSelect from "../FormSelect";
|
|
16
|
-
import LiveApp from "../LiveEditor";
|
|
17
|
-
import FormFileUpload from "./../FormFileUpload";
|
|
18
|
-
import FormItem from "./../FormItem";
|
|
19
|
-
import FormTextInput from "./../FormTextInput";
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
import json2xml from "./json2xml";
|
|
22
20
|
import {
|
|
23
21
|
clearFormBodyKey,
|
|
24
22
|
clearRawBody,
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
import React, { useState, cloneElement, isValidElement } from "react";
|
|
9
9
|
import { duplicates } from "@docusaurus/theme-common";
|
|
10
10
|
import useIsBrowser from "@docusaurus/useIsBrowser";
|
|
11
|
+
import { languageSet } from "@theme/ApiDemoPanel/Curl";
|
|
11
12
|
import clsx from "clsx";
|
|
12
|
-
import { languageSet } from "../Curl";
|
|
13
13
|
import styles from "./styles.module.css";
|
|
14
14
|
const {
|
|
15
15
|
useScrollPositionBlocker,
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* ========================================================================== */
|
|
7
7
|
|
|
8
8
|
import React from "react";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
9
|
+
import FormItem from "@theme/ApiDemoPanel/FormItem";
|
|
10
|
+
import FormSelect from "@theme/ApiDemoPanel/FormSelect";
|
|
11
|
+
import { useTypedDispatch, useTypedSelector } from "@theme/ApiItem/hooks";
|
|
12
12
|
import { setContentType } from "./slice";
|
|
13
13
|
function ContentType() {
|
|
14
14
|
const value = useTypedSelector((state) => state.contentType.value);
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
import React, { useState, useEffect } from "react";
|
|
9
9
|
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
|
|
10
10
|
import codegen from "@paloaltonetworks/postman-code-generators";
|
|
11
|
+
import buildPostmanRequest from "@theme/ApiDemoPanel/buildPostmanRequest";
|
|
12
|
+
import CodeTabs from "@theme/ApiDemoPanel/CodeTabs";
|
|
13
|
+
import { useTypedSelector } from "@theme/ApiItem/hooks";
|
|
11
14
|
import CodeBlock from "@theme/CodeBlock";
|
|
12
15
|
import clsx from "clsx";
|
|
13
|
-
import { useTypedSelector } from "../../ApiItem/hooks";
|
|
14
|
-
import CodeTabs from "../CodeTabs";
|
|
15
|
-
import buildPostmanRequest from "./../buildPostmanRequest";
|
|
16
16
|
import styles from "./styles.module.css";
|
|
17
17
|
export const languageSet = [
|
|
18
18
|
{
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* ========================================================================== */
|
|
7
7
|
|
|
8
8
|
import React from "react";
|
|
9
|
+
import buildPostmanRequest from "@theme/ApiDemoPanel/buildPostmanRequest";
|
|
10
|
+
import { setResponse } from "@theme/ApiDemoPanel/Response/slice";
|
|
11
|
+
import { useTypedDispatch, useTypedSelector } from "@theme/ApiItem/hooks";
|
|
9
12
|
import Modal from "react-modal";
|
|
10
|
-
import { useTypedDispatch, useTypedSelector } from "../../ApiItem/hooks";
|
|
11
|
-
import { setResponse } from "../Response/slice";
|
|
12
|
-
import buildPostmanRequest from "./../buildPostmanRequest";
|
|
13
13
|
import makeRequest from "./makeRequest";
|
|
14
14
|
function validateRequest(params) {
|
|
15
15
|
for (let paramList of Object.values(params)) {
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* ========================================================================== */
|
|
7
7
|
|
|
8
8
|
import React, { useState } from "react";
|
|
9
|
+
import FloatingButton from "@theme/ApiDemoPanel/FloatingButton";
|
|
9
10
|
import MagicDropzone from "react-magic-dropzone";
|
|
10
|
-
import FloatingButton from "../FloatingButton";
|
|
11
11
|
import styles from "./styles.module.css";
|
|
12
12
|
function RenderPreview({ file }) {
|
|
13
13
|
switch (file.type) {
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
import React, { useEffect, useState } from "react";
|
|
9
9
|
import { usePrismTheme } from "@docusaurus/theme-common";
|
|
10
10
|
import useIsBrowser from "@docusaurus/useIsBrowser";
|
|
11
|
+
import { setStringRawBody } from "@theme/ApiDemoPanel/Body/slice";
|
|
11
12
|
import { LiveProvider, LiveEditor, withLive } from "react-live";
|
|
12
|
-
import { setStringRawBody } from "../Body/slice";
|
|
13
13
|
import styles from "./styles.module.css";
|
|
14
14
|
function Live({ onEdit }) {
|
|
15
15
|
const isBrowser = useIsBrowser();
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
|
|
8
8
|
import React, { useState, useEffect } from "react";
|
|
9
9
|
import { nanoid } from "@reduxjs/toolkit";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
10
|
+
import FormItem from "@theme/ApiDemoPanel/FormItem";
|
|
11
|
+
import FormMultiSelect from "@theme/ApiDemoPanel/FormMultiSelect";
|
|
12
|
+
import FormSelect from "@theme/ApiDemoPanel/FormSelect";
|
|
13
|
+
import FormTextInput from "@theme/ApiDemoPanel/FormTextInput";
|
|
14
|
+
import { useTypedDispatch, useTypedSelector } from "@theme/ApiItem/hooks";
|
|
15
15
|
import { setParam } from "./slice";
|
|
16
16
|
import styles from "./styles.module.css";
|
|
17
17
|
function ParamOption({ param }) {
|
|
@@ -279,7 +279,10 @@ function ParamTextFormItem({ param }) {
|
|
|
279
279
|
dispatch(
|
|
280
280
|
setParam({
|
|
281
281
|
...param,
|
|
282
|
-
value:
|
|
282
|
+
value:
|
|
283
|
+
param.in === "path" || param.in === "query"
|
|
284
|
+
? e.target.value.replace(/\s/g, "%20")
|
|
285
|
+
: e.target.value,
|
|
283
286
|
})
|
|
284
287
|
)
|
|
285
288
|
}
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
import React from "react";
|
|
9
9
|
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
|
|
10
10
|
import sdk from "@paloaltonetworks/postman-collection";
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
11
|
+
import Accept from "@theme/ApiDemoPanel/Accept";
|
|
12
|
+
import Authorization from "@theme/ApiDemoPanel/Authorization";
|
|
13
|
+
import Body from "@theme/ApiDemoPanel/Body";
|
|
14
|
+
import Execute from "@theme/ApiDemoPanel/Execute";
|
|
15
|
+
import ParamOptions from "@theme/ApiDemoPanel/ParamOptions";
|
|
16
|
+
import Server from "@theme/ApiDemoPanel/Server";
|
|
17
|
+
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);
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* ========================================================================== */
|
|
7
7
|
|
|
8
8
|
import React from "react";
|
|
9
|
+
import { useTypedDispatch, useTypedSelector } from "@theme/ApiItem/hooks";
|
|
9
10
|
import CodeBlock from "@theme/CodeBlock";
|
|
10
|
-
import { useTypedDispatch, useTypedSelector } from "../../ApiItem/hooks";
|
|
11
11
|
import { clearResponse } from "./slice";
|
|
12
12
|
|
|
13
13
|
// TODO: We probably shouldn't attempt to format XML...
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import React from "react";
|
|
9
9
|
import Link from "@docusaurus/Link";
|
|
10
|
-
import { useTypedSelector } from "
|
|
10
|
+
import { useTypedSelector } from "@theme/ApiItem/hooks";
|
|
11
11
|
function SecuritySchemes(props) {
|
|
12
12
|
const options = useTypedSelector((state) => state.auth.options);
|
|
13
13
|
const selected = useTypedSelector((state) => state.auth.selected);
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
* ========================================================================== */
|
|
7
7
|
|
|
8
8
|
import React, { useState } from "react";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
9
|
+
import FloatingButton from "@theme/ApiDemoPanel/FloatingButton";
|
|
10
|
+
import FormItem from "@theme/ApiDemoPanel/FormItem";
|
|
11
|
+
import FormSelect from "@theme/ApiDemoPanel/FormSelect";
|
|
12
|
+
import FormTextInput from "@theme/ApiDemoPanel/FormTextInput";
|
|
13
|
+
import { useTypedDispatch, useTypedSelector } from "@theme/ApiItem/hooks";
|
|
14
14
|
import { setServer, setServerVariable } from "./slice";
|
|
15
15
|
import styles from "./styles.module.css";
|
|
16
16
|
function Server() {
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
|
|
8
8
|
import React from "react";
|
|
9
9
|
import sdk from "@paloaltonetworks/postman-collection";
|
|
10
|
-
import Curl from "
|
|
11
|
-
import MethodEndpoint from "
|
|
12
|
-
import Request from "
|
|
13
|
-
import Response from "
|
|
14
|
-
import SecuritySchemes from "
|
|
10
|
+
import Curl from "@theme/ApiDemoPanel/Curl";
|
|
11
|
+
import MethodEndpoint from "@theme/ApiDemoPanel/MethodEndpoint";
|
|
12
|
+
import Request from "@theme/ApiDemoPanel/Request";
|
|
13
|
+
import Response from "@theme/ApiDemoPanel/Response";
|
|
14
|
+
import SecuritySchemes from "@theme/ApiDemoPanel/SecuritySchemes";
|
|
15
15
|
function ApiDemoPanel({ item, infoPath }) {
|
|
16
16
|
const postman = new sdk.Request(item.postman);
|
|
17
17
|
const { path, method } = item;
|
|
@@ -5,7 +5,10 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
* ========================================================================== */
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
setAuthData,
|
|
10
|
+
setSelectedAuth,
|
|
11
|
+
} from "@theme/ApiDemoPanel/Authorization/slice";
|
|
9
12
|
import { createStorage, hashArray } from "./storage-utils";
|
|
10
13
|
export function createPersistanceMiddleware(options) {
|
|
11
14
|
const persistanceMiddleware = (storeAPI) => (next) => (action) => {
|
|
@@ -11,12 +11,12 @@ import ExecutionEnvironment from "@docusaurus/ExecutionEnvironment";
|
|
|
11
11
|
import { HtmlClassNameProvider } from "@docusaurus/theme-common";
|
|
12
12
|
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
|
|
13
13
|
import useIsBrowser from "@docusaurus/useIsBrowser";
|
|
14
|
+
import { createAuth } from "@theme/ApiDemoPanel/Authorization/slice";
|
|
15
|
+
import { createPersistanceMiddleware } from "@theme/ApiDemoPanel/persistanceMiddleware";
|
|
16
|
+
import DocItemLayout from "@theme/ApiItem/Layout";
|
|
14
17
|
import DocItemMetadata from "@theme/DocItem/Metadata";
|
|
15
18
|
import clsx from "clsx";
|
|
16
19
|
import { Provider } from "react-redux";
|
|
17
|
-
import { createAuth } from "../ApiDemoPanel/Authorization/slice";
|
|
18
|
-
import { createPersistanceMiddleware } from "../ApiDemoPanel/persistanceMiddleware";
|
|
19
|
-
import DocItemLayout from "./Layout";
|
|
20
20
|
import { createStoreWithoutState, createStoreWithState } from "./store";
|
|
21
21
|
const { DocProvider } = require("@docusaurus/theme-common/internal");
|
|
22
22
|
let ApiDemoPanel = (_) => <div />;
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
* ========================================================================== */
|
|
7
7
|
|
|
8
8
|
import { configureStore, combineReducers } from "@reduxjs/toolkit";
|
|
9
|
-
import accept from "
|
|
10
|
-
import auth from "
|
|
11
|
-
import body from "
|
|
12
|
-
import contentType from "
|
|
13
|
-
import params from "
|
|
14
|
-
import response from "
|
|
15
|
-
import server from "
|
|
9
|
+
import accept from "@theme/ApiDemoPanel/Accept/slice";
|
|
10
|
+
import auth from "@theme/ApiDemoPanel/Authorization/slice";
|
|
11
|
+
import body from "@theme/ApiDemoPanel/Body/slice";
|
|
12
|
+
import contentType from "@theme/ApiDemoPanel/ContentType/slice";
|
|
13
|
+
import params from "@theme/ApiDemoPanel/ParamOptions/slice";
|
|
14
|
+
import response from "@theme/ApiDemoPanel/Response/slice";
|
|
15
|
+
import server from "@theme/ApiDemoPanel/Server/slice";
|
|
16
16
|
const rootReducer = combineReducers({
|
|
17
17
|
accept,
|
|
18
18
|
contentType,
|
|
@@ -12,14 +12,19 @@
|
|
|
12
12
|
height: 1.8rem;
|
|
13
13
|
margin-top: 0 !important;
|
|
14
14
|
margin-right: 0.5rem;
|
|
15
|
-
border: 1px solid var(--
|
|
15
|
+
border: 1px solid var(--ifm-color-primary);
|
|
16
16
|
border-radius: var(--ifm-global-radius);
|
|
17
|
-
color: var(--
|
|
17
|
+
color: var(--ifm-color-primary);
|
|
18
18
|
font-size: 12px;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
.tabItem:not(.discriminatorTabActive) {
|
|
22
|
+
opacity: 0.65;
|
|
23
|
+
}
|
|
24
|
+
|
|
21
25
|
.tabItem:hover {
|
|
22
|
-
|
|
26
|
+
opacity: 1;
|
|
27
|
+
background-color: var(--ifm-color-emphasis-100);
|
|
23
28
|
}
|
|
24
29
|
|
|
25
30
|
.tabItem:last-child {
|
|
@@ -59,8 +64,7 @@
|
|
|
59
64
|
}
|
|
60
65
|
|
|
61
66
|
.tabItem.discriminatorTabActive {
|
|
62
|
-
|
|
63
|
-
color: var(--ifm-color-primary);
|
|
67
|
+
background-color: var(--ifm-color-emphasis-100);
|
|
64
68
|
}
|
|
65
69
|
|
|
66
70
|
.discriminatorTabLabel {
|
|
@@ -16,20 +16,18 @@ import React, {
|
|
|
16
16
|
|
|
17
17
|
import { duplicates } from "@docusaurus/theme-common";
|
|
18
18
|
import useIsBrowser from "@docusaurus/useIsBrowser";
|
|
19
|
+
import { setAccept } from "@theme/ApiDemoPanel/Accept/slice";
|
|
20
|
+
import { setContentType } from "@theme/ApiDemoPanel/ContentType/slice";
|
|
21
|
+
import { useTypedDispatch, useTypedSelector } from "@theme/ApiItem/hooks";
|
|
19
22
|
import clsx from "clsx";
|
|
20
23
|
|
|
21
|
-
import
|
|
22
|
-
import { setContentType } from "../ApiDemoPanel/ContentType/slice";
|
|
23
|
-
import { useTypedDispatch, useTypedSelector } from "../ApiItem/hooks";
|
|
24
|
-
import styles from "./styles.module.css"; // A very rough duck type, but good enough to guard against mistakes while
|
|
24
|
+
import styles from "./styles.module.css";
|
|
25
25
|
|
|
26
26
|
const {
|
|
27
27
|
useScrollPositionBlocker,
|
|
28
28
|
useTabGroupChoice,
|
|
29
29
|
} = require("@docusaurus/theme-common/internal");
|
|
30
30
|
|
|
31
|
-
// allowing customization
|
|
32
|
-
|
|
33
31
|
function isTabItem(comp) {
|
|
34
32
|
return typeof comp.props.value !== "undefined";
|
|
35
33
|
}
|
|
@@ -8,12 +8,18 @@
|
|
|
8
8
|
import React from "react";
|
|
9
9
|
|
|
10
10
|
import CodeBlock from "@theme/CodeBlock";
|
|
11
|
+
/* eslint-disable import/no-extraneous-dependencies*/
|
|
12
|
+
import { createDescription } from "docusaurus-theme-openapi-docs/src/markdown/createDescription";
|
|
13
|
+
/* eslint-disable import/no-extraneous-dependencies*/
|
|
14
|
+
import {
|
|
15
|
+
getQualifierMessage,
|
|
16
|
+
getSchemaName,
|
|
17
|
+
} from "docusaurus-theme-openapi-docs/src/markdown/schema";
|
|
18
|
+
/* eslint-disable import/no-extraneous-dependencies*/
|
|
19
|
+
import { guard } from "docusaurus-theme-openapi-docs/src/markdown/utils";
|
|
11
20
|
import ReactMarkdown from "react-markdown";
|
|
12
21
|
import rehypeRaw from "rehype-raw";
|
|
13
22
|
|
|
14
|
-
import { createDescription } from "../../markdown/createDescription";
|
|
15
|
-
import { getQualifierMessage, getSchemaName } from "../../markdown/schema";
|
|
16
|
-
import { guard } from "../../markdown/utils";
|
|
17
23
|
import styles from "./styles.module.css";
|
|
18
24
|
|
|
19
25
|
function ParamsItem({
|
|
@@ -8,11 +8,13 @@
|
|
|
8
8
|
import React from "react";
|
|
9
9
|
|
|
10
10
|
import CodeBlock from "@theme/CodeBlock";
|
|
11
|
+
/* eslint-disable import/no-extraneous-dependencies*/
|
|
12
|
+
import { createDescription } from "docusaurus-theme-openapi-docs/src/markdown/createDescription";
|
|
13
|
+
/* eslint-disable import/no-extraneous-dependencies*/
|
|
14
|
+
import { guard } from "docusaurus-theme-openapi-docs/src/markdown/utils";
|
|
11
15
|
import ReactMarkdown from "react-markdown";
|
|
12
16
|
import rehypeRaw from "rehype-raw";
|
|
13
17
|
|
|
14
|
-
import { createDescription } from "../../markdown/createDescription";
|
|
15
|
-
import { guard } from "../../markdown/utils";
|
|
16
18
|
import styles from "./styles.module.css";
|
|
17
19
|
|
|
18
20
|
function SchemaItem({
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
--openapi-card-background-color: var(--ifm-color-gray-100);
|
|
15
15
|
--openapi-card-border-radius: var(--ifm-pre-border-radius);
|
|
16
16
|
--openapi-input-border: var(--ifm-color-primary);
|
|
17
|
+
--openapi-input-background: var(--openapi-card-background-color);
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
[data-theme="dark"] {
|