rohit-gohri / redocusaurus

OpenAPI for Docusaurus with Redoc
https://redocusaurus.vercel.app/
MIT License
600 stars 111 forks source link

Auto load folder to generate plugin config #342

Closed rohit-gohri closed 4 months ago

rohit-gohri commented 4 months ago

Closes #150

Add support for openapi option, example:


presets: [
      '@docusaurus/preset-classic',
    [
      'redocusaurus',
      {
        // This will automatically load all spec files with `.openapi.yaml` or `.openapi.json` suffix and generate route/ids for it based on file path
        openapi: {
          folder: 'openapi',
          routeBasePath: '/api
        },
        theme: {
          /**
           * Highlight color for docs
           */
           primaryColor: '#1890ff',
        },
      },
    ]
  ],
changeset-bot[bot] commented 4 months ago

🦋 Changeset detected

Latest commit: f259a9a939710e7b2c4c59f378c00ee5f5be2f50

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages | Name | Type | | ----------------------- | ----- | | docusaurus-plugin-redoc | Minor | | redocusaurus | Minor |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

vercel[bot] commented 4 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
redocusaurus ✅ Ready (Inspect) Visit Preview Mar 8, 2024 7:06pm
github-actions[bot] commented 4 months ago

This pull request is automatically built and it is testable by installing redocusaurus@v0.0.0-test-20240308190745.

For commit 0e03435025738dc21023480760ce258c3b02acfe.