mirror of
https://github.com/chatmail/core.git
synced 2026-04-19 06:26:30 +03:00
feat(jsonrpc): generate OpenRPC definitions
When running `cargo test` in the deltachat-jsonrpc folder, a new file `openrpc/openrpc.json` will be created with an [OpenRPC](https://spec.open-rpc.org/) definition. It can be copy-pasted into the [OpenRPC playground](https://playground.open-rpc.org/) and used to generate clients in other languages.
This commit is contained in:
committed by
link2xt
parent
b9b0d20e8d
commit
5b435d11c7
@@ -144,7 +144,11 @@ impl CommandApi {
|
||||
}
|
||||
}
|
||||
|
||||
#[rpc(all_positional, ts_outdir = "typescript/generated")]
|
||||
#[rpc(
|
||||
all_positional,
|
||||
ts_outdir = "typescript/generated",
|
||||
openrpc_outdir = "openrpc"
|
||||
)]
|
||||
impl CommandApi {
|
||||
/// Test function.
|
||||
async fn sleep(&self, delay: f64) {
|
||||
|
||||
Reference in New Issue
Block a user