Repository navigation
docs(reference): generate Stacks Blockchain API pages from Hiro's OpenAPI spec - #1891
Conversation
…nAPI spec Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cuevasm
left a comment
There was a problem hiding this comment.
Nice, moving the section onto Hiro's spec will be good.
The current "Blockchain API" pages are really the Dec 2025 node RPC snapshot (Mining, Atlas, Stacker DB etc.), so this fixes the mislabel. I also checked Hiro's Staking tag against our old bitcoin-staking spec: it covers all 10 of our endpoints plus 5 new ones, and ours had already drifted. Good to retire it.
AI review with coaching below:
-
Bitcoin Staking page identity. Hiro uses the
Stakingtag but never declares it in the top-leveltags, so the page will render as plain "Staking" with no description, at/stakinginstead of/bitcoin-staking. The redirect currently sends the old URL to the Blockchain API README, not the new page. Since.gitbook.yamlcan only target files, can we add a site-level redirect in GitBook to/reference/api/stacks-blockchain-api/staking? Longer term, a small upstream PR to declare the tag with a description would fix the title. With Bond 2 coming up, partner materials link to that URL, so I'd like this one sorted before merge. -
Testnet server. Our old spec listed
api.private-1.hiro.soas the Bitcoin Staking testnet. Hiro's only lists mainnet. Partners use that for rehearsals, so let's call it out somewhere. -
Empty tags. Hiro declares
Fees,Names, andStacking Rewardswith zero operations. Can you check the preview? If GitBook renders an empty Fees page, it'll sit on the old slug and thefeesredirect won't fire. -
models: true. Hiro's spec has nocomponents.schemas(everything is inline), so the Models page will be empty. I'd flip it tofalse. -
Validation warnings. GitBook logged ~2.8k warnings processing the spec, mostly the
type: 'null'insideanyOfpattern in a 3.0.3 file. Mesh API has the same class and renders fine, but please eyeball a few endpoints with nullable fields in the preview. -
Source URL. The GitBook spec pulls from
hirosystems/stacks-blockchain-api/main, but the README links tostx-labs/.../master. Same content today, but let's point it at the canonical stx-labs one. -
Cleanup after merge. There's a
stacks-node-rpc-4-0-4-testspec in the org pointing at Hiro's file. It looks like a leftover. Once this is live, let's delete that and retirestacks-blockchain-api-dereferencedandbitcoin-staking.
Happy to approve once 1, 3 and 4 are addressed and the preview looks clean. 2, 6 and 7 can be follow-ups if easier.
…odels page Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@cuevasm thanks for the feedback I addressed 1, 3 and 4 in the latest commit. Preview. There's no GitBook preview on PRs here, so I rendered the computed page list from the 1. Bitcoin Staking. Worse than "plain Staking": GitBook only builds pages for tags declared in 3. Empty tags. Confirmed in the computed list: Fees, Names and Stacking Rewards produce no pages, so the 4. Models. Hiro's 2, 6 and 7 as follow-ups. One more for later: GitBook title-cases the tag as "Proof Of Transfer". |
Description
The Stacks Blockchain API section rendered a static copy of the node RPC spec (Dec 2025) plus a hand-made Bitcoin Staking spec, so it didn't match the API Hiro ships. This points the section at the GitBook spec
stacks-blockchain-api, which pulls Hiro'sopenapi.yamlfromhirosystems/stacks-blockchain-apimainand refreshes automatically. Hiro stays the source of truth.Page changes
.gitbook.yaml