types at root not strict

This commit is contained in:
2025-09-30 20:44:17 -04:00
parent 61511b595d
commit d301d5fab9

View File

@ -304,7 +304,7 @@ fn validate_json_schema(schema_id: &str, instance: JsonB) -> JsonB {
Some(schema) => { Some(schema) => {
let instance_value: Value = instance.0; let instance_value: Value = instance.0;
let options = match schema.t { let options = match schema.t {
SchemaType::Type | SchemaType::PublicPunc => Some(ValidationOptions { be_strict: true }), SchemaType::PublicPunc => Some(ValidationOptions { be_strict: true }),
_ => None, _ => None,
}; };
@ -394,7 +394,7 @@ fn collect_errors(error: &ValidationError, errors_list: &mut Vec<Error>) {
ErrorKind::AnyOf => handle_any_of_error(&base_path), ErrorKind::AnyOf => handle_any_of_error(&base_path),
ErrorKind::OneOf(matched) => handle_one_of_error(&base_path, matched), ErrorKind::OneOf(matched) => handle_one_of_error(&base_path, matched),
}; };
errors_list.extend(errors_to_add); errors_list.extend(errors_to_add);
} }