Skip to content

fix: additionalProperties validation in baseWidgetLayoutsTemplateConfig#2289

Merged
tahmidefaz merged 1 commit intomasterfrom
fix-schema-bug
Mar 18, 2026
Merged

fix: additionalProperties validation in baseWidgetLayoutsTemplateConfig#2289
tahmidefaz merged 1 commit intomasterfrom
fix-schema-bug

Conversation

@tahmidefaz
Copy link
Copy Markdown
Member

restructure baseWidgetLayoutsTemplateConfig schema to fix additionalProperties validation

The breakpoint items (sm, md, lg, xl) had and additionalProperties: false
as sibling keywords. In JSON Schema 2020-12, additionalProperties only considers
properties defined in the same schema object, not those from . This caused
ajv to reject all properties (w, h, cx, cy, i) as additional.

Move inside allOf so templateConfigItem's own additionalProperties: false
handles property restriction, while per-breakpoint constraints remain in a
second allOf entry.

…onalProperties validation

  The breakpoint items (sm, md, lg, xl) had  and additionalProperties: false
  as sibling keywords. In JSON Schema 2020-12, additionalProperties only considers
  properties defined in the same schema object, not those from . This caused
  ajv to reject all properties (w, h, cx, cy, i) as additional.

  Move  inside allOf so templateConfigItem's own additionalProperties: false
  handles property restriction, while per-breakpoint constraints remain in a
  second allOf entry.
@tahmidefaz tahmidefaz requested a review from a team March 18, 2026 17:56
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 18, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 97831215-478e-4887-8b71-3d1a9e6368e4

📥 Commits

Reviewing files that changed from the base of the PR and between 6ed0d00 and 3c00b95.

📒 Files selected for processing (1)
  • packages/config-utils/src/feo/spec/frontend-crd.schema.json

Summary by CodeRabbit

  • Refactor
    • Updated internal validation structure for widget layout configurations to improve system maintainability and consistency.

Walkthrough

The PR refactors the JSON schema for per-breakpoint widget template configurations, converting from inline object definitions to allOf compositions. The same validation requirements are maintained; only the schema representation structure changes.

Changes

Cohort / File(s) Summary
Schema Refactoring
packages/config-utils/src/feo/spec/frontend-crd.schema.json
Restructured per-breakpoint widget templates (sm, md, lg, xl) in baseWidgetLayoutsTemplateConfig from inline objects with refs to allOf compositions combining templateConfigItem references with separate required field declarations, preserving validation constraints.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: fixing additionalProperties validation in a specific schema component, which matches the core objective of restructuring the schema.
Description check ✅ Passed The description is directly related to the changeset, explaining the schema restructuring and the specific JSON Schema 2020-12 behavior that necessitated the change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-schema-bug
📝 Coding Plan
  • Generate coding plan for human review comments

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

Copy link
Copy Markdown
Contributor

@justinorringer justinorringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@tahmidefaz tahmidefaz merged commit 3c42311 into master Mar 18, 2026
9 checks passed
@tahmidefaz tahmidefaz deleted the fix-schema-bug branch March 18, 2026 19:14
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.

2 participants