docusaurus-theme-openapi-docs 0.0.0-546 → 0.0.0-549
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.
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
import React from "react";
|
|
9
9
|
|
|
10
10
|
import CodeBlock from "@theme/CodeBlock";
|
|
11
|
+
import SchemaTabs from "@theme/SchemaTabs";
|
|
12
|
+
import TabItem from "@theme/TabItem";
|
|
11
13
|
/* eslint-disable import/no-extraneous-dependencies*/
|
|
12
14
|
import { createDescription } from "docusaurus-theme-openapi-docs/lib/markdown/createDescription";
|
|
13
15
|
/* eslint-disable import/no-extraneous-dependencies*/
|
|
@@ -77,16 +79,34 @@ function ParamsItem({
|
|
|
77
79
|
);
|
|
78
80
|
|
|
79
81
|
const renderExample = guard(example, (example) => (
|
|
80
|
-
|
|
82
|
+
<>
|
|
83
|
+
<strong>Example: </strong>
|
|
84
|
+
{example}
|
|
85
|
+
</>
|
|
81
86
|
));
|
|
82
87
|
|
|
83
88
|
const renderExamples = guard(examples, (examples) => {
|
|
84
89
|
const exampleEntries = Object.entries(examples);
|
|
85
90
|
return (
|
|
86
91
|
<>
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
92
|
+
<strong>Examples:</strong>
|
|
93
|
+
<SchemaTabs>
|
|
94
|
+
{exampleEntries.map(([exampleName, exampleProperties]) => (
|
|
95
|
+
<TabItem value={exampleName} label={exampleName}>
|
|
96
|
+
{exampleProperties.summary && <p>{exampleProperties.summary}</p>}
|
|
97
|
+
{exampleProperties.description && (
|
|
98
|
+
<p>
|
|
99
|
+
<strong>Description: </strong>
|
|
100
|
+
<span>{exampleProperties.description}</span>
|
|
101
|
+
</p>
|
|
102
|
+
)}
|
|
103
|
+
<p>
|
|
104
|
+
<strong>Example: </strong>
|
|
105
|
+
<code>{exampleProperties.value}</code>
|
|
106
|
+
</p>
|
|
107
|
+
</TabItem>
|
|
108
|
+
))}
|
|
109
|
+
</SchemaTabs>
|
|
90
110
|
</>
|
|
91
111
|
);
|
|
92
112
|
});
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
import React from "react";
|
|
9
9
|
|
|
10
10
|
import CodeBlock from "@theme/CodeBlock";
|
|
11
|
+
import SchemaTabs from "@theme/SchemaTabs";
|
|
12
|
+
import TabItem from "@theme/TabItem";
|
|
11
13
|
/* eslint-disable import/no-extraneous-dependencies*/
|
|
12
14
|
import { createDescription } from "docusaurus-theme-openapi-docs/lib/markdown/createDescription";
|
|
13
15
|
/* eslint-disable import/no-extraneous-dependencies*/
|
|
@@ -77,16 +79,34 @@ function ParamsItem({
|
|
|
77
79
|
);
|
|
78
80
|
|
|
79
81
|
const renderExample = guard(example, (example) => (
|
|
80
|
-
|
|
82
|
+
<>
|
|
83
|
+
<strong>Example: </strong>
|
|
84
|
+
{example}
|
|
85
|
+
</>
|
|
81
86
|
));
|
|
82
87
|
|
|
83
88
|
const renderExamples = guard(examples, (examples) => {
|
|
84
89
|
const exampleEntries = Object.entries(examples);
|
|
85
90
|
return (
|
|
86
91
|
<>
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
92
|
+
<strong>Examples:</strong>
|
|
93
|
+
<SchemaTabs>
|
|
94
|
+
{exampleEntries.map(([exampleName, exampleProperties]) => (
|
|
95
|
+
<TabItem value={exampleName} label={exampleName}>
|
|
96
|
+
{exampleProperties.summary && <p>{exampleProperties.summary}</p>}
|
|
97
|
+
{exampleProperties.description && (
|
|
98
|
+
<p>
|
|
99
|
+
<strong>Description: </strong>
|
|
100
|
+
<span>{exampleProperties.description}</span>
|
|
101
|
+
</p>
|
|
102
|
+
)}
|
|
103
|
+
<p>
|
|
104
|
+
<strong>Example: </strong>
|
|
105
|
+
<code>{exampleProperties.value}</code>
|
|
106
|
+
</p>
|
|
107
|
+
</TabItem>
|
|
108
|
+
))}
|
|
109
|
+
</SchemaTabs>
|
|
90
110
|
</>
|
|
91
111
|
);
|
|
92
112
|
});
|
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-549",
|
|
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": "
|
|
54
|
+
"docusaurus-plugin-openapi-docs": "^1.5.2",
|
|
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": "cd3317eeae901d13cce763af36eb7c4d72cf4f23"
|
|
77
77
|
}
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
import React from "react";
|
|
9
9
|
|
|
10
10
|
import CodeBlock from "@theme/CodeBlock";
|
|
11
|
+
import SchemaTabs from "@theme/SchemaTabs";
|
|
12
|
+
import TabItem from "@theme/TabItem";
|
|
11
13
|
/* eslint-disable import/no-extraneous-dependencies*/
|
|
12
14
|
import { createDescription } from "docusaurus-theme-openapi-docs/lib/markdown/createDescription";
|
|
13
15
|
/* eslint-disable import/no-extraneous-dependencies*/
|
|
@@ -77,16 +79,34 @@ function ParamsItem({
|
|
|
77
79
|
);
|
|
78
80
|
|
|
79
81
|
const renderExample = guard(example, (example) => (
|
|
80
|
-
|
|
82
|
+
<>
|
|
83
|
+
<strong>Example: </strong>
|
|
84
|
+
{example}
|
|
85
|
+
</>
|
|
81
86
|
));
|
|
82
87
|
|
|
83
88
|
const renderExamples = guard(examples, (examples) => {
|
|
84
89
|
const exampleEntries = Object.entries(examples);
|
|
85
90
|
return (
|
|
86
91
|
<>
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
92
|
+
<strong>Examples:</strong>
|
|
93
|
+
<SchemaTabs>
|
|
94
|
+
{exampleEntries.map(([exampleName, exampleProperties]) => (
|
|
95
|
+
<TabItem value={exampleName} label={exampleName}>
|
|
96
|
+
{exampleProperties.summary && <p>{exampleProperties.summary}</p>}
|
|
97
|
+
{exampleProperties.description && (
|
|
98
|
+
<p>
|
|
99
|
+
<strong>Description: </strong>
|
|
100
|
+
<span>{exampleProperties.description}</span>
|
|
101
|
+
</p>
|
|
102
|
+
)}
|
|
103
|
+
<p>
|
|
104
|
+
<strong>Example: </strong>
|
|
105
|
+
<code>{exampleProperties.value}</code>
|
|
106
|
+
</p>
|
|
107
|
+
</TabItem>
|
|
108
|
+
))}
|
|
109
|
+
</SchemaTabs>
|
|
90
110
|
</>
|
|
91
111
|
);
|
|
92
112
|
});
|