docusaurus-plugin-openapi-docs 0.0.0-434 → 0.0.0-438

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/index.js CHANGED
@@ -83,9 +83,7 @@ function pluginOpenAPIDocs(context, options) {
83
83
  // TODO: figure out better way to set default
84
84
  if (Object.keys(sidebarOptions !== null && sidebarOptions !== void 0 ? sidebarOptions : {}).length > 0) {
85
85
  const sidebarSlice = (0, sidebars_1.default)(sidebarOptions, options, loadedApi, tags, docPath);
86
- const sidebarSliceTemplate = template
87
- ? fs_1.default.readFileSync(template).toString()
88
- : `module.exports = {{{slice}}};`;
86
+ const sidebarSliceTemplate = `module.exports = {{{slice}}};`;
89
87
  const view = (0, mustache_1.render)(sidebarSliceTemplate, {
90
88
  slice: JSON.stringify(sidebarSlice),
91
89
  });
@@ -129,12 +127,11 @@ info_path: {{{infoPath}}}
129
127
 
130
128
  {{{markdown}}}
131
129
  `;
132
- const infoMdTemplate = template
133
- ? fs_1.default.readFileSync(template).toString()
134
- : `---
130
+ const infoMdTemplate = `---
135
131
  id: {{{id}}}
136
132
  sidebar_label: {{{title}}}
137
133
  hide_title: true
134
+ custom_edit_url: null
138
135
  ---
139
136
 
140
137
  {{{markdown}}}
@@ -146,12 +143,11 @@ import {useCurrentSidebarCategory} from '@docusaurus/theme-common';
146
143
  <DocCardList items={useCurrentSidebarCategory().items}/>
147
144
  \`\`\`
148
145
  `;
149
- const tagMdTemplate = template
150
- ? fs_1.default.readFileSync(template).toString()
151
- : `---
146
+ const tagMdTemplate = `---
152
147
  id: {{{id}}}
153
148
  title: {{{description}}}
154
149
  description: {{{description}}}
150
+ custom_edit_url: null
155
151
  ---
156
152
 
157
153
  {{{markdown}}}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "docusaurus-plugin-openapi-docs",
3
3
  "description": "OpenAPI plugin for Docusaurus.",
4
- "version": "0.0.0-434",
4
+ "version": "0.0.0-438",
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": "9d1c07ac33c8a476a61408c6c86e78c51c534af3"
71
+ "gitHead": "313a88d00a135ae6b9a3a2d4f0acf2413dd7a186"
72
72
  }
package/src/index.ts CHANGED
@@ -108,9 +108,7 @@ export default function pluginOpenAPIDocs(
108
108
  docPath
109
109
  );
110
110
 
111
- const sidebarSliceTemplate = template
112
- ? fs.readFileSync(template).toString()
113
- : `module.exports = {{{slice}}};`;
111
+ const sidebarSliceTemplate = `module.exports = {{{slice}}};`;
114
112
 
115
113
  const view = render(sidebarSliceTemplate, {
116
114
  slice: JSON.stringify(sidebarSlice),
@@ -162,12 +160,11 @@ info_path: {{{infoPath}}}
162
160
  {{{markdown}}}
163
161
  `;
164
162
 
165
- const infoMdTemplate = template
166
- ? fs.readFileSync(template).toString()
167
- : `---
163
+ const infoMdTemplate = `---
168
164
  id: {{{id}}}
169
165
  sidebar_label: {{{title}}}
170
166
  hide_title: true
167
+ custom_edit_url: null
171
168
  ---
172
169
 
173
170
  {{{markdown}}}
@@ -180,12 +177,11 @@ import {useCurrentSidebarCategory} from '@docusaurus/theme-common';
180
177
  \`\`\`
181
178
  `;
182
179
 
183
- const tagMdTemplate = template
184
- ? fs.readFileSync(template).toString()
185
- : `---
180
+ const tagMdTemplate = `---
186
181
  id: {{{id}}}
187
182
  title: {{{description}}}
188
183
  description: {{{description}}}
184
+ custom_edit_url: null
189
185
  ---
190
186
 
191
187
  {{{markdown}}}