Socket
Socket
Sign inDemoInstall

docusaurus-plugin-openapi

Package Overview
Dependencies
933
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    docusaurus-plugin-openapi

OpenAPI plugin for Docusaurus.


Version published
Maintainers
1
Created

Changelog

Source

0.7.4 (Apr 1, 2024)

Bug Fixes for Docusaurus 3.2.0 upgrade (#283)

  • addLeadingSlash and addTrailingSlash are now imported from @docusaurus/utils-common
  • Omit showLastUpdateAuthor and showLastUpdateTime from PluginOptions
  • Updated toNav function to handle nav.menu items that now have a role of button instead of link
  • Updated Docusaurus version to 3.2.0

Readme

Source

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.

FAQs

Last updated on 03 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc