refactor: updated a few keywords
This commit is contained in:
parent
9e2a19d56e
commit
4d230a1591
9 changed files with 76 additions and 14 deletions
|
|
@ -5,7 +5,7 @@ pub const TEMPLATE: &str = r#"
|
|||
transforms = []
|
||||
subobjects = []
|
||||
conditions = []
|
||||
duplicates = false
|
||||
array = false
|
||||
"#;
|
||||
|
||||
pub fn validate(obj: &ObjectInstance) -> Result<(), String> {
|
||||
|
|
|
|||
|
|
@ -8,19 +8,19 @@ conditions = [
|
|||
["input.variant", "subobject"]
|
||||
["input.variant", "custom"]
|
||||
]
|
||||
duplicates = false
|
||||
array = false
|
||||
|
||||
[input.from]
|
||||
transforms = ["meta/text:value"]
|
||||
subobjects = []
|
||||
conditions = []
|
||||
duplicates = true
|
||||
array = true
|
||||
|
||||
[input.to]
|
||||
transforms = ["meta/text:value"]
|
||||
subobjects = []
|
||||
conditions = []
|
||||
duplicates = true
|
||||
array = true
|
||||
|
||||
[input.property]
|
||||
transforms = ["meta/text:value"]
|
||||
|
|
@ -29,7 +29,7 @@ conditions = [
|
|||
["input.variant", "transform"]
|
||||
["input.variant", "subobject"]
|
||||
]
|
||||
duplicates = false
|
||||
array = false
|
||||
|
||||
[input.value]
|
||||
transforms = ["meta/text:value"]
|
||||
|
|
@ -37,5 +37,5 @@ subobjects = []
|
|||
conditions = [
|
||||
["input.variant", "custom"]
|
||||
]
|
||||
duplicates = false
|
||||
array = false
|
||||
"#;
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@ pub const TEMPLATE: &str = r#"
|
|||
transforms = ["meta/text:value"]
|
||||
subobjects = []
|
||||
conditions = []
|
||||
duplicates = false
|
||||
array = false
|
||||
"#;
|
||||
|
|
|
|||
|
|
@ -8,13 +8,13 @@ pub const TEMPLATE: &str = r#"
|
|||
transforms = []
|
||||
subobjects = []
|
||||
conditions = []
|
||||
duplicates = false
|
||||
array = false
|
||||
|
||||
[local.length]
|
||||
transforms = ["meta/number:value"]
|
||||
subobjects = []
|
||||
conditions = []
|
||||
duplicates = false
|
||||
array = false
|
||||
"#;
|
||||
|
||||
pub const TEMPLATE_LOCAL: &str = r#"
|
||||
|
|
|
|||
|
|
@ -8,13 +8,13 @@ pub const TEMPLATE: &str = r#"
|
|||
transforms = []
|
||||
subobjects = []
|
||||
conditions = []
|
||||
duplicates = false
|
||||
array = false
|
||||
|
||||
[local.length]
|
||||
transforms = ["meta/number:value"]
|
||||
subobjects = []
|
||||
conditions = []
|
||||
duplicates = false
|
||||
array = false
|
||||
"#;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use std::collections::HashMap;
|
|||
|
||||
#[derive(Serialize, Deserialize, Debug, Default, Clone)]
|
||||
pub struct ObjectInstance {
|
||||
pub variant: usize,
|
||||
pub version: usize,
|
||||
pub plotted: bool,
|
||||
pub created: String,
|
||||
pub edited: String,
|
||||
|
|
@ -42,7 +42,7 @@ pub struct ObjectTemplateProperty {
|
|||
pub transforms: Vec<String>,
|
||||
pub subobjects: Vec<String>,
|
||||
pub conditions: Vec<[String; 2]>,
|
||||
pub duplicates: bool
|
||||
pub array: bool
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug, Default)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue