@paloaltonetworks/docusaurus-plugin-openapi
TypeScript icon, indicating that this package has built-in type declarations

18.0.0-beta.2 • Public • Published

Docusaurus OpenAPI

OpenAPI plugin for generating API reference docs in Docusaurus v2.

Multiple OpenAPI Definitions

To have more than one OpenAPI pages, add additional OpenAPI plugin instances:

/* docusaurus.config.js */

{
  presets: [
    [
      'docusaurus-preset-openapi',
      {
        api: {
          // id: 'cars', // omitted => default instance
          path: 'cars/openapi.json',
          routeBasePath: 'cars',
          // ... other options
        },
      },
    ],
  ],
  plugins: [
    [
      'docusaurus-plugin-openapi',
      {
        id: 'trains',
        path: 'trains/openapi.json',
        routeBasePath: 'trains',
        // ... other options
      },
    ],
    [
      'docusaurus-plugin-openapi',
      {
        id: 'bikes',
        path: 'bikes/openapi.json',
        routeBasePath: 'bikes',
        // ... other options
      },
    ],
  ],
}

This will create routes for /cars, /trains and /bikes.

Note: One instance of the plugin is included in the preset. All additional plugin instances will require an id.

Readme

Keywords

none

Package Sidebar

Install

npm i @paloaltonetworks/docusaurus-plugin-openapi

Weekly Downloads

0

Version

18.0.0-beta.2

License

MIT

Unpacked Size

183 kB

Total Files

89

Last publish

Collaborators

  • sserrata
  • csestito
  • btorresgil
  • xhoms