Skip to content

fix: configuration description of the YAML template renders the array type#135

Merged
junjiem merged 1 commit intomainfrom
fix/dat_project_yaml_template
Nov 14, 2025
Merged

fix: configuration description of the YAML template renders the array type#135
junjiem merged 1 commit intomainfrom
fix/dat_project_yaml_template

Conversation

@junjiem
Copy link
Copy Markdown
Collaborator

@junjiem junjiem commented Nov 14, 2025

Summary by CodeRabbit

  • Chores

    • Refactored configuration class to use code generation best practices.
  • Documentation

    • Enhanced clarity of collection-type descriptions in configuration metadata by explicitly denoting list wrapper types.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Nov 14, 2025

Walkthrough

The PR refactors the isList() accessor in ConfigOption to use Lombok's @Getter annotation, and updates type prefix formatting in YamlTemplateUtil to represent list types as "List" instead of just the element type.

Changes

Cohort / File(s) Summary
Lombok Getter Refactoring
dat-core/src/main/java/ai/dat/core/configuration/ConfigOption.java
Replaced explicit isList() method with Lombok-generated @Getter annotation on the isList field.
Type Description Enhancement
dat-core/src/main/java/ai/dat/core/utils/YamlTemplateUtil.java
Updated toDescription() to render list types as List<ElementType> by introducing a classSimpleName variable and conditionally wrapping element types. Non-list types remain unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • ConfigOption change is a straightforward annotation replacement with no behavioral impact
  • YamlTemplateUtil introduces minor conditional logic for formatting list type descriptions

Poem

🐰 A getter refactored, Lombok takes the lead,
Lists wrapped in brackets—precisely what we need!
Type descriptions bloom, from simple to sublime,
Configuration hops along, one change at a time! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: fixing how YAML template configuration descriptions render array/list types.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/dat_project_yaml_template

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7325899 and d704a99.

📒 Files selected for processing (2)
  • dat-core/src/main/java/ai/dat/core/configuration/ConfigOption.java (1 hunks)
  • dat-core/src/main/java/ai/dat/core/utils/YamlTemplateUtil.java (1 hunks)
🔇 Additional comments (2)
dat-core/src/main/java/ai/dat/core/configuration/ConfigOption.java (1)

51-52: LGTM! Clean Lombok refactor.

The @Getter annotation on the boolean field will generate the isList() method, maintaining the same public API while reducing boilerplate code.

dat-core/src/main/java/ai/dat/core/utils/YamlTemplateUtil.java (1)

135-137: List type rendering change verified and correct.

The implementation properly wraps list types in List<ElementType> format while preserving non-list types. The isList() method is confirmed in use throughout the codebase (Configuration.java, ConfigurationUtils.java), and this change is integrated into active code paths that generate configuration descriptions. No issues found.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@junjiem junjiem merged commit 04f6e89 into main Nov 14, 2025
1 check passed
@junjiem junjiem deleted the fix/dat_project_yaml_template branch November 14, 2025 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant