removed initial / in validator making paths consistent across validate merger and queryer
This commit is contained in:
@ -92,10 +92,10 @@ impl<'a> ValidationContext<'a> {
|
||||
for (i, sub_schema) in prefix.iter().enumerate() {
|
||||
if i < len {
|
||||
if let Some(child_instance) = arr.get(i) {
|
||||
let mut item_path = format!("{}/{}", self.path, i);
|
||||
let mut item_path = self.join_path(&i.to_string());
|
||||
if let Some(obj) = child_instance.as_object() {
|
||||
if let Some(id_str) = obj.get("id").and_then(|v| v.as_str()) {
|
||||
item_path = format!("{}/{}", self.path, id_str);
|
||||
item_path = self.join_path(id_str);
|
||||
}
|
||||
}
|
||||
let derived = self.derive(
|
||||
@ -118,10 +118,10 @@ impl<'a> ValidationContext<'a> {
|
||||
if let Some(ref items_schema) = self.schema.items {
|
||||
for i in validation_index..len {
|
||||
if let Some(child_instance) = arr.get(i) {
|
||||
let mut item_path = format!("{}/{}", self.path, i);
|
||||
let mut item_path = self.join_path(&i.to_string());
|
||||
if let Some(obj) = child_instance.as_object() {
|
||||
if let Some(id_str) = obj.get("id").and_then(|v| v.as_str()) {
|
||||
item_path = format!("{}/{}", self.path, id_str);
|
||||
item_path = self.join_path(id_str);
|
||||
}
|
||||
}
|
||||
let derived = self.derive(
|
||||
|
||||
Reference in New Issue
Block a user