Add generateSchemas option#1203
Conversation
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.
|
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 |
|
Hi @lukedirtwalker, thanks for the PR! Do you think this feature/option could be better suited as a CLI command/arg? Something like: |
|
Hi @sserrata, a CLI arg would also work. I took inspiration how If you prefer a CLI arg I can change it. |
Yeah, my thought is to provide an option that decouples the schema generation entirely, to provide more flexibility. Like, for example, maybe your plugin config has |
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
Checklist