Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9599b4cbc3 | |||
| f51799f0b1 | |||
| c8757e1709 |
@ -138,6 +138,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"filter": {
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"condition": {
|
"condition": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -300,7 +303,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"type": [
|
"type": [
|
||||||
"object",
|
"filter",
|
||||||
"null"
|
"null"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -341,11 +344,11 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"type": "object"
|
"type": "filter"
|
||||||
},
|
},
|
||||||
"address": {},
|
"address": {},
|
||||||
"address.filter": {
|
"address.filter": {
|
||||||
"type": "object",
|
"type": "filter",
|
||||||
"compiledPropertyNames": [
|
"compiledPropertyNames": [
|
||||||
"$and",
|
"$and",
|
||||||
"$or",
|
"$or",
|
||||||
@ -389,12 +392,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"condition": {},
|
"condition": {},
|
||||||
|
"filter": {},
|
||||||
"string.condition": {},
|
"string.condition": {},
|
||||||
"integer.condition": {},
|
"integer.condition": {},
|
||||||
"date.condition": {},
|
"date.condition": {},
|
||||||
"search": {},
|
"search": {},
|
||||||
"search.filter": {
|
"search.filter": {
|
||||||
"type": "object",
|
"type": "filter",
|
||||||
"compiledPropertyNames": [
|
"compiledPropertyNames": [
|
||||||
"$and",
|
"$and",
|
||||||
"$or",
|
"$or",
|
||||||
|
|||||||
@ -34,7 +34,7 @@ impl Schema {
|
|||||||
|
|
||||||
if let Some(mut inline_schema) = structural_filter {
|
if let Some(mut inline_schema) = structural_filter {
|
||||||
inline_schema.obj.type_ = Some(SchemaTypeOrArray::Multiple(vec![
|
inline_schema.obj.type_ = Some(SchemaTypeOrArray::Multiple(vec![
|
||||||
"object".to_string(),
|
"filter".to_string(),
|
||||||
"null".to_string(),
|
"null".to_string(),
|
||||||
]));
|
]));
|
||||||
|
|
||||||
@ -104,8 +104,8 @@ impl Schema {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let mut wrapper_obj = SchemaObject::default();
|
let mut wrapper_obj = SchemaObject::default();
|
||||||
// Filters are just plain objects containing conditions, no inheritance required
|
// Filters now inherit from the base 'filter' type
|
||||||
wrapper_obj.type_ = Some(SchemaTypeOrArray::Single("object".to_string()));
|
wrapper_obj.type_ = Some(SchemaTypeOrArray::Single("filter".to_string()));
|
||||||
wrapper_obj.properties = Some(filter_props);
|
wrapper_obj.properties = Some(filter_props);
|
||||||
|
|
||||||
return Some(Schema {
|
return Some(Schema {
|
||||||
|
|||||||
@ -160,7 +160,7 @@ fn test_library_api() {
|
|||||||
"target": { "type": ["target_schema.filter", "null"] },
|
"target": { "type": ["target_schema.filter", "null"] },
|
||||||
"type": { "type": ["string.condition", "null"] }
|
"type": { "type": ["string.condition", "null"] }
|
||||||
},
|
},
|
||||||
"type": "object"
|
"type": "filter"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sensitive": false,
|
"sensitive": false,
|
||||||
@ -211,7 +211,7 @@ fn test_library_api() {
|
|||||||
},
|
},
|
||||||
"value": { "type": ["number.condition", "null"] }
|
"value": { "type": ["number.condition", "null"] }
|
||||||
},
|
},
|
||||||
"type": "object"
|
"type": "filter"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sensitive": false,
|
"sensitive": false,
|
||||||
|
|||||||
Reference in New Issue
Block a user