1
0
Fork 0
forked from wry/wry

toml-config: add named actions

This commit is contained in:
Julian Orth 2025-04-25 17:18:49 +02:00
parent 8552c5f1eb
commit 3100773ae0
15 changed files with 587 additions and 4 deletions

View file

@ -159,6 +159,8 @@ fn create_string_spec(description: &str, spec: &StringSpec) -> Value {
if let Some(values) = &spec.values {
let strings: Vec<_> = values.iter().map(|v| &v.value.value).collect();
res.insert("enum".into(), json!(strings));
} else if let Some(pattern) = &spec.pattern {
res.insert("pattern".into(), json!(pattern));
}
res.into()
}