feat(docs): per-method hosted/self-hosted toggle on Group A reference pages (v2.49.2)#979
Conversation
… pages (v2.49.2) Every Group A method (createOrder, buildOrder, submitOrder, cancelOrder, fetchBalance, fetchPositions, fetchOpenOrders, fetchMyTrades, fetchOrder, fetchClosedOrders, fetchAllOrders) now has a synchronized Hosted / Self-hosted tab toggle. Hosted is the default tab; Mintlify syncs tab selection across pages via shared label keys so the choice persists. Added: - 11 shadow MDX files under docs/api-reference/ (one per Group A method) wrapping the existing OpenAPI auto-render in a <Tabs> toggle. - 9 new operations in openapi-hosted.json documenting the trade.pmxt.dev/v0/* surface — build/submit/create/cancel order plus the 5 read endpoints. Each has Python + TypeScript x-codeSamples with the v2.49 hosted constructor shape and error responses covering 401/403/404/410/422/503. - 10 new component schemas referencing existing components from 2.49.1. - docs.json updated so Trading + Orders & Positions sidebar groups point at the shadow MDX slugs. Fixed: - createOrder/buildOrder code-sample JSDoc rot — pages used to show type="market" with price=0.55 (price is only meaningful on limits). PARAM_OVERRIDES in generate-openapi.js now emits coherent limit samples across all 16 venues (64 lines updated). Not addressed (flagged for follow-up): - fetchClosedOrdersHosted / fetchAllOrdersHosted — both raise NotSupported in hosted mode (no underlying endpoint). Shadow MDX surfaces this with a <Warning> linking to fetchMyTrades. - Escrow methods — hosted-only, not in Group A scope. - Generator capability-map omits Hyperliquid/GeminiTitan/Mock — drops their x-codeSamples on regeneration. Merged main retains them from a prior generator run. Real fix is out of scope. Tests: tsc --noEmit clean from core/; all 3 JSON files parse cleanly. Mintlify CLI unavailable locally — cross-page tab sync relies on the documented Mintlify convention (verified post-merge in the deploy).
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
The shadow MDX pages array already enumerates the toggle pages; the openapi: spec reference was causing Mintlify to auto-inject every operation in openapi.json under those groups, polluting the sidebar with 'API Reference / Local Only / Hosted / Data Feeds' sub-groups below the 11 shadow MDX pages.
PR Review: FAILWhat This DoesThis adds manual “Hosted (recommended)” / “Self-hosted” tabs for 11 Group A API reference pages and adds hosted v0 trading operations to Blast RadiusDocs/API-reference only plus the OpenAPI generator sample overrides: 11 new Consumer VerificationBefore (base branch): After (PR branch): However, the hosted operation schemas added to Test Results
Findings
PMXT Pipeline Check
Semver Impactpatch -- documentation/reference-site fix, assuming no published SDK/runtime behavior changes. RiskI could not run Mintlify locally, so the exact rendered failure mode may differ, but the repository evidence is concrete: the new pages contain no schema-rendering component, one schema link is |
…rvice docs: rename 'sidecar' to 'local PMXT service' per 2026-05-27 ADR (v2.49.2) Combined into the same 2.49.2 changelog entry as #979. Published 2.49.0 and 2.49.1 changelog prose intentionally left untouched.
Follow-up to v2.49.1. Adds a synchronized
Hosted (recommended)/Self-hostedtab toggle to every Group A method reference page so customers see the hosted endpoint and v2.49 SDK constructor shape by default, and can flip to the local-sidecar variant in place. Mintlify syncs tab selection across pages via shared label keys.What's in this PR
11 shadow MDX files (
docs/api-reference/{buildOrder,cancelOrder,createOrder,fetchAllOrders,fetchBalance,fetchClosedOrders,fetchMyTrades,fetchOpenOrders,fetchOrder,fetchPositions,submitOrder}.mdx) — each wraps the existing OpenAPI auto-render in a<Tabs>toggle. Tab labels byte-identical across all 11 files for cross-page sync.9 new operations in
openapi-hosted.jsondocumentingtrade.pmxt.dev/v0/*: buildOrderHosted, submitOrderHosted, createOrderHosted, cancelOrderHosted, fetchBalanceHosted, fetchPositionsHosted, fetchOpenOrdersHosted, fetchMyTradesHosted, fetchOrderHosted. Each with Python + TypeScriptx-codeSamples, error coverage 401/403/404/410/422/503, bearer auth.10 new component schemas for the v0 request/response shapes, reusing existing components from 2.49.1.
docs.jsonupdated so Trading + Orders & Positions sidebar groups point at the shadow MDX slugs.JSDoc rot fix:
createOrder/buildOrdercode samples used to showtype="market"withprice=0.55(incoherent — price is limit-only). Replaced with coherent limit samples across all 16 venues viaPARAM_OVERRIDESin the generator.Changelog 2.49.2 entry added.
Not addressed (flagged in changelog)
fetchClosedOrdersHosted/fetchAllOrdersHostedraiseNotSupportedin hosted mode (no underlying endpoint). Shadow MDX surfaces this via<Warning>linking tofetchMyTrades.Test plan
Self-hostedoncreateOrder→ navigate tofetchBalance→ confirm Self-hosted tab is still active (sync)