{"id":19925641,"url":"https://github.com/paloaltonetworks/docusaurus-openapi-docs","last_synced_at":"2026-04-08T05:01:57.986Z","repository":{"id":37056932,"uuid":"460077424","full_name":"PaloAltoNetworks/docusaurus-openapi-docs","owner":"PaloAltoNetworks","description":"🦝 OpenAPI plugin for generating API reference docs in Docusaurus v3.","archived":false,"fork":false,"pushed_at":"2026-04-03T16:23:21.000Z","size":14290,"stargazers_count":1061,"open_issues_count":115,"forks_count":303,"subscribers_count":8,"default_branch":"main","last_synced_at":"2026-04-03T19:36:31.838Z","etag":null,"topics":["docusaurus","docusaurus-plugin","docusaurus-theme","docusaurus2","openapi","react"],"latest_commit_sha":null,"homepage":"https://docusaurus-openapi.tryingpan.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PaloAltoNetworks.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2022-02-16T16:06:40.000Z","updated_at":"2026-04-03T16:22:11.000Z","dependencies_parsed_at":"2023-07-18T07:51:51.374Z","dependency_job_id":"4f4bf7f7-b507-44bb-9de1-92db20f84d66","html_url":"https://github.com/PaloAltoNetworks/docusaurus-openapi-docs","commit_stats":{"total_commits":873,"total_committers":52,"mean_commits":16.78846153846154,"dds":0.5807560137457044,"last_synced_commit":"e7295a8aa6f3fab5ccc4f8f9ad0e6c33d785aa16"},"previous_names":["paloaltonetworks/docusaurus-openapi"],"tags_count":127,"template":false,"template_full_name":null,"purl":"pkg:github/PaloAltoNetworks/docusaurus-openapi-docs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaloAltoNetworks%2Fdocusaurus-openapi-docs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaloAltoNetworks%2Fdocusaurus-openapi-docs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaloAltoNetworks%2Fdocusaurus-openapi-docs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaloAltoNetworks%2Fdocusaurus-openapi-docs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PaloAltoNetworks","download_url":"https://codeload.github.com/PaloAltoNetworks/docusaurus-openapi-docs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaloAltoNetworks%2Fdocusaurus-openapi-docs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31540826,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"online","status_checked_at":"2026-04-08T02:00:06.127Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docusaurus","docusaurus-plugin","docusaurus-theme","docusaurus2","openapi","react"],"created_at":"2024-11-12T22:23:29.250Z","updated_at":"2026-04-08T05:01:57.976Z","avatar_url":"https://github.com/PaloAltoNetworks.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eDocusaurus OpenAPI Doc Generator\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg width=\"200\" src=\"https://user-images.githubusercontent.com/9343811/165975569-1bc29814-884c-4931-83df-860043b625b7.svg\" /\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\nOpenAPI plugin for generating API reference docs in Docusaurus v3 (compatible with [Docusaurus Faster](https://github.com/facebook/docusaurus/issues/10556)).\n\n\u003cimg src=\"https://img.shields.io/badge/dynamic/json?style=for-the-badge\u0026logo=meta\u0026color=blueviolet\u0026label=Docusaurus\u0026query=dependencies%5B%22%40docusaurus%2Fcore%22%5D\u0026url=https%3A%2F%2Fraw.githubusercontent.com%2FPaloAltoNetworks%2Fdocusaurus-openapi-docs%2Fmain%2Fdemo%2Fpackage.json\" /\u003e\n\u003cbr/\u003e\u003cbr/\u003e\n\n[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/blob/HEAD/LICENSE) [![npm latest package](https://img.shields.io/npm/v/docusaurus-plugin-openapi-docs/latest.svg)](https://www.npmjs.com/package/docusaurus-plugin-openapi-docs) [![npm downloads](https://img.shields.io/npm/dm/docusaurus-plugin-openapi-docs.svg)](https://www.npmjs.com/package/docusaurus-plugin-openapi-docs) [![npm canary package](https://img.shields.io/npm/v/docusaurus-plugin-openapi-docs/canary.svg)](https://www.npmjs.com/package/docusaurus-plugin-openapi-docs)\n\u003cbr/\u003e\n[![build](https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/actions/workflows/validate.yaml/badge.svg)](https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/actions/workflows/validate.yaml) [![prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier) [![Cypress.io](https://img.shields.io/badge/tested%20with-Cypress-04C38E.svg)](https://www.cypress.io/) [![jest](https://jestjs.io/img/jest-badge.svg)](https://github.com/facebook/jest) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/blob/HEAD/CONTRIBUTING.md#pull-requests)\n\u003cbr /\u003e\n\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n\n\u003cimg src=\"https://github.com/user-attachments/assets/38f33ad6-97a9-41de-9e00-31b8298a4e22\" width=\"900\" /\u003e\n\n\u003c/p\u003e\n\n---\n\n## Overview\n\nThe `docusaurus-plugin-openapi-docs` package extends the Docusaurus CLI with commands for generating MDX using the OpenAPI specification as the source. The resulting MDX is fully compatible with [plugin-content-docs](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-docs) and can be used to render beautiful reference API docs when combined with the `docusaurus-theme-openapi-docs` theme.\n\nKey Features:\n\n- **Compatible:** Works with Swagger 2.0 and OpenAPI 3.x.\n- **Fast:** Convert large OpenAPI specs into MDX docs in seconds. 🔥\n- **Stylish:** Based on the same [Infima styling framework](https://infima.dev/) that powers the Docusaurus UI.\n- **Flexible:** Supports single, multi and _even micro_ OpenAPI specs.\n\n## Compatibility Matrix\n\n| Docusaurus OpenAPI Docs | Docusaurus      |\n| ----------------------- | --------------- |\n| 5.x.x (current)         | `3.10.0+`       |\n| 4.x.x (legacy)          | `3.5.0 - 3.9.2` |\n| 3.0.x (end-of-support)  | `3.0.1 - 3.4.0` |\n| 2.2.3 (end-of-support)  | `2.4.1 - 2.4.3` |\n| 1.7.3 (end-of-support)  | `2.0.1 - 2.2.0` |\n\n## Bootstrapping from Template (new Docusaurus site)\n\nRun the following to bootstrap a Docusaurus v3 site (classic theme) with `docusaurus-openapi-docs`:\n\n```bash\nnpx create-docusaurus@3.10.0 my-website --package-manager yarn\n```\n\n\u003e When prompted to select a template choose `Git repository`.\n\nTemplate Repository URL:\n\n```bash\nhttps://github.com/PaloAltoNetworks/docusaurus-template-openapi-docs.git\n```\n\n\u003e When asked how the template repo should be cloned choose \"copy\".\n\n```bash\ncd my-website\nyarn start\n```\n\nIf all goes well, you should be greeted by a brand new Docusaurus site that includes API reference docs for the ubiquitous Petstore API!\n\n## Installation (existing Docusaurus site)\n\n\u003e Both the plugin and theme are currently designed to pair with a specific Docusaurus release. The Docusaurus badge in the `README.md` and at the top of this page will always reflect the current compatible versions.\n\n### Plugin\n\n```bash\nyarn add docusaurus-plugin-openapi-docs\n```\n\n### Theme\n\n```bash\nyarn add docusaurus-theme-openapi-docs\n```\n\n## Configuring `docusaurus.config.ts` (Plugin and theme usage)\n\nHere is an example of properly configuring `docusaurus.config.ts` for `docusaurus-plugin-openapi-docs` and `docusaurus-theme-openapi-docs` usage.\n\n\u003e Note: Instructions may differ slightly for sites that haven't migrated to typescript.\n\n```typescript\n// docusaurus.config.ts\n// note that parts of the complete config were left out for brevity\nimport type * as Preset from \"@docusaurus/preset-classic\";\nimport type { Config } from \"@docusaurus/types\";\nimport type * as Plugin from \"@docusaurus/types/src/plugin\";\nimport type * as OpenApiPlugin from \"docusaurus-plugin-openapi-docs\";\n\n{\n  presets: [\n    [\n      \"classic\",\n      {\n        docs: {\n          sidebarPath: \"./sidebars.ts\",\n          docItemComponent: \"@theme/ApiItem\", // Derived from docusaurus-theme-openapi\n        },\n        theme: {\n          customCss: \"./src/css/custom.css\",\n        },\n      } satisfies Preset.Options,\n    ],\n  ],\n\n  plugins: [\n    [\n      'docusaurus-plugin-openapi-docs',\n      {\n        id: \"api\", // plugin id\n        docsPluginId: \"classic\", // configured for preset-classic\n        config: {\n          petstore: {\n            specPath: \"examples/petstore.yaml\",\n            outputDir: \"docs/petstore\",\n            sidebarOptions: {\n              groupPathsBy: \"tag\",\n            },\n          } satisfies OpenApiPlugin.Options,\n        }\n      },\n    ]\n  ],\n  themes: [\"docusaurus-theme-openapi-docs\"], // export theme components\n}\n```\n\n\u003e Note: You may optionally configure a dedicated `@docusaurus/plugin-content-docs` instance for use with `docusaurus-theme-openapi-docs` by setting `docItemComponent` to `@theme/ApiItem`.\n\n## Plugin Configuration Options\n\nThe `docusaurus-plugin-openapi-docs` plugin can be configured with the following options:\n\n| Name           | Type     | Default                           | Description                                                                                                                                                   |\n| -------------- | -------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `id`           | `string` | `null`                            | A unique plugin ID.                                                                                                                                           |\n| `docsPlugin`   | `string` | `@docusaurus/plugin-content-docs` | The plugin used to render the OpenAPI docs (ignored if the plugin instance referenced by `docsPluginId` is a `preset`).                                       |\n| `docsPluginId` | `string` | `null`                            | The plugin ID associated with the `preset` or configured `docsPlugin` instance used to render the OpenAPI docs (e.g. \"your-plugin-id\", \"classic\", \"default\"). |\n\n### config\n\n`config` can be configured with the following options:\n\n| Name                 | Type      | Default | Description                                                                                                                                                    |\n| -------------------- | --------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `specPath`           | `string`  | `null`  | Designated URL or path to the source of an OpenAPI specification file or directory of multiple OpenAPI specification files.                                    |\n| `outputDir`          | `string`  | `null`  | Desired output path for generated MDX and sidebar files.                                                                                                       |\n| `proxy`              | `string`  | `null`  | _Optional:_ Proxy URL to prepend to base URL when performing API requests from browser. Overrides site-wide `themeConfig.api.proxy` if set.                    |\n| `template`           | `string`  | `null`  | _Optional:_ Customize MDX content with a desired template.                                                                                                     |\n| `infoTemplate`       | `string`  | `null`  | _Optional:_ Customize MDX content for **info** pages only.                                                                                                     |\n| `tagTemplate`        | `string`  | `null`  | _Optional:_ Customize MDX content for **tag** pages only.                                                                                                      |\n| `schemaTemplate`     | `string`  | `null`  | _Optional:_ Customize MDX content for **schema** pages only.                                                                                                   |\n| `downloadUrl`        | `string`  | `null`  | _Optional:_ Designated URL for downloading OpenAPI specification. (requires `info` section/doc)                                                                |\n| `hideSendButton`     | `boolean` | `null`  | _Optional:_ If set to `true`, hides the “Send API Request” button in the API demo panel.                                                                       |\n| `showExtensions`     | `boolean` | `null`  | _Optional:_ If set to `true`, renders operation‑level vendor‑extensions in descriptions.                                                                       |\n| `sidebarOptions`     | `object`  | `null`  | _Optional:_ Set of options for sidebar configuration. See below for a list of supported options.                                                               |\n| `version`            | `string`  | `null`  | _Optional:_ Version assigned to a single or micro‑spec API specified in `specPath`.                                                                            |\n| `label`              | `string`  | `null`  | _Optional:_ Version label used when generating the version‑selector dropdown menu.                                                                             |\n| `baseUrl`            | `string`  | `null`  | _Optional:_ Base URL for versioned docs in the version‑selector dropdown.                                                                                      |\n| `versions`           | `object`  | `null`  | _Optional:_ Options for versioning configuration. See below for a list of supported options.                                                                   |\n| `markdownGenerators` | `object`  | `null`  | _Optional:_ Customize MDX content via generator functions. See below for a list of supported options.                                                          |\n| `showSchemas`        | `boolean` | `null`  | _Optional:_ If set to `true`, generates standalone schema pages and adds them to the sidebar.                                                                  |\n| `showInfoPage`       | `boolean` | `true`  | _Optional:_ If set to `false`, disables generation of the info page (overview page with API title and description).                                            |\n| `schemasOnly`        | `boolean` | `false` | _Optional:_ If set to `true`, generates only schema pages (no API endpoint pages). Also available as `--schemas-only` CLI flag.                                |\n| `maskCredentials`    | `boolean` | `true`  | _Optional:_ If set to `false`, disables credential masking in generated code snippets. By default, credentials are masked for security.                        |\n| `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. |\n\n### sidebarOptions\n\n`sidebarOptions` can be configured with the following options:\n\n| Name                 | Type      | Default | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |\n| -------------------- | --------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `groupPathsBy`       | `string`  | `null`  | Organize and group sidebar slice by specified option. Note: Currently, `groupPathsBy` only contains support for grouping by `tag` and `tagGroup`.                                                                                                                                                                                                                                                                                                                                                                                                        |\n| `categoryLinkSource` | `string`  | `null`  | Defines what source to use for rendering category link pages when grouping paths by tag. \u003cbr/\u003e\u003cbr/\u003eThe supported options are as follows: \u003cbr/\u003e\u003cbr/\u003e `tag`: Sets the category link config type to `generated-index` and uses the tag description as the link config description. \u003cbr/\u003e\u003cbr/\u003e`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). \u003cbr/\u003e\u003cbr/\u003e`none`: Does not create pages for categories, only groups that can be expanded/collapsed. |\n| `sidebarCollapsible` | `boolean` | `true`  | Whether sidebar categories are collapsible by default.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |\n| `sidebarCollapsed`   | `boolean` | `true`  | Whether sidebar categories are collapsed by default.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |\n| `customProps`        | `object`  | `null`  | Additional props for customizing a sidebar item.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |\n| `sidebarGenerators`  | `object`  | `null`  | Optional: Customize sidebar rendering with callback functions.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |\n\n\u003e 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`.\n\n`versions` can be configured with the following options:\n\n| Name          | Type     | Default | Description                                                                                                                |\n| ------------- | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------- |\n| `specPath`    | `string` | `null`  | Designated URL or path to the source of an OpenAPI specification file or a directory of micro OpenAPI specification files. |\n| `outputDir`   | `string` | `null`  | Desired output path for versioned, generated MDX files.                                                                    |\n| `label`       | `string` | `null`  | _Optional:_ Version label used when generating the version selector dropdown menu.                                         |\n| `baseUrl`     | `string` | `null`  | _Optional:_ Version base URL used when generating the version selector dropdown menu.                                      |\n| `downloadUrl` | `string` | `null`  | _Optional:_ Designated URL for downloading the versioned OpenAPI specification.                                            |\n\n\u003e All versions will automatically inherit `sidebarOptions` from the parent/base config.\n\n### markdownGenerators\n\n`markdownGenerators` can be configured with the following options:\n\n| Name                 | Type       | Default | Description                                                                                                                                    |\n| -------------------- | ---------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |\n| `createApiPageMD`    | `function` | `null`  | _Optional:_ Returns a string of the raw markdown body for API pages.\u003cbr/\u003e\u003cbr/\u003e**Function type:** `(pageData: ApiPageMetadata) =\u003e string`       |\n| `createInfoPageMD`   | `function` | `null`  | _Optional:_ Returns a string of the raw markdown body for info pages.\u003cbr/\u003e\u003cbr/\u003e**Function type:** `(pageData: InfoPageMetadata) =\u003e string`     |\n| `createTagPageMD`    | `function` | `null`  | _Optional:_ Returns a string of the raw markdown body for tag pages.\u003cbr/\u003e\u003cbr/\u003e**Function type:** `(pageData: TagPageMetadata) =\u003e string`       |\n| `createSchemaPageMD` | `function` | `null`  | _Optional:_ Returns a string of the raw markdown body for schema pages.\u003cbr/\u003e\u003cbr/\u003e**Function type:** `(pageData: SchemaPageMetadata) =\u003e string` |\n\n### sidebarGenerators\n\n`sidebarGenerators` can be configured with the following options:\n\n| Name            | Type       | Default | Description                                                                                                                                                                                                                                      |\n| --------------- | ---------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| `createDocItem` | `function` | `null`  | Optional: Returns a `SidebarItemDoc` object containing metadata for a sidebar item.\u003cbr/\u003e\u003cbr/\u003e**Function type:** `(item: ApiPageMetadata \\| SchemaPageMetadata, context: { sidebarOptions: SidebarOptions; basePath: string }) =\u003e SidebarItemDoc` |\n\n### Performance Optimization\n\nBy 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.\n\n**How it works:**\n\n- 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.\n\n- 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.\n\n**When to disable:**\n\nYou may set `externalJsonProps: false` if you have custom tooling that depends on parsing the MDX files directly:\n\n```typescript\npetstore: {\n  specPath: \"examples/petstore.yaml\",\n  outputDir: \"docs/petstore\",\n  externalJsonProps: false, // Disable if needed for custom tooling\n} satisfies OpenApiPlugin.Options,\n```\n\n## Theme Configuration Options\n\nThe `docusaurus-theme-openapi-docs` theme can be configured with the following options in `themeConfig.api`:\n\n| Name                 | Type     | Default         | Description                                                                                                                        |\n| -------------------- | -------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------- |\n| `proxy`              | `string` | `null`          | _Optional:_ Site-wide proxy URL to prepend to base URL when performing API requests. Can be overridden per-spec via plugin config. |\n| `authPersistance`    | `string` | `null`          | _Optional:_ Determines how auth credentials are persisted. Options: `\"localStorage\"`, `\"sessionStorage\"`, or `false` to disable.   |\n| `requestTimeout`     | `number` | `30000`         | _Optional:_ Request timeout in milliseconds for API requests made from the browser. Defaults to 30 seconds.                        |\n| `requestCredentials` | `string` | `\"same-origin\"` | _Optional:_ Controls cookie behavior for API requests. Options: `\"omit\"`, `\"same-origin\"`, or `\"include\"`.                         |\n\nExample:\n\n```typescript\n// docusaurus.config.ts\n{\n  themeConfig: {\n    api: {\n      proxy: \"https://cors.pan.dev\",  // Site-wide proxy (can be overridden per-spec in plugin config)\n      authPersistance: \"localStorage\",\n      requestTimeout: 60000, // 60 seconds\n      requestCredentials: \"omit\", // Prevent cookies from being sent with requests\n    },\n  },\n}\n```\n\n## CLI Usage\n\n```bash\nUsage: docusaurus \u003ccommand\u003e [options]\n\nOptions:\n  -V, --version                                            output the version number\n  -h, --help                                               display help for command\n\nCommands:\n  build [options] [siteDir]                                Build website.\n  swizzle [options] [themeName] [componentName] [siteDir]  Wraps or ejects the original theme files into website folder for customization.\n  deploy [options] [siteDir]                               Deploy website to GitHub pages.\n  start [options] [siteDir]                                Start the development server.\n  serve [options] [siteDir]                                Serve website locally.\n  clear [siteDir]                                          Remove build artifacts.\n  write-translations [options] [siteDir]                   Extract required translations of your site.\n  write-heading-ids [options] [siteDir] [files...]         Generate heading ids in Markdown content.\n  docs:version \u003cversion\u003e                                   Tag a new docs version\n  gen-api-docs [options] \u003cid\u003e                              Generates OpenAPI docs in MDX file format and sidebar.ts (if enabled).\n  gen-api-docs:version [options] \u003cid:version\u003e              Generates versioned OpenAPI docs in MDX file format, versions.js and sidebar.ts (if\n                                                           enabled).\n  clean-api-docs [options] \u003cid\u003e                            Clears the generated OpenAPI docs MDX files and sidebar.ts (if enabled).\n  clean-api-docs:version [options] \u003cid:version\u003e            Clears the versioned, generated OpenAPI docs MDX files, versions.json and sidebar.ts\n                                                           (if enabled)\n```\n\n### Generating OpenAPI Docs\n\nTo generate all OpenAPI docs, run the following command from the root directory of your project:\n\n```bash\nyarn docusaurus gen-api-docs all\n```\n\n\u003e This will generate API docs for all of the OpenAPI specification (OAS) files referenced in your `docusaurus-plugin-openapi-docs` config.\n\nYou may also generate OpenAPI docs for a single path or OAS by specifying the unique `id`:\n\n```bash\nyarn docusaurus gen-api-docs \u003cid\u003e\n```\n\nExample:\n\n```bash\nyarn docusaurus gen-api-docs petstore\n```\n\n\u003e The example above will only generate API docs relative to `petstore`.\n\nIf you have multiple versions of the same API, `gen-api-docs` only generates the latest. To generate all versions, use the `--all-versions` flag.\n\nExample:\n\n```bash\nyarn docusaurus gen-api-docs all --all-versions\n```\n\n\u003e This will generate API docs for all versions of all the OpenAPI specification (OAS) files referenced in your `docusaurus-plugin-openapi-docs` config.\n\nTo generate only schema MDX files—without updating the sidebar or requiring `showSchemas` in your plugin config—use the `--schemas-only` flag:\n\n```bash\nyarn docusaurus gen-api-docs petstore --schemas-only\n```\n\n\u003e This command writes the schema pages to the configured output directory while leaving other generated docs untouched.\n\nThe `--schemas-only` flag is also available for `gen-api-docs:version`.\n\n### Cleaning API Docs\n\nTo clean/remove all API Docs, run the following command from the root directory of your project:\n\n```bash\nyarn docusaurus clean-api-docs all\n```\n\nYou may also remove a particular set of API docs by specifying the unique `id` of your desired spec instance.\n\n```bash\nyarn docusaurus clean-api-docs \u003cid\u003e\n```\n\nExample:\n\n```bash\nyarn docusaurus clean-api-docs petstore\n```\n\n\u003e The example above will remove all API docs relative to `burgers`.\n\nIf you have multiple versions of the same API, `clean-api-docs` only cleans the latest. To clean all versions, use the `--all-versions` flag.\n\nExample:\n\n```bash\nyarn docusaurus clean-api-docs all --all-versions\n```\n\n\u003e This will clean API docs for all versions of all the OpenAPI specification (OAS) files referenced in your `docusaurus-plugin-openapi-docs` config.\n\nTo clean only schema docs while leaving API, info, and tag docs untouched, use the `--schemas-only` flag:\n\n```bash\nyarn docusaurus clean-api-docs petstore --schemas-only\n```\n\n\u003e The `--schemas-only` flag is also available for `clean-api-docs:version`.\n\n### Versioning OpenAPI docs\n\nTo generate _all_ versioned OpenAPI docs, run the following command from the root directory of your project:\n\n```bash\nyarn docusaurus gen-api-docs:version \u003cid\u003e:all\n```\n\nExample:\n\n```bash\nyarn docusaurus gen-api-docs:version petstore:all\n```\n\n\u003e This will generate API docs for all of the OpenAPI specification (OAS) files referenced in your `versions` config and will also generate a `versions.json` file.\n\n\u003e Substitute `all` with a specific version ID to generate or clean a specific version. Generating for `all` or a single version ID will automatically update the `versions.json` file.\n\n## Developer Quick Start\n\n\u003e Looking to make a contribution? Make sure to check out our contributing guide.\n\nAfter [forking](https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/fork) the main repository, run the following:\n\n```bash\ngit clone https://github.com/\u003cyour account\u003e/docusaurus-openapi-docs.git\ncd docusaurus-openapi-docs\nyarn\nyarn build-packages\nyarn watch:demo\n```\n\n## Credits\n\nSpecial thanks to [@bourdakos1](https://github.com/bourdakos1) (Nick Bourdakos), the author of [docusaurus-openapi](https://github.com/cloud-annotations/docusaurus-openapi), which this project is heavily based on.\n\nFor more insight into why we decided to completely fork see [#47](https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/pull/47)\n\n## Contributors\n\n\u003ca href=\"https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=PaloAltoNetworks/docusaurus-openapi-docs\" /\u003e\n\u003c/a\u003e\n\n## Support\n\nSee [SUPPORT.md](https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/blob/main/SUPPORT.md) for our support agreement and guidelines.\n\nIf you believe you found a bug or have an idea you'd like to suggest you may [report an issue](https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/issues/new/choose) or [start a discussion](https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/discussions/new/choose).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaloaltonetworks%2Fdocusaurus-openapi-docs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaloaltonetworks%2Fdocusaurus-openapi-docs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaloaltonetworks%2Fdocusaurus-openapi-docs/lists"}