Repository navigation
Name the JSON config fields once and render both registries through one Markdown renderer - #5490
Conversation
… experimental registries through one shared Markdown renderer
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Shared JSON field contract and consumers src/datamodel_code_generator/_json_config_fields.py, src/datamodel_code_generator/_cli_config.py, src/datamodel_code_generator/_project_config.py, src/datamodel_code_generator/json_config.py, src/datamodel_code_generator/watch_dependencies.py |
A shared JsonConfigFieldName type and JSON_CONFIG_FIELDS tuple replace local field lists. CLI validation, project configuration, JSON configuration typing, and dependency watching use the shared definitions. The validators field now uses the shared JSON configuration loading path. |
Registry Markdown Rendering
| Layer / File(s) | Summary |
|---|---|
Shared registry Markdown rendering src/datamodel_code_generator/_registry_render.py, src/datamodel_code_generator/deprecations.py, src/datamodel_code_generator/experimental.py |
A shared renderer builds Markdown tables and entry details. The deprecation and experimental-feature registries supply their columns, cells, details, and page metadata to the renderer. |
Priority:
Estimated code review effort: 3 (Moderate) | ~20 minutes
Merge Risk: 
Minimal · up to 5c372
-
No concrete merge-blocking issue is established for the shared configuration fields or Markdown renderer. Mergeability remains subject to normal checks.
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 7 functions across 8 files.
-
Finishing Touches: 💡 1
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
🛠️ Fix failing CI checks: 💡
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
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. |
Merging this PR will regress 1 benchmark2 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: This PR is an internal refactor with no user-facing breaking changes. The list of JSON config field names now lives in one new pydantic-free module, _json_config_fields. The CLI Config validator, the pyproject field sets and the watch_dependencies field set now all build from that list instead of keeping their own copies, and the names in it are the same as before. The separate validators field validator is merged into the generic JSON config validator, which calls the same loader and turns JsonConfigError into Error the same way. JsonConfigFieldName is still available from json_config as an alias. _PYPROJECT_MODEL_JSON_CONFIG_FIELDS is now worked out as all fields minus the target fields, and the 21-name list minus the 9 target fields gives the same 12 model fields as before. The Markdown rendering of deprecations and experimental features moves into a shared helper and produces the same header, table separators, backtick-wrapped ID and Target cells, detail bullets with the optional Replacement and Tracking lines, messages and notes. No CLI options, Python API, templates, defaults or supported Python versions change. The behaviour diff marks some cells as accepted, but they are about allOf parts that admit no object, and their notes point to a separate change. This diff does not touch any parser or code generation logic, so those cells do not come from this PR. This analysis was produced by the release draft workflow |
|
🎉 Released in 0.88.0 This PR is now available in the latest release. See the release notes for details. |
Summary by CodeRabbit
Bug Fixes
validatorssetting now follows the same JSON configuration loading and error-reporting path as other JSON-backed settings.Refactor