OpenRPC
Turn your procedures into an OpenRPC document you can inspect in the playground.
toOpenRpc(router) walks procedures into an OpenRPC document. Input/output schemas are used when the Standard Schema exposes jsonSchema; otherwise true. Methods list the JSON-RPC + app error codes.
Paste the document into the OpenRPC Playground to inspect methods and schemas.
const const spec: OpenRpcDocumentspec = function toOpenRpc(router: AnyRouter, opts?: OpenRpcOptions): OpenRpcDocumenttoOpenRpc(const router: {
ping: ProcedureDef<{}, undefined, "pong">;
}
router, {
title: stringtitle: "My API",
version: stringversion: "1.0.0",
servers?: OpenRpcServer[] | undefinedservers: [{ url: stringurl: "https://api.example.com" }],
});