filter synthesis: omit Field-Backed JSONB Bubbles from Composed Filter References — only Table-Backed boundaries have a synthesized .filter to proxy to; a dangling proxy reference breaks downstream code generators consuming the exported registry. Fixture pins a bubble-typed property: omitted from the filter, raw schemas promoted, no phantom .filter.

This commit is contained in:
2026-07-07 13:39:03 -04:00
parent 95600551a7
commit d608f5e963
2 changed files with 41 additions and 3 deletions

View File

@ -87,6 +87,34 @@
"type": "string" "type": "string"
} }
} }
},
"schedule": {
"type": [
"opening_hours",
"null"
]
}
}
},
"opening_hours": {
"type": "object",
"properties": {
"open": {
"type": "string"
},
"seasons": {
"type": "array",
"items": {
"type": "season"
}
}
}
},
"season": {
"type": "object",
"properties": {
"label": {
"type": "string"
} }
} }
} }
@ -483,7 +511,9 @@
] ]
} }
} }
} },
"opening_hours": {},
"season": {}
} }
} }
} }

View File

@ -165,8 +165,16 @@ impl Schema {
} else if db.enums.contains_key(custom) { } else if db.enums.contains_key(custom) {
Some(vec![format!("{}.condition", custom)]) Some(vec![format!("{}.condition", custom)])
} else { } else {
// Assume anything else is a Relational cross-boundary that already has its own .filter dynamically built // Only a Table-Backed boundary has a synthesized Composed Filter to proxy to.
// A Field-Backed JSONB Bubble has none — omit it like an inline object rather
// than emit a dangling proxy reference, which breaks eager consumers of the
// exported registry (downstream code generators).
let base = custom.split('.').next_back().unwrap_or(custom);
if db.types.contains_key(base) {
Some(vec![format!("{}.filter", custom)]) Some(vec![format!("{}.filter", custom)])
} else {
None
}
} }
} }
} }