removed schema realms, fixed fixture generations, added dynamic type resolution for validation based on type and kind discriminators for filters

This commit is contained in:
2026-04-21 10:50:01 -04:00
parent a1e6ac8cb0
commit 4e2cb488cc
25 changed files with 440 additions and 331 deletions

View File

@ -12,7 +12,10 @@ impl Schema {
let mut strategy = String::new();
if let Some(family) = &self.obj.family {
// Formalize the <Variant>.<Base> topology
// family_base extracts the 'Base' (e.g. 'widget', 'person')
let family_base = family.split('.').next_back().unwrap_or(family).to_string();
// family_prefix extracts the 'Variant' (e.g. 'stock', 'light')
let family_prefix = family
.strip_suffix(&family_base)
.unwrap_or("")
@ -29,7 +32,7 @@ impl Schema {
format!("{}.{}", family_prefix, var)
};
if db.get_scoped_schema(crate::database::realm::SchemaRealm::Type, &target_id).is_some() {
if db.schemas.get(&target_id).is_some() {
options.insert(var.to_string(), (None, Some(target_id)));
}
}