diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..69c8781 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "cSpell.words": ["CHAPI"] +} diff --git a/src/core/input_descriptor.rs b/src/core/input_descriptor.rs index f404d4c..3655df4 100644 --- a/src/core/input_descriptor.rs +++ b/src/core/input_descriptor.rs @@ -537,9 +537,17 @@ impl ConstraintsField { .flat_map(|path| path.query(value).all()) .collect::>(); + let raw_path = self + .path + .iter() + .flat_map(|p| p.query_located(value).all()) + .map(|e| e.location().to_string()) + .collect::>(); + RequestedField { id: uuid::Uuid::new_v4(), name: self.name.clone(), + path: raw_path, required: self.is_required(), retained: self.intent_to_retain, purpose: self.purpose.clone(), @@ -666,6 +674,7 @@ pub struct RequestedField<'a> { // The name property is optional, since it is also // optional on the constraint field. pub name: Option, + pub path: Vec, pub required: bool, pub retained: bool, pub purpose: Option,