docusaurus-theme-openapi-docs 0.0.0-1102 → 0.0.0-1104
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,6 +5,62 @@
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
* ========================================================================== */
|
|
8
|
+
var __createBinding =
|
|
9
|
+
(this && this.__createBinding) ||
|
|
10
|
+
(Object.create
|
|
11
|
+
? function (o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
14
|
+
if (
|
|
15
|
+
!desc ||
|
|
16
|
+
("get" in desc ? !m.__esModule : desc.writable || desc.configurable)
|
|
17
|
+
) {
|
|
18
|
+
desc = {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return m[k];
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
Object.defineProperty(o, k2, desc);
|
|
26
|
+
}
|
|
27
|
+
: function (o, m, k, k2) {
|
|
28
|
+
if (k2 === undefined) k2 = k;
|
|
29
|
+
o[k2] = m[k];
|
|
30
|
+
});
|
|
31
|
+
var __setModuleDefault =
|
|
32
|
+
(this && this.__setModuleDefault) ||
|
|
33
|
+
(Object.create
|
|
34
|
+
? function (o, v) {
|
|
35
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
36
|
+
}
|
|
37
|
+
: function (o, v) {
|
|
38
|
+
o["default"] = v;
|
|
39
|
+
});
|
|
40
|
+
var __importStar =
|
|
41
|
+
(this && this.__importStar) ||
|
|
42
|
+
(function () {
|
|
43
|
+
var ownKeys = function (o) {
|
|
44
|
+
ownKeys =
|
|
45
|
+
Object.getOwnPropertyNames ||
|
|
46
|
+
function (o) {
|
|
47
|
+
var ar = [];
|
|
48
|
+
for (var k in o)
|
|
49
|
+
if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
50
|
+
return ar;
|
|
51
|
+
};
|
|
52
|
+
return ownKeys(o);
|
|
53
|
+
};
|
|
54
|
+
return function (mod) {
|
|
55
|
+
if (mod && mod.__esModule) return mod;
|
|
56
|
+
var result = {};
|
|
57
|
+
if (mod != null)
|
|
58
|
+
for (var k = ownKeys(mod), i = 0; i < k.length; i++)
|
|
59
|
+
if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
60
|
+
__setModuleDefault(result, mod);
|
|
61
|
+
return result;
|
|
62
|
+
};
|
|
63
|
+
})();
|
|
8
64
|
var __importDefault =
|
|
9
65
|
(this && this.__importDefault) ||
|
|
10
66
|
function (mod) {
|
|
@@ -14,7 +70,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
14
70
|
const react_1 = __importDefault(require("react"));
|
|
15
71
|
const client_1 = require("@docusaurus/plugin-content-docs/client");
|
|
16
72
|
const theme_common_1 = require("@docusaurus/theme-common");
|
|
17
|
-
const Translate_1 = require("@docusaurus/Translate");
|
|
73
|
+
const Translate_1 = __importStar(require("@docusaurus/Translate"));
|
|
18
74
|
const useDocusaurusContext_1 = __importDefault(
|
|
19
75
|
require("@docusaurus/useDocusaurusContext")
|
|
20
76
|
);
|
|
@@ -157,11 +213,27 @@ function Response({ item }) {
|
|
|
157
213
|
className:
|
|
158
214
|
"openapi-explorer__response-placeholder-message",
|
|
159
215
|
},
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
216
|
+
react_1.default.createElement(
|
|
217
|
+
Translate_1.default,
|
|
218
|
+
{
|
|
219
|
+
id: translationIds_1.OPENAPI_RESPONSE.PLACEHOLDER,
|
|
220
|
+
values: {
|
|
221
|
+
code: react_1.default.createElement(
|
|
222
|
+
"code",
|
|
223
|
+
null,
|
|
224
|
+
react_1.default.createElement(
|
|
225
|
+
Translate_1.default,
|
|
226
|
+
{
|
|
227
|
+
id: translationIds_1.OPENAPI_REQUEST
|
|
228
|
+
.SEND_BUTTON,
|
|
229
|
+
},
|
|
230
|
+
"Send API Request"
|
|
231
|
+
)
|
|
232
|
+
),
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
"Click the {code} button above and see the response here!"
|
|
236
|
+
)
|
|
165
237
|
)
|
|
166
238
|
)
|
|
167
239
|
),
|
|
@@ -201,11 +273,24 @@ function Response({ item }) {
|
|
|
201
273
|
: react_1.default.createElement(
|
|
202
274
|
"p",
|
|
203
275
|
{ className: "openapi-explorer__response-placeholder-message" },
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
276
|
+
react_1.default.createElement(
|
|
277
|
+
Translate_1.default,
|
|
278
|
+
{
|
|
279
|
+
id: translationIds_1.OPENAPI_RESPONSE.PLACEHOLDER,
|
|
280
|
+
values: {
|
|
281
|
+
code: react_1.default.createElement(
|
|
282
|
+
"code",
|
|
283
|
+
null,
|
|
284
|
+
react_1.default.createElement(
|
|
285
|
+
Translate_1.default,
|
|
286
|
+
{ id: translationIds_1.OPENAPI_REQUEST.SEND_BUTTON },
|
|
287
|
+
"Send API Request"
|
|
288
|
+
)
|
|
289
|
+
),
|
|
290
|
+
},
|
|
291
|
+
},
|
|
292
|
+
"Click the {code} button above and see the response here!"
|
|
293
|
+
)
|
|
209
294
|
)
|
|
210
295
|
)
|
|
211
296
|
);
|
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-1104",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"openapi",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@types/postman-collection": "^3.5.11",
|
|
39
39
|
"@types/react-modal": "^3.16.3",
|
|
40
40
|
"concurrently": "^9.2.0",
|
|
41
|
-
"docusaurus-plugin-openapi-docs": "0.0.0-
|
|
41
|
+
"docusaurus-plugin-openapi-docs": "0.0.0-1104",
|
|
42
42
|
"docusaurus-plugin-sass": "^0.2.6",
|
|
43
43
|
"eslint-plugin-prettier": "^5.5.1"
|
|
44
44
|
},
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"engines": {
|
|
82
82
|
"node": ">=14"
|
|
83
83
|
},
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "3d15c677e5510b6b7a94d0f32004ca1dac6e8aa7"
|
|
85
85
|
}
|
|
@@ -9,13 +9,13 @@ import React from "react";
|
|
|
9
9
|
|
|
10
10
|
import { useDoc } from "@docusaurus/plugin-content-docs/client";
|
|
11
11
|
import { usePrismTheme } from "@docusaurus/theme-common";
|
|
12
|
-
import { translate } from "@docusaurus/Translate";
|
|
12
|
+
import Translate, { translate } from "@docusaurus/Translate";
|
|
13
13
|
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
|
|
14
14
|
import ApiCodeBlock from "@theme/ApiExplorer/ApiCodeBlock";
|
|
15
15
|
import { useTypedDispatch, useTypedSelector } from "@theme/ApiItem/hooks";
|
|
16
16
|
import SchemaTabs from "@theme/SchemaTabs";
|
|
17
17
|
import TabItem from "@theme/TabItem";
|
|
18
|
-
import { OPENAPI_RESPONSE } from "@theme/translationIds";
|
|
18
|
+
import { OPENAPI_REQUEST, OPENAPI_RESPONSE } from "@theme/translationIds";
|
|
19
19
|
import clsx from "clsx";
|
|
20
20
|
import type { ApiItem } from "docusaurus-plugin-openapi-docs/src/types";
|
|
21
21
|
import type { ThemeConfig } from "docusaurus-theme-openapi-docs/src/types";
|
|
@@ -126,11 +126,22 @@ function Response({ item }: { item: ApiItem }) {
|
|
|
126
126
|
>
|
|
127
127
|
{prettyResponse || (
|
|
128
128
|
<p className="openapi-explorer__response-placeholder-message">
|
|
129
|
-
|
|
130
|
-
id
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
129
|
+
<Translate
|
|
130
|
+
id={OPENAPI_RESPONSE.PLACEHOLDER}
|
|
131
|
+
values={{
|
|
132
|
+
code: (
|
|
133
|
+
<code>
|
|
134
|
+
<Translate id={OPENAPI_REQUEST.SEND_BUTTON}>
|
|
135
|
+
Send API Request
|
|
136
|
+
</Translate>
|
|
137
|
+
</code>
|
|
138
|
+
),
|
|
139
|
+
}}
|
|
140
|
+
>
|
|
141
|
+
{
|
|
142
|
+
"Click the {code} button above and see the response here!"
|
|
143
|
+
}
|
|
144
|
+
</Translate>
|
|
134
145
|
</p>
|
|
135
146
|
)}
|
|
136
147
|
</ApiCodeBlock>
|
|
@@ -163,11 +174,20 @@ function Response({ item }: { item: ApiItem }) {
|
|
|
163
174
|
</div>
|
|
164
175
|
) : (
|
|
165
176
|
<p className="openapi-explorer__response-placeholder-message">
|
|
166
|
-
|
|
167
|
-
id
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
177
|
+
<Translate
|
|
178
|
+
id={OPENAPI_RESPONSE.PLACEHOLDER}
|
|
179
|
+
values={{
|
|
180
|
+
code: (
|
|
181
|
+
<code>
|
|
182
|
+
<Translate id={OPENAPI_REQUEST.SEND_BUTTON}>
|
|
183
|
+
Send API Request
|
|
184
|
+
</Translate>
|
|
185
|
+
</code>
|
|
186
|
+
),
|
|
187
|
+
}}
|
|
188
|
+
>
|
|
189
|
+
{"Click the {code} button above and see the response here!"}
|
|
190
|
+
</Translate>
|
|
171
191
|
</p>
|
|
172
192
|
)}
|
|
173
193
|
</div>
|