Repository navigation
Generate RPC method pages from the OpenRPC specs - #3058
Merged
Merged
Conversation
…entsXdr link Rebuild the specs, which also picks up the SEP-12 link change from stellar#2447 in the Anchor Platform spec. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Add `pnpm rpcspec:docs`, which rewrites the generated part of each method page, and `pnpm rpcspec:check`, which CI runs to catch stale specs or pages. Regenerating fixes the Anchor Platform page descriptions and adds item descriptions to array fields. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the OpenRPC method page generator that was deferred during the Mintlify migration, and a CI check that keeps the specs and method pages in sync with the spec sources.
Generator
openrpc/scripts/docs.mjsrenders each method in the built specs (stellar-rpc,stellar-rpc-beta, andanchor-platform) into its page. It rewrites only the part between therpc-methodcomments and leaves the frontmatter and hand-written prose alone.docs.jsonand the methods index page in both cases.pnpm rpcspec:docsregenerates the pages.pnpm rpcspec:docs --checklists out-of-date pages without writing them, and is now part ofpnpm check.pnpm rpcspec:checkrebuilds the specs and fails if the committed specs or pages differ from what the sources produce. Themintlify-checksworkflow runs it.openrpc/README.md, and the Anchor Platform contributor guide now give the real command instead of "ask a maintainer".Against the existing specs, the generator reproduces all 36 current method pages, apart from the changes listed below.
Page changes
description: "<RpcMethod"in their frontmatter. They now use each method's summary.TopicFilterandSegmentMatcherrules ongetEvents, the AND rule forqueryEventsfilters,LedgerKeyongetLedgerEntries, and thecontractEventsXdritems.<br />ongetVersionInfois removed.Spec fixes (first commit)
notify_transaction_recoverywas named with a trailing space.topicfield ofgetEventsresult events referencedTopicFilter, the request filter type, so filter wildcard rules would render on a response field. It's now an array of strings, which is the same type.contractEventsXdritem description had a nested, broken Markdown link.Checks
pnpm rpcspec:check,pnpm check:mdx,pnpm check:pad, andpnpm validatepass.--checkfails on a hand edit inside the generated part and on an orphaned page.🤖 Generated with Claude Code