feat(Redux-integrated field widgets): #3591602 Props whose source shape differs from the resolved value can't be validated client-side
Closes #3591602
Adds an explicit, optional field-widget metadata flag canvas.sourceShapeDiffersFromResolved, declared alongside canvas.transforms in hook_field_widget_info_alter(). When a prop is populated by a flagged widget, the client skips client-side JSON Schema validation for it and defers to the server — the widget edits a single scalar source value (an entity/file/media id) that the server wraps into the prop's resolved object shape, so the scalar can never satisfy the resolved type: object schema. Replaces the previous incidental skip (props that happened to render multiple form inputs) with a declared rule for image/file/media; the separate multi-input skip stays for genuinely composite values (date range, link). Behaviour-neutral: every prop skipped before stays skipped.
Blocks #3574857, which declares the flag on entity_reference_autocomplete and builds on this mechanism instead of a special-case.
AI-Generated: Yes (Used Claude Code to implement an agreed, human-authored design — the metadata flag, the client-side skip, the docs/spec updates, and the test/fixture updates).
Testing instructions
-
vitest run tests/vitest/unit/formUtils.test.js— theshouldSkipPropValidationmatrix passes (flagged props skip regardless of input count; an object schema alone does not). - Run kernel
FieldWidgetSupportTest, and--filter testGetClientSideInfoonSingleDirectoryComponentTestandJsComponentTest— all green (assert the flag ships per prop for image/file/media). -
redocly lint openapi.yml— passes with no new warnings.