docusaurus-theme-openapi-docs 0.0.0-559 → 0.0.0-569
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.
|
@@ -18,7 +18,10 @@ import {
|
|
|
18
18
|
getSchemaName,
|
|
19
19
|
} from "docusaurus-theme-openapi-docs/lib/markdown/schema";
|
|
20
20
|
/* eslint-disable import/no-extraneous-dependencies*/
|
|
21
|
-
import {
|
|
21
|
+
import {
|
|
22
|
+
guard,
|
|
23
|
+
toString,
|
|
24
|
+
} from "docusaurus-theme-openapi-docs/lib/markdown/utils";
|
|
22
25
|
import ReactMarkdown from "react-markdown";
|
|
23
26
|
import rehypeRaw from "rehype-raw";
|
|
24
27
|
|
|
@@ -27,6 +30,10 @@ import styles from "./styles.module.css";
|
|
|
27
30
|
function ParamsItem({
|
|
28
31
|
param: { description, example, examples, name, required, schema },
|
|
29
32
|
}) {
|
|
33
|
+
if (!schema || !schema?.type) {
|
|
34
|
+
schema = { type: "any" };
|
|
35
|
+
}
|
|
36
|
+
|
|
30
37
|
const renderSchemaName = guard(schema, (schema) => (
|
|
31
38
|
<span className={styles.schemaName}> {getSchemaName(schema)}</span>
|
|
32
39
|
));
|
|
@@ -78,11 +85,11 @@ function ParamsItem({
|
|
|
78
85
|
)
|
|
79
86
|
);
|
|
80
87
|
|
|
81
|
-
const renderExample = guard(example, (example) => (
|
|
82
|
-
|
|
88
|
+
const renderExample = guard(toString(example), (example) => (
|
|
89
|
+
<div>
|
|
83
90
|
<strong>Example: </strong>
|
|
84
91
|
{example}
|
|
85
|
-
|
|
92
|
+
</div>
|
|
86
93
|
));
|
|
87
94
|
|
|
88
95
|
const renderExamples = guard(examples, (examples) => {
|
|
@@ -18,7 +18,10 @@ import {
|
|
|
18
18
|
getSchemaName,
|
|
19
19
|
} from "docusaurus-theme-openapi-docs/lib/markdown/schema";
|
|
20
20
|
/* eslint-disable import/no-extraneous-dependencies*/
|
|
21
|
-
import {
|
|
21
|
+
import {
|
|
22
|
+
guard,
|
|
23
|
+
toString,
|
|
24
|
+
} from "docusaurus-theme-openapi-docs/lib/markdown/utils";
|
|
22
25
|
import ReactMarkdown from "react-markdown";
|
|
23
26
|
import rehypeRaw from "rehype-raw";
|
|
24
27
|
|
|
@@ -27,6 +30,10 @@ import styles from "./styles.module.css";
|
|
|
27
30
|
function ParamsItem({
|
|
28
31
|
param: { description, example, examples, name, required, schema },
|
|
29
32
|
}) {
|
|
33
|
+
if (!schema || !schema?.type) {
|
|
34
|
+
schema = { type: "any" };
|
|
35
|
+
}
|
|
36
|
+
|
|
30
37
|
const renderSchemaName = guard(schema, (schema) => (
|
|
31
38
|
<span className={styles.schemaName}> {getSchemaName(schema)}</span>
|
|
32
39
|
));
|
|
@@ -78,11 +85,11 @@ function ParamsItem({
|
|
|
78
85
|
)
|
|
79
86
|
);
|
|
80
87
|
|
|
81
|
-
const renderExample = guard(example, (example) => (
|
|
82
|
-
|
|
88
|
+
const renderExample = guard(toString(example), (example) => (
|
|
89
|
+
<div>
|
|
83
90
|
<strong>Example: </strong>
|
|
84
91
|
{example}
|
|
85
|
-
|
|
92
|
+
</div>
|
|
86
93
|
));
|
|
87
94
|
|
|
88
95
|
const renderExamples = guard(examples, (examples) => {
|
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-569",
|
|
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-569",
|
|
55
55
|
"file-saver": "^2.0.5",
|
|
56
56
|
"immer": "^9.0.7",
|
|
57
57
|
"lodash": "^4.17.20",
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"engines": {
|
|
75
75
|
"node": ">=14"
|
|
76
76
|
},
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "4b50df749f384af595fab65cf8fa687ad612d84e"
|
|
78
78
|
}
|
|
@@ -18,7 +18,10 @@ import {
|
|
|
18
18
|
getSchemaName,
|
|
19
19
|
} from "docusaurus-theme-openapi-docs/lib/markdown/schema";
|
|
20
20
|
/* eslint-disable import/no-extraneous-dependencies*/
|
|
21
|
-
import {
|
|
21
|
+
import {
|
|
22
|
+
guard,
|
|
23
|
+
toString,
|
|
24
|
+
} from "docusaurus-theme-openapi-docs/lib/markdown/utils";
|
|
22
25
|
import ReactMarkdown from "react-markdown";
|
|
23
26
|
import rehypeRaw from "rehype-raw";
|
|
24
27
|
|
|
@@ -27,6 +30,10 @@ import styles from "./styles.module.css";
|
|
|
27
30
|
function ParamsItem({
|
|
28
31
|
param: { description, example, examples, name, required, schema },
|
|
29
32
|
}) {
|
|
33
|
+
if (!schema || !schema?.type) {
|
|
34
|
+
schema = { type: "any" };
|
|
35
|
+
}
|
|
36
|
+
|
|
30
37
|
const renderSchemaName = guard(schema, (schema) => (
|
|
31
38
|
<span className={styles.schemaName}> {getSchemaName(schema)}</span>
|
|
32
39
|
));
|
|
@@ -78,11 +85,11 @@ function ParamsItem({
|
|
|
78
85
|
)
|
|
79
86
|
);
|
|
80
87
|
|
|
81
|
-
const renderExample = guard(example, (example) => (
|
|
82
|
-
|
|
88
|
+
const renderExample = guard(toString(example), (example) => (
|
|
89
|
+
<div>
|
|
83
90
|
<strong>Example: </strong>
|
|
84
91
|
{example}
|
|
85
|
-
|
|
92
|
+
</div>
|
|
86
93
|
));
|
|
87
94
|
|
|
88
95
|
const renderExamples = guard(examples, (examples) => {
|