-
Notifications
You must be signed in to change notification settings - Fork 1
Christian/docs deployment step for gen #23
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
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.
Performed full review of 8705772...64e0b9f
8 files reviewed | 0 comments | Review on Mesa | Edit Reviewer Settings
This is 🔥 Prob need the ability to override some params (like for the async invoke call example) and only want to show typescript/python This is perfect tho, wonder how it will affect local dev is the only question, since we shouldn't be committing the generated code replacements. |
Another thought on this as I just started playing around with ideas:
So instead of using something like this:
We would generate the reusable snippets and then import them like this:
Let me know your thoughts on this @heyglassy |
Check out this branch I threw up with some vibed code on the reusable snippets: https://github.com/onkernel/docs/tree/mason/autogenerated-openapi-reusable-code-snippets |
…nkernel/docs into christian/docs_deployment_step_for_gen
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.
LGTM
Description
Please provide an explanation of the changes you've made:
[Describe what this PR does and why]
Implementation Checklist
Testing
mintlify dev
works (see installation here)Docs
Visual Proof
Please provide a screenshot or video demonstrating that your changes work locally:
[Drag and drop your screenshot/video here or use the following format:]
]
[
Related Issue
Fixes [Github issue link]
[If this corresponds to a fix from another Kernel OSS repo, include this:]
Fixes [Link to other repo]
[Replace with actual issue link, e.g., Fixes https://github.com/username/repo/issues/123]
Additional Notes
[Any additional context, concerns, or notes for reviewers]
TL;DR
Automated API documentation updates by extracting code samples from OpenAPI specs using a new Bun-based script and a GitHub Action.
Why we made these changes
To streamline and automate the process of keeping documentation, specifically API code examples, in sync with API changes, reducing manual effort and improving accuracy.
What changed?
.github/workflows/generate_code_snippets.yaml
) to automatically generate, commit, and push code samples on branch updates (excludingmain
)..github/scripts/generate_code_samples.ts
) and its associated configuration (package.json
,tsconfig.json
,bun.lock
,.gitignore
,code_samples.config.json
). This script extractsx-codeSamples
from OpenAPI specs, supporting dynamic overrides and generating standalone MDX snippets..mdx
documentation files (e.g.,apps/*.mdx
,browsers/*.mdx
) to consume auto-generated code snippets from thesnippets/openapi/
directory via new placeholder syntax and reusable MDX components, replacing inline code examples..mdx
files undersnippets/openapi/
(e.g.,post-browsers.mdx
,delete-browsers.mdx
,get-deployments.mdx
) were added or updated to store the generated code samples.README.md
with sections on 'Code Snippets' and 'Local Development' related to this automation.Description generated by Mesa. Update settings