Skip to content

Add generateSchemas option #1203

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lukedirtwalker
Copy link

This works similar to showSchemas but it doesn't add the schemas to the sidebar. This is useful to generate the schemas and then embed them in other pages as needed.

Description

This changes introduces a new configuration option generateSchemas, to generate openAPI schemas, while not including them in the sidebar.

Motivation and Context

If you have a lot Schema and only selectively want to import the schemas in other pages this is helpful.

How Has This Been Tested?

I manually patched the dependency, set the generateSchemas to true and checked that they were generated.

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist

  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes if appropriate.
  • All new and existing tests passed.

This works similar to showSchemas but it doesn't add the schemas to the
sidebar. This is useful to generate the schemas and then embed them in
other pages as needed.
Copy link

github-actions bot commented Jul 11, 2025

Visit the preview URL for this PR (updated for commit 83cac31):

https://docusaurus-openapi-36b86--pr1203-q5qw1vc0.web.app

(expires Sat, 16 Aug 2025 19:02:03 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: bf293780ee827f578864d92193b8c2866acd459f

@sserrata sserrata closed this Jul 14, 2025
@sserrata sserrata reopened this Jul 14, 2025
@sserrata sserrata closed this Jul 17, 2025
@sserrata sserrata reopened this Jul 17, 2025
@sserrata
Copy link
Member

Hi @lukedirtwalker, thanks for the PR! Do you think this feature/option could be better suited as a CLI command/arg?

Something like:

yarn docusaurus gen-api-docs --schemas-only

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants