Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,16 @@ yarn docusaurus gen-api-docs all --all-versions

> This will generate API docs for all versions of all the OpenAPI specification (OAS) files referenced in your `docusaurus-plugin-openapi-docs` config.

To generate only schema MDX files—without updating the sidebar or requiring `showSchemas` in your plugin config—use the `--schemas-only` flag:

```bash
yarn docusaurus gen-api-docs petstore --schemas-only
```

> This command writes the schema pages to the configured output directory while leaving other generated docs untouched.

The `--schemas-only` flag is also available for `gen-api-docs:version`.

### Cleaning API Docs

To clean/remove all API Docs, run the following command from the root directory of your project:
Expand Down Expand Up @@ -339,6 +349,14 @@ yarn docusaurus clean-api-docs all --all-versions

> This will clean API docs for all versions of all the OpenAPI specification (OAS) files referenced in your `docusaurus-plugin-openapi-docs` config.

To clean only schema docs while leaving API, info, and tag docs untouched, use the `--schemas-only` flag:

```bash
yarn docusaurus clean-api-docs petstore --schemas-only
```

> The `--schemas-only` flag is also available for `clean-api-docs:version`.

### Versioning OpenAPI docs

To generate _all_ versioned OpenAPI docs, run the following command from the root directory of your project:
Expand Down
18 changes: 18 additions & 0 deletions demo/docs/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,16 @@ Example:
yarn docusaurus gen-api-docs petstore
```

To generate only schema MDX files—without updating the sidebar or requiring `showSchemas` in your plugin config—use the `--schemas-only` flag:

```bash title="generating only schema docs for 'petstore'"
yarn docusaurus gen-api-docs petstore --schemas-only
```

> This command writes the schema pages to the configured output directory while leaving other generated docs untouched.

The `--schemas-only` flag is also available for `gen-api-docs:version`.

### Cleaning API Docs

To clean/remove all API Docs, run the following command from the root directory of your project:
Expand All @@ -383,6 +393,14 @@ Example:
yarn docusaurus clean-api-docs petstore
```

To clean only schema docs while leaving API, info, and tag docs untouched, use the `--schemas-only` flag:

```bash title="cleaning only schema docs for 'petstore'"
yarn docusaurus clean-api-docs petstore --schemas-only
```

> The `--schemas-only` flag is also available for `clean-api-docs:version`.

### Versioning OpenAPI docs

To generate _all_ versioned OpenAPI docs, run the following command from the root directory of your project:
Expand Down
18 changes: 18 additions & 0 deletions packages/docusaurus-plugin-openapi-docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,16 @@ yarn docusaurus gen-api-docs all --all-versions

> This will generate API docs for all versions of all the OpenAPI specification (OAS) files referenced in your `docusaurus-plugin-openapi-docs` config.

To generate only schema MDX files—without updating the sidebar or requiring `showSchemas` in your plugin config—use the `--schemas-only` flag:

```bash
yarn docusaurus gen-api-docs petstore --schemas-only
```

> This command writes the schema pages to the configured output directory while leaving other generated docs untouched.

The `--schemas-only` flag is also available for `gen-api-docs:version`.

### Cleaning API Docs

To clean/remove all API Docs, run the following command from the root directory of your project:
Expand Down Expand Up @@ -360,6 +370,14 @@ yarn docusaurus clean-api-docs all --all-versions

> This will clean API docs for all versions of all the OpenAPI specification (OAS) files referenced in your `docusaurus-plugin-openapi-docs` config.

To clean only schema docs while leaving API, info, and tag docs untouched, use the `--schemas-only` flag:

```bash
yarn docusaurus clean-api-docs petstore --schemas-only
```

> The `--schemas-only` flag is also available for `clean-api-docs:version`.

### Versioning OpenAPI docs

To generate _all_ versioned OpenAPI docs, run the following command from the root directory of your project:
Expand Down
Loading