You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25Lines changed: 25 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -174,6 +174,9 @@ The `docusaurus-plugin-openapi-docs` plugin can be configured with the following
174
174
|`versions`|`object`|`null`|_Optional:_ Options for versioning configuration. See below for a list of supported options. |
175
175
|`markdownGenerators`|`object`|`null`|_Optional:_ Customize MDX content via generator functions. See below for a list of supported options. |
176
176
|`showSchemas`|`boolean`|`null`|_Optional:_ If set to `true`, generates standalone schema pages and adds them to the sidebar. |
177
+
|`showInfoPage`|`boolean`|`true`|_Optional:_ If set to `false`, disables generation of the info page (overview page with API title and description). |
178
+
|`schemasOnly`|`boolean`|`false`|_Optional:_ If set to `true`, generates only schema pages (no API endpoint pages). Also available as `--schemas-only` CLI flag. |
179
+
|`maskCredentials`|`boolean`|`true`|_Optional:_ If set to `false`, disables credential masking in generated code snippets. By default, credentials are masked for security. |
177
180
|`externalJsonProps`|`boolean`|`true`|_Optional:_ If set to `false`, disables externalization of large JSON props. By default, large JSON is written to external files for better build performance. |
178
181
179
182
### sidebarOptions
@@ -222,6 +225,28 @@ The `docusaurus-plugin-openapi-docs` plugin can be configured with the following
|`createDocItem`|`function`|`null`| Optional: Returns a `SidebarItemDoc` object containing metadata for a sidebar item.<br/><br/>**Function type:**`(item: ApiPageMetadata \| SchemaPageMetadata, context: { sidebarOptions: SidebarOptions; basePath: string }) => SidebarItemDoc`|
224
227
228
+
### Performance Optimization
229
+
230
+
By default, `externalJsonProps` is enabled to optimize Docusaurus build times. This externalizes large JSON objects to separate files, significantly improving build performance for large OpenAPI specs.
231
+
232
+
**How it works:**
233
+
234
+
- With `externalJsonProps: true` (default): Large JSON props are written to separate `.json` files and loaded via `require()`. This bypasses MDX AST processing entirely, allowing the bundler to handle JSON more efficiently.
235
+
236
+
- With `externalJsonProps: false`: Large JSON objects (responses, request bodies, parameters) are embedded directly in the MDX. The MDX compiler must parse these into an AST and serialize them back, which can be slow for deeply nested schemas.
237
+
238
+
**When to disable:**
239
+
240
+
You may set `externalJsonProps: false` if you have custom tooling that depends on parsing the MDX files directly:
241
+
242
+
```typescript
243
+
petstore: {
244
+
specPath: "examples/petstore.yaml",
245
+
outputDir: "docs/petstore",
246
+
externalJsonProps: false, // Disable if needed for custom tooling
247
+
} satisfiesOpenApiPlugin.Options,
248
+
```
249
+
225
250
## Theme Configuration Options
226
251
227
252
The `docusaurus-theme-openapi-docs` theme can be configured with the following options in `themeConfig.api`:
Copy file name to clipboardExpand all lines: demo/docs/intro.mdx
+25Lines changed: 25 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -221,6 +221,9 @@ The `docusaurus-plugin-openapi-docs` plugin can be configured with the following
221
221
|`versions`|`object`|`null`|_Optional:_ Options for versioning configuration. See below for a list of supported options. |
222
222
|`markdownGenerators`|`object`|`null`|_Optional:_ Customize MDX content via generator functions. See below for a list of supported options. |
223
223
|`showSchemas`|`boolean`|`null`|_Optional:_ If set to `true`, generates standalone schema pages and adds them to the sidebar. |
224
+
|`showInfoPage`|`boolean`|`true`|_Optional:_ If set to `false`, disables generation of the info page (overview page with API title and description). |
225
+
|`schemasOnly`|`boolean`|`false`|_Optional:_ If set to `true`, generates only schema pages (no API endpoint pages). Also available as `--schemas-only` CLI flag. |
226
+
|`maskCredentials`|`boolean`|`true`|_Optional:_ If set to `false`, disables credential masking in generated code snippets. By default, credentials are masked for security. |
224
227
|`externalJsonProps`|`boolean`|`true`|_Optional:_ If set to `false`, disables externalization of large JSON props. By default, large JSON is written to external files for better build performance. |
|`createDocItem`|`function`|`null`| Optional: Returns a `SidebarItemDoc` object containing metadata for a sidebar item.<br/><br/>**Function type:**`(item: ApiPageMetadata \| SchemaPageMetadata, context: { sidebarOptions: SidebarOptions; basePath: string }) => SidebarItemDoc`|
288
291
292
+
### Performance Optimization
293
+
294
+
By default, `externalJsonProps` is enabled to optimize Docusaurus build times. This externalizes large JSON objects to separate files, significantly improving build performance for large OpenAPI specs.
295
+
296
+
**How it works:**
297
+
298
+
- With `externalJsonProps: true` (default): Large JSON props are written to separate `.json` files and loaded via `require()`. This bypasses MDX AST processing entirely, allowing the bundler to handle JSON more efficiently.
299
+
300
+
- With `externalJsonProps: false`: Large JSON objects (responses, request bodies, parameters) are embedded directly in the MDX. The MDX compiler must parse these into an AST and serialize them back, which can be slow for deeply nested schemas.
301
+
302
+
**When to disable:**
303
+
304
+
You may set `externalJsonProps: false` if you have custom tooling that depends on parsing the MDX files directly:
305
+
306
+
```typescript
307
+
petstore: {
308
+
specPath: "examples/petstore.yaml",
309
+
outputDir: "docs/petstore",
310
+
externalJsonProps: false, // Disable if needed for custom tooling
311
+
} satisfiesOpenApiPlugin.Options,
312
+
```
313
+
289
314
## Theme Configuration Options
290
315
291
316
The `docusaurus-theme-openapi-docs` theme can be configured with the following options in `themeConfig.api`:
0 commit comments