Skip to content

feat: Create Snaps API documentation from generated schema#2702

Draft
Mrtenz wants to merge 8 commits intomainfrom
mrtenz/dynamic-snaps-docs
Draft

feat: Create Snaps API documentation from generated schema#2702
Mrtenz wants to merge 8 commits intomainfrom
mrtenz/dynamic-snaps-docs

Conversation

@Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Feb 12, 2026

Description

This adds a Docusaurus plugin for dynamically generating Snaps API documentation from a schema file. The schema file will be generated automatically based on the implementations in MetaMask/snaps. This allows for easier maintenance of the documentation, as some methods have become quite outdated currently.

The plugin works by fetching the schema file, and writing a new MDX file to disk for each JSON-RPC method. I've considered a similar approach to the Wallet API documentation, but it had several drawbacks, like needing to hack the sidebar to show the dynamic items. By generating the MDX files before running Docusaurus, @docusaurus/plugin-content-docs will just pick it up as any other documentation page.

Related to: https://consensyssoftware.atlassian.net/browse/WPC-347

Preview

Checklist

  • If this PR updates or adds documentation content that changes or adds technical meaning, it has received an approval from an engineer or DevRel from the relevant team.
  • If this PR updates or adds documentation content, it has received an approval from a technical writer.

External contributor checklist

  • I've read the contribution guidelines.
  • I've created a new issue (or assigned myself to an existing issue) describing what this PR addresses.

@vercel
Copy link

vercel bot commented Feb 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
metamask-docs Ready Ready Preview, Comment Feb 13, 2026 1:42pm

Request Review

@socket-security
Copy link

socket-security bot commented Feb 12, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedreact-markdown@​10.1.09910010086100

View full report

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.

1 participant