This tool is in early stages and the interface is expected to change significantly.
Prim+RPC includes tools to generate RPC-specific documentation. It does this by reusing your existing TypeDoc documentation for your TypeScript or JavaScript code and converts this into a simpler version that documents functions as it relates to RPC.
The first step is to generate TypeDoc documentation for your code. This can be done by running the following command in your project:
Now you may execute this utility on the result:
The resulting documentation is a simpler version of the TypeDoc that relates to RPC. This output could be used for a documentation website or fed to another tool like HTTPsnippet to generate requests for other clients outside of JavaScript.
In the future, basic JavaScript types will be turned into JSON Schema for typed usage outside of TypeScript. It’s not planned to support all TypeScript types in RPC documentation since it doesn’t make sense to use them outside of TypeScript but basic JSON Schema support could be useful for using Prim+RPC outside of JavaScript environments.