Skip to content

Commit

Permalink
Filter to only matched paths
Browse files Browse the repository at this point in the history
  • Loading branch information
w4ll3 committed Jan 17, 2025
1 parent 1f0631a commit bdfe628
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/core/input_descriptor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -537,10 +537,17 @@ impl ConstraintsField {
.flat_map(|path| path.query(value).all())
.collect::<Vec<&'a serde_json::Value>>();

let raw_path = self
.path
.iter()
.flat_map(|p| p.query_located(value).all())
.map(|e| e.location().to_string())
.collect::<Vec<_>>();

RequestedField {
id: uuid::Uuid::new_v4(),
name: self.name.clone(),
path: self.path.iter().map(|j| j.to_string()).collect(),
path: raw_path,
required: self.is_required(),
retained: self.intent_to_retain,
purpose: self.purpose.clone(),
Expand Down

0 comments on commit bdfe628

Please sign in to comment.