Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto load folder to generate plugin config #342

Merged
merged 4 commits into from
Mar 8, 2024

Conversation

rohit-gohri
Copy link
Owner

@rohit-gohri rohit-gohri commented Mar 8, 2024

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',
        },
      },
    ]
  ],

Copy link

changeset-bot bot commented Mar 8, 2024

🦋 Changeset detected

Latest commit: f259a9a

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

Copy link

vercel bot commented Mar 8, 2024

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

Copy link
Contributor

github-actions bot commented Mar 8, 2024

This pull request is automatically built and it is testable by installing [email protected].

For commit 0e03435025738dc21023480760ce258c3b02acfe.

@rohit-gohri rohit-gohri merged commit 646c5e1 into main Mar 8, 2024
6 of 7 checks passed
@rohit-gohri rohit-gohri deleted the feature/auto-load-folder branch March 8, 2024 23:59
@github-actions github-actions bot mentioned this pull request Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

Load openapi folder automatically and create corresponding pages
1 participant