added filter base type

This commit is contained in:
2026-04-24 12:53:28 -04:00
parent e45265b242
commit c8757e1709
2 changed files with 11 additions and 7 deletions

View File

@ -34,7 +34,7 @@ impl Schema {
if let Some(mut inline_schema) = structural_filter {
inline_schema.obj.type_ = Some(SchemaTypeOrArray::Multiple(vec![
"object".to_string(),
"filter".to_string(),
"null".to_string(),
]));
@ -104,8 +104,8 @@ impl Schema {
}
let mut wrapper_obj = SchemaObject::default();
// Filters are just plain objects containing conditions, no inheritance required
wrapper_obj.type_ = Some(SchemaTypeOrArray::Single("object".to_string()));
// Filters now inherit from the base 'filter' type
wrapper_obj.type_ = Some(SchemaTypeOrArray::Single("filter".to_string()));
wrapper_obj.properties = Some(filter_props);
return Some(Schema {