feat: with further rust build actions

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2024-10-26 00:23:17 +02:00
parent db49af5fa2
commit 326a43e93c
6 changed files with 460 additions and 26 deletions

View File

@@ -20,6 +20,11 @@ struct ActionSchema<'a> {
description: Option<&'a str>,
}
#[derive(Clone, Debug, Serialize)]
struct ActionsSchema<'a> {
actions: Vec<ActionSchema<'a>>,
}
#[derive(Default)]
pub struct CuddleActions {
actions: BTreeMap<String, Action>,
@@ -113,7 +118,7 @@ impl CuddleActions {
})
.collect::<Vec<_>>();
let output = serde_json::to_string_pretty(&schema)?;
let output = serde_json::to_string_pretty(&ActionsSchema { actions: schema })?;
Ok(output)
}