docusaurus-theme-openapi-docs 1.1.6 → 1.1.7
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/ParamsItem/index.js +16 -1
- package/lib/theme/SchemaItem/index.js +17 -2
- package/lib-next/theme/ParamsItem/index.js +16 -1
- package/lib-next/theme/SchemaItem/index.js +17 -2
- package/package.json +2 -2
- package/src/theme/ParamsItem/index.js +16 -1
- package/src/theme/SchemaItem/index.js +17 -2
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import React from "react";
|
|
9
9
|
|
|
10
|
+
import CodeBlock from "@theme/CodeBlock";
|
|
10
11
|
import ReactMarkdown from "react-markdown";
|
|
11
12
|
|
|
12
13
|
import { createDescription } from "../../markdown/createDescription";
|
|
@@ -33,7 +34,21 @@ function ParamsItem({
|
|
|
33
34
|
|
|
34
35
|
const renderDescription = guard(description, (description) => (
|
|
35
36
|
<div>
|
|
36
|
-
<ReactMarkdown
|
|
37
|
+
<ReactMarkdown
|
|
38
|
+
children={createDescription(description)}
|
|
39
|
+
components={{
|
|
40
|
+
pre: "div",
|
|
41
|
+
code({ node, inline, className, children, ...props }) {
|
|
42
|
+
const match = /language-(\w+)/.exec(className || "");
|
|
43
|
+
if (inline) return <code>{children}</code>;
|
|
44
|
+
return !inline && match ? (
|
|
45
|
+
<CodeBlock className={className}>{children}</CodeBlock>
|
|
46
|
+
) : (
|
|
47
|
+
<CodeBlock>{children}</CodeBlock>
|
|
48
|
+
);
|
|
49
|
+
},
|
|
50
|
+
}}
|
|
51
|
+
/>
|
|
37
52
|
</div>
|
|
38
53
|
));
|
|
39
54
|
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import React from "react";
|
|
9
9
|
|
|
10
|
+
import CodeBlock from "@theme/CodeBlock";
|
|
10
11
|
import ReactMarkdown from "react-markdown";
|
|
11
12
|
|
|
12
13
|
import { createDescription } from "../../markdown/createDescription";
|
|
@@ -29,8 +30,22 @@ function SchemaItem({
|
|
|
29
30
|
);
|
|
30
31
|
|
|
31
32
|
const renderSchemaDescription = guard(schemaDescription, (description) => (
|
|
32
|
-
<div
|
|
33
|
-
<ReactMarkdown
|
|
33
|
+
<div>
|
|
34
|
+
<ReactMarkdown
|
|
35
|
+
children={createDescription(description)}
|
|
36
|
+
components={{
|
|
37
|
+
pre: "div",
|
|
38
|
+
code({ node, inline, className, children, ...props }) {
|
|
39
|
+
const match = /language-(\w+)/.exec(className || "");
|
|
40
|
+
if (inline) return <code>{children}</code>;
|
|
41
|
+
return !inline && match ? (
|
|
42
|
+
<CodeBlock className={className}>{children}</CodeBlock>
|
|
43
|
+
) : (
|
|
44
|
+
<CodeBlock>{children}</CodeBlock>
|
|
45
|
+
);
|
|
46
|
+
},
|
|
47
|
+
}}
|
|
48
|
+
/>
|
|
34
49
|
</div>
|
|
35
50
|
));
|
|
36
51
|
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import React from "react";
|
|
9
9
|
|
|
10
|
+
import CodeBlock from "@theme/CodeBlock";
|
|
10
11
|
import ReactMarkdown from "react-markdown";
|
|
11
12
|
|
|
12
13
|
import { createDescription } from "../../markdown/createDescription";
|
|
@@ -33,7 +34,21 @@ function ParamsItem({
|
|
|
33
34
|
|
|
34
35
|
const renderDescription = guard(description, (description) => (
|
|
35
36
|
<div>
|
|
36
|
-
<ReactMarkdown
|
|
37
|
+
<ReactMarkdown
|
|
38
|
+
children={createDescription(description)}
|
|
39
|
+
components={{
|
|
40
|
+
pre: "div",
|
|
41
|
+
code({ node, inline, className, children, ...props }) {
|
|
42
|
+
const match = /language-(\w+)/.exec(className || "");
|
|
43
|
+
if (inline) return <code>{children}</code>;
|
|
44
|
+
return !inline && match ? (
|
|
45
|
+
<CodeBlock className={className}>{children}</CodeBlock>
|
|
46
|
+
) : (
|
|
47
|
+
<CodeBlock>{children}</CodeBlock>
|
|
48
|
+
);
|
|
49
|
+
},
|
|
50
|
+
}}
|
|
51
|
+
/>
|
|
37
52
|
</div>
|
|
38
53
|
));
|
|
39
54
|
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import React from "react";
|
|
9
9
|
|
|
10
|
+
import CodeBlock from "@theme/CodeBlock";
|
|
10
11
|
import ReactMarkdown from "react-markdown";
|
|
11
12
|
|
|
12
13
|
import { createDescription } from "../../markdown/createDescription";
|
|
@@ -29,8 +30,22 @@ function SchemaItem({
|
|
|
29
30
|
);
|
|
30
31
|
|
|
31
32
|
const renderSchemaDescription = guard(schemaDescription, (description) => (
|
|
32
|
-
<div
|
|
33
|
-
<ReactMarkdown
|
|
33
|
+
<div>
|
|
34
|
+
<ReactMarkdown
|
|
35
|
+
children={createDescription(description)}
|
|
36
|
+
components={{
|
|
37
|
+
pre: "div",
|
|
38
|
+
code({ node, inline, className, children, ...props }) {
|
|
39
|
+
const match = /language-(\w+)/.exec(className || "");
|
|
40
|
+
if (inline) return <code>{children}</code>;
|
|
41
|
+
return !inline && match ? (
|
|
42
|
+
<CodeBlock className={className}>{children}</CodeBlock>
|
|
43
|
+
) : (
|
|
44
|
+
<CodeBlock>{children}</CodeBlock>
|
|
45
|
+
);
|
|
46
|
+
},
|
|
47
|
+
}}
|
|
48
|
+
/>
|
|
34
49
|
</div>
|
|
35
50
|
));
|
|
36
51
|
|
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": "1.1.
|
|
4
|
+
"version": "1.1.7",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"openapi",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"engines": {
|
|
69
69
|
"node": ">=14"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "604cd3723c770fd306318d594e8fb4e68c39724c"
|
|
72
72
|
}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import React from "react";
|
|
9
9
|
|
|
10
|
+
import CodeBlock from "@theme/CodeBlock";
|
|
10
11
|
import ReactMarkdown from "react-markdown";
|
|
11
12
|
|
|
12
13
|
import { createDescription } from "../../markdown/createDescription";
|
|
@@ -33,7 +34,21 @@ function ParamsItem({
|
|
|
33
34
|
|
|
34
35
|
const renderDescription = guard(description, (description) => (
|
|
35
36
|
<div>
|
|
36
|
-
<ReactMarkdown
|
|
37
|
+
<ReactMarkdown
|
|
38
|
+
children={createDescription(description)}
|
|
39
|
+
components={{
|
|
40
|
+
pre: "div",
|
|
41
|
+
code({ node, inline, className, children, ...props }) {
|
|
42
|
+
const match = /language-(\w+)/.exec(className || "");
|
|
43
|
+
if (inline) return <code>{children}</code>;
|
|
44
|
+
return !inline && match ? (
|
|
45
|
+
<CodeBlock className={className}>{children}</CodeBlock>
|
|
46
|
+
) : (
|
|
47
|
+
<CodeBlock>{children}</CodeBlock>
|
|
48
|
+
);
|
|
49
|
+
},
|
|
50
|
+
}}
|
|
51
|
+
/>
|
|
37
52
|
</div>
|
|
38
53
|
));
|
|
39
54
|
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import React from "react";
|
|
9
9
|
|
|
10
|
+
import CodeBlock from "@theme/CodeBlock";
|
|
10
11
|
import ReactMarkdown from "react-markdown";
|
|
11
12
|
|
|
12
13
|
import { createDescription } from "../../markdown/createDescription";
|
|
@@ -29,8 +30,22 @@ function SchemaItem({
|
|
|
29
30
|
);
|
|
30
31
|
|
|
31
32
|
const renderSchemaDescription = guard(schemaDescription, (description) => (
|
|
32
|
-
<div
|
|
33
|
-
<ReactMarkdown
|
|
33
|
+
<div>
|
|
34
|
+
<ReactMarkdown
|
|
35
|
+
children={createDescription(description)}
|
|
36
|
+
components={{
|
|
37
|
+
pre: "div",
|
|
38
|
+
code({ node, inline, className, children, ...props }) {
|
|
39
|
+
const match = /language-(\w+)/.exec(className || "");
|
|
40
|
+
if (inline) return <code>{children}</code>;
|
|
41
|
+
return !inline && match ? (
|
|
42
|
+
<CodeBlock className={className}>{children}</CodeBlock>
|
|
43
|
+
) : (
|
|
44
|
+
<CodeBlock>{children}</CodeBlock>
|
|
45
|
+
);
|
|
46
|
+
},
|
|
47
|
+
}}
|
|
48
|
+
/>
|
|
34
49
|
</div>
|
|
35
50
|
));
|
|
36
51
|
|