Repository navigation
Accept boolean schemas in allOf - #5159
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Merging this PR will degrade performance by 20.76%2 warnings
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Breaking Change AnalysisResult: No breaking changes detected Reasoning: The only source change is in the OpenAPI parser method that collects discriminator refs from allOf members, which now adds an isinstance dict guard so boolean schema members such as true or false no longer cause an AttributeError when calling get on a bool. This is a bug fix: inputs that previously crashed now generate code, with true members treated as no constraint. A false member leads to an error message that is not added in this diff, so it comes from existing validation code that is now reachable. Output for dict-only allOf lists is unchanged. All other changes are new test fixtures, expected outputs, tests and refs entries. No CLI options, Python API, defaults, templates, Python version support or existing generated output for valid inputs were changed, so there are no breaking changes. This analysis was produced by the release draft workflow |
A YAML key such as `1` under `components` loads as a number. The legacy scopes crashed on such a name under `schemas` and `requestBodies`, and the `api` scope on every component kind it reads (and on any loaded document's `schemas`). They now stop with "Error at schema path '<doc>#/components/<kind>/1': component name 1 is not a string". Runs that never use such a name as a model name, such as a legacy request body without a schema, keep their output. Boolean schemas in `allOf` no longer crash since #5159. Fixes: #4491
Summary by CodeRabbit
allOfare now handled correctly during model generation. Valid schemas can generate usable models, while schemas containing an invalid false entry produce an error instead of an output file.