-
Notifications
You must be signed in to change notification settings - Fork 4.5k
[docs] new JSON RPC API docs format #29772
[docs] new JSON RPC API docs format #29772
Conversation
There's a number of broken links on the page due to pointing to |
@jacobcreech Incorrect links have been fixed. Including the final removal of the I think the sidebar change is a bit annoying, but the best case. Since the new RPC API sidebar is so large and different, having all of the RPC methods also displayed on the regular developer sidebar would be far too cumbersome. In the future, the developers sidebar will be slimmed down to help minimize the visual page change |
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.
Awesome work! In regards to the page switching on us between developers -> RPC, we should consider making RPC API its own thing as part of #29744
Pull request has been modified.
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.
Thanks for the update! Looking forward to seeing how this does
* feat: added api page * fix: api redirects * feat: websocket page and partials * feat: deprectated partials * feat: http method partials * fix: more deprecated partials * feat: codeblock component and styles * feat: api http methods page * feat: sidebar * refactor: proposal api links * refactor: internal linking * refactor: more internal links * refactor: internal link and note cards * refactor: local links * refactor: local links and auto save prettier * feat: added numNonVoteTransaction data details * fix: updated getRecentPrioritizationFees * fix: corrected wording * fix: version typo * fix: commitment links * fix: parsed response links * fix: dangling links * refactor: filter criteria * docs: removed jsonrpc-api.md file * fix: dangling links * style: removed whitespaces for CI * style: removed whitespace * style: fixed whitespaces (cherry picked from commit 9b27002) # Conflicts: # docs/src/developing/clients/jsonrpc-api.md # docs/src/developing/transaction_confirmation.md # docs/src/developing/versioned-transactions.md
* feat: added api page * fix: api redirects * feat: websocket page and partials * feat: deprectated partials * feat: http method partials * fix: more deprecated partials * feat: codeblock component and styles * feat: api http methods page * feat: sidebar * refactor: proposal api links * refactor: internal linking * refactor: more internal links * refactor: internal link and note cards * refactor: local links * refactor: local links and auto save prettier * feat: added numNonVoteTransaction data details * fix: updated getRecentPrioritizationFees * fix: corrected wording * fix: version typo * fix: commitment links * fix: parsed response links * fix: dangling links * refactor: filter criteria * docs: removed jsonrpc-api.md file * fix: dangling links * style: removed whitespaces for CI * style: removed whitespace * style: fixed whitespaces
* [docs] new JSON RPC API docs format (#29772) * feat: added api page * fix: api redirects * feat: websocket page and partials * feat: deprectated partials * feat: http method partials * fix: more deprecated partials * feat: codeblock component and styles * feat: api http methods page * feat: sidebar * refactor: proposal api links * refactor: internal linking * refactor: more internal links * refactor: internal link and note cards * refactor: local links * refactor: local links and auto save prettier * feat: added numNonVoteTransaction data details * fix: updated getRecentPrioritizationFees * fix: corrected wording * fix: version typo * fix: commitment links * fix: parsed response links * fix: dangling links * refactor: filter criteria * docs: removed jsonrpc-api.md file * fix: dangling links * style: removed whitespaces for CI * style: removed whitespace * style: fixed whitespaces (cherry picked from commit 9b27002) # Conflicts: # docs/src/developing/clients/jsonrpc-api.md # docs/src/developing/transaction_confirmation.md # docs/src/developing/versioned-transactions.md * rm docs/src/developing/clients/jsonrpc-api.md * fix docs/src/developing/versioned-transactions.md --------- Co-authored-by: Nick Frostbutter <[email protected]> Co-authored-by: yihau <[email protected]>
…ana-labs#29939) * [docs] new JSON RPC API docs format (solana-labs#29772) * feat: added api page * fix: api redirects * feat: websocket page and partials * feat: deprectated partials * feat: http method partials * fix: more deprecated partials * feat: codeblock component and styles * feat: api http methods page * feat: sidebar * refactor: proposal api links * refactor: internal linking * refactor: more internal links * refactor: internal link and note cards * refactor: local links * refactor: local links and auto save prettier * feat: added numNonVoteTransaction data details * fix: updated getRecentPrioritizationFees * fix: corrected wording * fix: version typo * fix: commitment links * fix: parsed response links * fix: dangling links * refactor: filter criteria * docs: removed jsonrpc-api.md file * fix: dangling links * style: removed whitespaces for CI * style: removed whitespace * style: fixed whitespaces (cherry picked from commit 9b27002) # Conflicts: # docs/src/developing/clients/jsonrpc-api.md # docs/src/developing/transaction_confirmation.md # docs/src/developing/versioned-transactions.md * rm docs/src/developing/clients/jsonrpc-api.md * fix docs/src/developing/versioned-transactions.md --------- Co-authored-by: Nick Frostbutter <[email protected]> Co-authored-by: yihau <[email protected]>
Problem
The JSON RPC API docs are difficult to navigate and consume. It should be easier to see the actual method docs and examples of how to use the method.
Changes
/api
landing page (see picture below)src/api
)http
andwebsocket
methods have been moved to different pages/api
pages to show only the methods related to the current viewed page (e.g. http or websocket methods)space
value returned for accounts to the API docsNOTE:
This updated display method will also pave the way to enable the core docs to have each of the client API docs on the same page, with a client "language" selector the user can use to view all the respective API docs for each client (e.g. JSON RPC via cURL, JavaScript, Rust)
Workflow for adding/updating RPC method doc pages
Making updates to the individual docs for each method will be inside of their respective "partial" MDX file, located in the respective
src/api
folder. See this example of thegetAccountInfo
method doc for referenceEach of these markdown "partials" will be linked withing the corresponding api doc page (similar to importing a component in React, per the Docusaurus docs). Here is an example for the
getAccountInfo
methodScreenshot of the proposed new format:
API home page (located at url
/api
)Example of the "side-by-side" view (this example is located at
/api/http#getaccountinfo
)Read more "details" component expanded: