Add special case for object trees.
This commit is contained in:
@@ -15,8 +15,14 @@ use crate::types::AffiliatedKeywords;
|
||||
pub enum AdditionalPropertyValue {
|
||||
SingleString(String),
|
||||
ListOfStrings(Vec<String>),
|
||||
OptionalPair { optval: Option<String>, val: String },
|
||||
ObjectTree(Vec<(Option<Vec<WasmAstNode>>, Vec<WasmAstNode>)>),
|
||||
OptionalPair {
|
||||
optval: Option<String>,
|
||||
val: String,
|
||||
},
|
||||
ObjectTree {
|
||||
#[serde(rename = "object-tree")]
|
||||
object_tree: Vec<(Option<Vec<WasmAstNode>>, Vec<WasmAstNode>)>,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Default)]
|
||||
@@ -84,7 +90,7 @@ to_wasm!(
|
||||
ret.push((converted_optval, converted_value));
|
||||
}
|
||||
|
||||
AdditionalPropertyValue::ObjectTree(ret)
|
||||
AdditionalPropertyValue::ObjectTree { object_tree: ret }
|
||||
}
|
||||
};
|
||||
additional_properties
|
||||
|
||||
Reference in New Issue
Block a user