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:
@ -87,6 +87,34 @@
|
||||
"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": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -165,8 +165,16 @@ impl Schema {
|
||||
} else if db.enums.contains_key(custom) {
|
||||
Some(vec![format!("{}.condition", custom)])
|
||||
} 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)])
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user