fix: Update JSON Schema for expressions in Studio with new functions - #19364
Conversation
📝 WalkthroughWalkthroughThe schema for ChangesNumeric expression schema extensions
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@src/Designer/frontend/libs/studio-components/src/components/StudioExpression/validators/expression.schema.v1.json`:
- Around line 688-705: The sum/average schemas currently point to the generic
list definition, so they allow non-numeric values instead of only number lists.
Update the argument schema used by func-sum and func-average in
expression.schema.v1.json to reference a numeric-list definition (for example a
new helper definition) rather than `#/definitions/list`, and make sure it covers
only numeric list literals plus any explicitly supported list-producing
expressions. Use the existing func-sum and func-average symbols to locate the
affected entries and keep their array shape unchanged aside from the tightened
argument validation.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 4b3f44ac-8f3b-4865-9fc8-0a85c3113793
📒 Files selected for processing (1)
src/Designer/frontend/libs/studio-components/src/components/StudioExpression/validators/expression.schema.v1.json
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #19364 +/- ##
==========================================
+ Coverage 95.84% 95.86% +0.01%
==========================================
Files 3028 3024 -4
Lines 39819 39548 -271
Branches 4910 4866 -44
==========================================
- Hits 38166 37914 -252
+ Misses 1235 1223 -12
+ Partials 418 411 -7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Description
This pull request updates the JSON Schema used in the expression editor in studio with the recently added functions.
Current:

This pull request:

Verification
Summary by CodeRabbit