fix: keep nullable when single allOf type replaces a property #25828
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.40) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 315 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.344
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #25828"
general
weight: 0.35
thekhegay
Property with
allOfof one inline type plusnullable: truefrom #20373 is replaced inInlineModelResolverby that only item, sonullableis lost:two: {allOf: [{type: string}], nullable: true}givestwo: stringin typescript-axios andStrictStrin python. Same shape with$refinsideallOfdoesnt lose itNow
nullableof property is copied to the item when it has none. Added test inInlineModelResolverTest. Regenerated all samples: only typescript-fetchenumbuilds change, theirnullable-string-enum/nullable-number-enumhave same shape and become| nullas spec saysFixes #20373
PR checklist
Commit all changed files.
<!-- This is an auto-generated description by cubic. -->
---
Summary by cubic
Fixes
nullablebeing lost whenInlineModelResolverflattens a property whoseallOfcontains a single inline type. The property'snullablevalue is now copied to the replacement item when the item doesn't set its own, matching the behavior already present for$ref-basedallOfitems. Tests cover both inline-type and$refallOfitems, and regenerated typescript-fetch enum samples now emit| nullfor nullable enums, matching the spec.<sup>Written for commit 5b5ab087694adadf3109f6d11393ccc91d9db130. Summary will update on new commits.</sup>
<a href="https://cubic.dev/pr/OpenAPITools/openapi-generator/pull/25828?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="View guided diff" src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->