added limit 1 to arrays treated as a single value in schemas
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
use crate::drop::{Error, ErrorDetails};
|
||||
use serde_json::Value;
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use indexmap::IndexMap;
|
||||
|
||||
pub fn compose(val: &mut Value, errors: &mut Vec<Error>) {
|
||||
let mut traits = HashMap::new();
|
||||
@ -114,7 +115,7 @@ fn resolve_in_place(
|
||||
if visited.contains(inc_name) {
|
||||
errors.push(Error {
|
||||
code: "CIRCULAR_INCLUDE_DETECTED".to_string(),
|
||||
values: Some(HashMap::from([(
|
||||
values: Some(IndexMap::from([(
|
||||
"include".to_string(),
|
||||
inc_name.to_string(),
|
||||
)])),
|
||||
@ -218,7 +219,7 @@ fn resolve_in_place(
|
||||
} else {
|
||||
errors.push(Error {
|
||||
code: "TRAIT_NOT_FOUND".to_string(),
|
||||
values: Some(HashMap::from([(
|
||||
values: Some(IndexMap::from([(
|
||||
"include".to_string(),
|
||||
inc_name.to_string(),
|
||||
)])),
|
||||
|
||||
Reference in New Issue
Block a user