-
Notifications
You must be signed in to change notification settings - Fork 31
Docs: auto generate plugin schema reference #1770
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
Conversation
Hello! 👋 This repository uses Auto for releasing packages using PR labels. ✨ This PR can be merged. It will not be considered when calculating future versions of the npm packages and will not appear in the changelogs. |
02b4b94
to
32be476
Compare
26b0be2
to
1f7bdfd
Compare
I actually like it better this way 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
What this PR does / why we need it:
This PR downloads the plugins-schema and generates markdown from the schema using jsonschema2mk.
LIMITATIONS
This approach unfortunately comes with a small (or big, depends how you feel) limitation and that is the linking from tables to headers are based on full paths of properties in the json schema. This means that the Docusaurus quick links and headers in the document show the full path to properties. I've tried different approaches by customizing different
partials
but I think we would need to hook into extensions to make the links unique because for exampleexposedcomponents
appears twice in the document.Which issue(s) this PR fixes:
Fixes #1651 , #1650
Special notes for your reviewer:
Passing runs here https://github.com/grafana/plugin-tools/actions/runs/14875523629/job/41772019976?pr=1770 and here https://github.com/grafana/plugin-tools/actions/runs/14875523629/job/41772019976?pr=1770 look for
Markdown generation complete!
in theBuild documentation website (Dev Portal)
stepDeployed the latest commit to DEV bucket so you can test
To test this PR:
npm ci
npm run docs:clear
DEV_PORTAL_ENV=dev npm run docs:build
, shouldn't create any build errors ✅npm run docs
, should render a new Metadata (plugin.json) page that is in sync with plugin schema ✅