Skip to content

Conversation

@sserrata
Copy link
Member

Description

Alternative implementation to #1203. Adds CLI option for generating only schemas to the specified output directory.

Motivation and Context

In support of use cases where users only need/want the schemas to be generated without having to modify the plugin config for the given API.

How Has This Been Tested?

TBD

Types of changes

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

@sserrata sserrata self-assigned this Sep 22, 2025
@sserrata sserrata added the enhancement New feature or request label Sep 22, 2025
@github-actions
Copy link

github-actions bot commented Sep 22, 2025

Visit the preview URL for this PR (updated for commit 3b976e7):

https://docusaurus-openapi-36b86--pr1228-w0mzayhy.web.app

(expires Sun, 18 Jan 2026 19:35:24 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: bf293780ee827f578864d92193b8c2866acd459f

@sserrata
Copy link
Member Author

sserrata commented Oct 7, 2025

Test results:

Generate schemas for single version

docusaurus gen-api-docs petstore --schemas-only

Successfully created "docs/petstore/schemas"
Successfully created "docs/petstore/apiresponse.schema.mdx"
Successfully created "docs/petstore/cat.schema.mdx"
Successfully created "docs/petstore/category.schema.mdx"
Successfully created "docs/petstore/dog.schema.mdx"
Successfully created "docs/petstore/honeybee.schema.mdx"
Successfully created "docs/petstore/id.schema.mdx"
Successfully created "docs/petstore/order.schema.mdx"
Successfully created "docs/petstore/pet.schema.mdx"
Successfully created "docs/petstore/tag.schema.mdx"
Successfully created "docs/petstore/user.schema.mdx"
✨  Done in 1.74s.

Generate schemas for multiple versions

docusaurus gen-api-docs petstore_versioned --schemas-only --all-versions

Successfully created "docs/petstore_versioned/schemas"
Successfully created "docs/petstore_versioned/apiresponse.schema.mdx"
Successfully created "docs/petstore_versioned/cat.schema.mdx"
Successfully created "docs/petstore_versioned/category.schema.mdx"
Successfully created "docs/petstore_versioned/dog.schema.mdx"
Successfully created "docs/petstore_versioned/honeybee.schema.mdx"
Successfully created "docs/petstore_versioned/id.schema.mdx"
Successfully created "docs/petstore_versioned/order.schema.mdx"
Successfully created "docs/petstore_versioned/pet.schema.mdx"
Successfully created "docs/petstore_versioned/tag.schema.mdx"
Successfully created "docs/petstore_versioned/user.schema.mdx"
Successfully created "docs/petstore_versioned/versions.json"
Successfully created "docs/petstore_versioned/1.0.0/schemas"
Successfully created "docs/petstore_versioned/1.0.0/apiresponse.schema.mdx"
Successfully created "docs/petstore_versioned/1.0.0/cat.schema.mdx"
Successfully created "docs/petstore_versioned/1.0.0/category.schema.mdx"
Successfully created "docs/petstore_versioned/1.0.0/dog.schema.mdx"
Successfully created "docs/petstore_versioned/1.0.0/bee.schema.mdx"
Successfully created "docs/petstore_versioned/1.0.0/id.schema.mdx"
Successfully created "docs/petstore_versioned/1.0.0/order.schema.mdx"
Successfully created "docs/petstore_versioned/1.0.0/pet.schema.mdx"
Successfully created "docs/petstore_versioned/1.0.0/tag.schema.mdx"
Successfully created "docs/petstore_versioned/1.0.0/user.schema.mdx"
✨  Done in 2.31s.

sserrata and others added 2 commits December 19, 2025 13:22
- Add --schemas-only option to clean-api-docs command
- Add --schemas-only option to clean-api-docs:version command
- When --schemas-only is used, only the schemas/ directory is cleaned
- API, info, tag docs and sidebar files are left untouched
- Update documentation in all README files
@sserrata sserrata force-pushed the codex/implement-cli-command-for-schema-generation branch from 013a591 to ae2af54 Compare December 19, 2025 19:29
@sserrata sserrata merged commit 0726d80 into PaloAltoNetworks:main Dec 19, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant