Commit 28fca89
committed
address review: detect object branches via collect_types
CodeRabbit pointed out that the local branch_has_object helper would miss
object branches expressed via composition (e.g. anyOf:[{allOf:[{type:object,...}]}, ...]).
Replaced the ad-hoc check with collect_types(b)['object'], which already
recursively walks anyOf/oneOf/allOf and handles union type arrays.
Added a regression test using an allOf-wrapped object branch.1 parent 8d3c87b commit 28fca89
2 files changed
Lines changed: 24 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
| 266 | + | |
274 | 267 | | |
275 | 268 | | |
276 | 269 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
295 | 318 | | |
0 commit comments