docusaurus-theme-openapi-docs 3.0.0 → 3.0.1
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.
|
@@ -220,7 +220,8 @@ function CodeSnippets({ postman, codeSamples }) {
|
|
|
220
220
|
const auth = (0, hooks_1.useTypedSelector)((state) => state.auth);
|
|
221
221
|
// User-defined languages array
|
|
222
222
|
// Can override languageSet, change order of langs, override options and variants
|
|
223
|
-
const userDefinedLanguageSet =
|
|
223
|
+
const userDefinedLanguageSet =
|
|
224
|
+
siteConfig?.themeConfig?.languageTabs ?? exports.languageSet;
|
|
224
225
|
// Filter languageSet by user-defined langs
|
|
225
226
|
const filteredLanguageSet = exports.languageSet.filter((ls) => {
|
|
226
227
|
return userDefinedLanguageSet?.some((lang) => {
|
|
@@ -235,7 +236,6 @@ function CodeSnippets({ postman, codeSamples }) {
|
|
|
235
236
|
),
|
|
236
237
|
codeSamples
|
|
237
238
|
);
|
|
238
|
-
console.log("merged", mergedLangs);
|
|
239
239
|
// Read defaultLang from localStorage
|
|
240
240
|
const defaultLang = mergedLangs.filter(
|
|
241
241
|
(lang) =>
|
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": "3.0.
|
|
4
|
+
"version": "3.0.1",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"openapi",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"clsx": "^1.1.1",
|
|
43
43
|
"copy-text-to-clipboard": "^3.1.0",
|
|
44
44
|
"crypto-js": "^4.1.1",
|
|
45
|
-
"docusaurus-plugin-openapi-docs": "^3.0.
|
|
45
|
+
"docusaurus-plugin-openapi-docs": "^3.0.1",
|
|
46
46
|
"docusaurus-plugin-sass": "^0.2.3",
|
|
47
47
|
"file-saver": "^2.0.5",
|
|
48
48
|
"lodash": "^4.17.20",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"engines": {
|
|
70
70
|
"node": ">=14"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "5f6e43a2b1fcc1c266941879cb73365eb3d68e5a"
|
|
73
73
|
}
|
|
@@ -172,9 +172,9 @@ function CodeSnippets({ postman, codeSamples }: Props) {
|
|
|
172
172
|
|
|
173
173
|
// User-defined languages array
|
|
174
174
|
// Can override languageSet, change order of langs, override options and variants
|
|
175
|
-
const userDefinedLanguageSet =
|
|
176
|
-
|
|
177
|
-
|
|
175
|
+
const userDefinedLanguageSet =
|
|
176
|
+
(siteConfig?.themeConfig?.languageTabs as Language[] | undefined) ??
|
|
177
|
+
languageSet;
|
|
178
178
|
|
|
179
179
|
// Filter languageSet by user-defined langs
|
|
180
180
|
const filteredLanguageSet = languageSet.filter((ls) => {
|
|
@@ -189,8 +189,6 @@ function CodeSnippets({ postman, codeSamples }: Props) {
|
|
|
189
189
|
codeSamples
|
|
190
190
|
);
|
|
191
191
|
|
|
192
|
-
console.log("merged", mergedLangs);
|
|
193
|
-
|
|
194
192
|
// Read defaultLang from localStorage
|
|
195
193
|
const defaultLang: Language[] = mergedLangs.filter(
|
|
196
194
|
(lang) =>
|