Skip to content

Commit 7a76077

Browse files
committed
update docs
1 parent eee760d commit 7a76077

File tree

3 files changed

+31
-24
lines changed

3 files changed

+31
-24
lines changed

README.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -174,15 +174,14 @@ The `docusaurus-plugin-openapi-docs` plugin can be configured with the following
174174

175175
`sidebarOptions` can be configured with the following options:
176176

177-
| Name | Type | Default | Description |
178-
| -------------------- | ---------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
179-
| `groupPathsBy` | `string` | `null` | Organize and group sidebar slice by specified option. Note: Currently, `groupPathsBy` only contains support for grouping by `tag` and `tagGroup`. |
180-
| `categoryLinkSource` | `string` | `null` | Defines what source to use for rendering category link pages when grouping paths by tag. <br/><br/>The supported options are as follows: <br/><br/> `tag`: Sets the category link config type to `generated-index` and uses the tag description as the link config description. <br/><br/>`info`: Sets the category link config type to `doc` and renders the `info` section as the category link (recommended only for multi/micro-spec scenarios). <br/><br/>`none`: Does not create pages for categories, only groups that can be expanded/collapsed. |
181-
| `sidebarCollapsible` | `boolean` | `true` | Whether sidebar categories are collapsible by default. |
182-
| `sidebarCollapsed` | `boolean` | `true` | Whether sidebar categories are collapsed by default. |
183-
| `customProps` | `object` | `null` | Additional props for customizing a sidebar item. |
184-
| `sidebarGenerators` | `object` | `null` | Optional: Customize sidebar rendering with callback functions. |
185-
| `createDocItem` | `function` | `null` | Optional: Returns a `SidebarItemDoc` object, which allows for customisation of sidebar items. For example, add a class name in certain conditions, or add `customProps` to provide custom rendering. See below for a list of supported operations. |
177+
| Name | Type | Default | Description |
178+
| -------------------- | --------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
179+
| `groupPathsBy` | `string` | `null` | Organize and group sidebar slice by specified option. Note: Currently, `groupPathsBy` only contains support for grouping by `tag` and `tagGroup`. |
180+
| `categoryLinkSource` | `string` | `null` | Defines what source to use for rendering category link pages when grouping paths by tag. <br/><br/>The supported options are as follows: <br/><br/> `tag`: Sets the category link config type to `generated-index` and uses the tag description as the link config description. <br/><br/>`info`: Sets the category link config type to `doc` and renders the `info` section as the category link (recommended only for multi/micro-spec scenarios). <br/><br/>`none`: Does not create pages for categories, only groups that can be expanded/collapsed. |
181+
| `sidebarCollapsible` | `boolean` | `true` | Whether sidebar categories are collapsible by default. |
182+
| `sidebarCollapsed` | `boolean` | `true` | Whether sidebar categories are collapsed by default. |
183+
| `customProps` | `object` | `null` | Additional props for customizing a sidebar item. |
184+
| `sidebarGenerators` | `object` | `null` | Optional: Customize sidebar rendering with callback functions. |
186185

187186
> You may optionally configure a `sidebarOptions`. In doing so, an individual `sidebar.js` slice with the configured options will be generated within the respective `outputDir`.
188187
@@ -213,9 +212,9 @@ The `docusaurus-plugin-openapi-docs` plugin can be configured with the following
213212

214213
`sidebarGenerators` can be configured with the following options:
215214

216-
| Name | Type | Default | Description |
217-
| --------------- | ---------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
218-
| `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` |
215+
| Name | Type | Default | Description |
216+
| --------------- | ---------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
217+
| `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` |
219218

220219
## CLI Usage
221220

demo/docs/intro.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ The `docusaurus-plugin-openapi-docs` plugin can be configured with the following
209209
| `sidebarCollapsible` | `boolean` | `true` | Whether sidebar categories are collapsible by default. |
210210
| `sidebarCollapsed` | `boolean` | `true` | Whether sidebar categories are collapsed by default. |
211211
| `customProps` | `object` | `null` | Additional props for customizing a sidebar item. |
212+
| `sidebarGenerators` | `object` | `null` | Optional: Customize sidebar rendering with callback functions. |
212213

213214
> You may optionally configure a `sidebarOptions`. In doing so, an individual `sidebar.js` slice with the configured options will be generated within the respective `outputDir`.
214215
@@ -252,6 +253,14 @@ petstore31: {
252253
} satisfies OpenApiPlugin.Options,
253254
```
254255

256+
### sidebarGenerators
257+
258+
`sidebarGenerators` can be configured with the following options:
259+
260+
| Name | Type | Default | Description |
261+
| --------------- | ---------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
262+
| `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` |
263+
255264
## CLI Usage
256265

257266
After you've installed and configured the plugin and theme, the CLI can be used to `generate` and `clean` API docs.

0 commit comments

Comments
 (0)