chartml_core/spec/
params.rs1use serde::{Deserialize, Serialize};
2
3use super::chart::LayoutSpec;
4
5#[derive(Debug, Clone, Deserialize, Serialize)]
6#[serde(rename_all = "camelCase")]
7pub struct ParamsSpec {
8 pub version: u32,
9 pub name: Option<String>,
10 pub params: Vec<ParamDef>,
11}
12
13#[derive(Debug, Clone, Deserialize, Serialize)]
14#[serde(rename_all = "camelCase")]
15pub struct ParamDef {
16 pub id: String,
17 #[serde(rename = "type")]
18 pub param_type: String,
19 pub label: String,
20 pub options: Option<Vec<String>>,
21 pub default: Option<serde_json::Value>,
22 pub placeholder: Option<String>,
23 pub layout: Option<LayoutSpec>,
24}